> ## Documentation Index
> Fetch the complete documentation index at: https://docs.withchanneled.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Getting Started

> How to access the Channeled API.

Welcome to Channeled's developer docs, where you can learn more about Channeled's API and how to use it.

The first step is to head over to [Channeled API Settings](https://app.withchanneled.com/settings/channeled-api) and get your API key.

You can use this key for all your requests to the API. This key is unique to you, so make sure to keep it safe.

## Usage

<Tabs>
  <Tab title="cURL">
    ```bash theme={null}
      curl --request POST \
        --url https://api.withchanneled.com/graphql \
        --header "Content-Type: application/json" \
        --header "Authorization: Bearer your-api-key"
        --data '{ "query": "query { me { id } }" }'
    ```
  </Tab>

  <Tab title="Node.js">
    ```js theme={null}
      const API_KEY = 'your-api-key';

      const response = await fetch('https://api.withchanneled.com/graphql', {
        method: 'POST',
        headers: {
          'Content-Type': 'application/json',
          Authorization: `Bearer ${API_KEY}`,
        },
        body: JSON.stringify({
          query: `
            query {
              me {
                id
              }
            }
          `
        }),
      });

      console.log(await response.json());
    ```
  </Tab>

  <Tab title="Python">
    ```python theme={null}
      import requests

      API_KEY = 'your-api-key'

      response = requests.post(
        'https://api.withchanneled.com/graphql',
        headers={
          'Content-Type': 'application/json',
          'Authorization': f'Bearer {API_KEY}'
        },
        json={
          'query': 'query { me { id } }'
        }
      )

      print(response.json())
    ```
  </Tab>

  <Tab title="Ruby">
    ```ruby theme={null}
      require 'net/http'
      require 'json'
      require 'uri'

      API_KEY = 'your-api-key'

      uri = URI('https://api.withchanneled.com/graphql')

      query = {
        "query" => "query { me { id } }"
      }.to_json

      http = Net::HTTP.new(uri.host, uri.port)

      request = Net::HTTP::Post.new(uri)

      request['Content-Type'] = 'application/json'
      request['Authorization'] = "Bearer #{API_KEY}"

      request.body = query

      response = http.request(request)

      puts(JSON.parse(response.body))
    ```
  </Tab>
</Tabs>
