[Tenjin API Reference](https://api-docs.tenjin.com/llms.txt) › [Campaign Management API](https://api-docs.tenjin.com/campaign-management-api.md) › List channels

- Campaign Management API OpenAPI spec: https://api-docs.tenjin.com/openapi/campaign-management-api.json

# List channels

- **Method:** `GET`
- **Path:** `/v2/channels`
- **Operation ID:** `get_channels`
- **Tags:** Channels

## Effective servers

- `https://api.tenjin.com`

## Authentication

- **Bearer**: HTTP bearer (`JWT`)

  Generate an access token on the [Access Tokens](https://dashboard.tenjin.com/dashboard/access_tokens) page of the Tenjin dashboard and send it as `Authorization: Bearer <access token>`. [API access tokens](https://tenjin.com/docs/api-access-tokens/) explains them.

## Query parameters

- **`query`**: `string`

  Search channels by name
- **`page`**: `integer`, default: `1`

  Page of results to fetch.
- **`per_page`**: `integer`, default: `25`, minimum: `0`, maximum: `1000`

  Number of results to return per page.

## Responses

### 200 Channels

**Headers:**

- **`Link`**

  URLs of the first, previous, next and last pages (RFC 8288); sent only when the list has more than one page

  `string`
- **`Total`**

  Number of items on all pages

  `integer`
- **`Per-Page`**

  Number of items per page

  `integer`

**Content type:** `application/json`

schema: `ChannelListDocument`

- **`data` (required)**: `array`

  **Items:**

  schema: `ChannelResource`
  - **`attributes` (required)**: `object`
    - **`name` (required)**: `string | null`

      Name of the channel
    - **`short_id` (required)**: `string | null`

      URL-safe id of the channel
  - **`id` (required)**: `integer`
  - **`type` (required)**: `string`, possible values: `"channel"`
- **`links` (required)**: `object`, schema: `Links`
  - **`self` (required)**: `string`, format: `uri`

    URL of this request
  - **`first`**: `string`, format: `uri`

    URL of the first page of a list
  - **`last`**: `string`, format: `uri`

    URL of the last page of a list
  - **`next`**: `string`, format: `uri`

    URL of the next page of a list
  - **`prev`**: `string`, format: `uri`

    URL of the previous page of a list
- **`meta` (required)**: `object`, schema: `PageMeta`
  - **`count` (required)**: `integer`

    Number of items on all pages
  - **`per_page` (required)**: `integer`

    Number of items per page

**Example: Channels**

```json
{
  "data": [
    {
      "id": 1,
      "type": "channel",
      "attributes": {
        "name": "Tapjoy",
        "short_id": "tapjoy"
      }
    },
    {
      "id": 3,
      "type": "channel",
      "attributes": {
        "name": "Facebook",
        "short_id": "facebook"
      }
    },
    {
      "id": 7,
      "type": "channel",
      "attributes": {
        "name": "Chartboost",
        "short_id": "chartboost"
      }
    }
  ],
  "links": {
    "self": "https://api.tenjin.com/v2/channels"
  },
  "meta": {
    "count": 3,
    "per_page": 25
  }
}
```

### 400, 401, 403, 498

- `400` A param is missing or invalid, a record is not found, or the request cannot be served
- `401` Missing or invalid credentials, or no access to the requested data
- `403` Invalid token, or the user's role does not allow the request
- `498` Expired token, or a token with an invalid signature

**Content type:** `application/json`

schema: `Error`

- **`error` (required)**: `string`

  What went wrong

**Example:**

```json
{
  "error": ""
}
```

## Schemas

- `Error` — shown above.
- `ChannelListDocument` — shown above.
- `Links` — shown above.
- `PageMeta` — shown above.
- `ChannelResource` — shown above.
