> For the complete documentation index, see [llms.txt](https://docs.rad.live/rad/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.rad.live/rad/rad-tv-developer-api/graphql.md).

# GraphQL

The Rad TV API exposes a **GraphQL** endpoint for all core operations: identity, channels, catalog, content, playlists, engagement, and YouTube.

## Endpoint

```
POST /graphql
```

Send a JSON body with `query` (and optionally `variables`, `operationName`). Include the Bearer token for authenticated operations:

```
Authorization: Bearer <token>
Content-Type: application/json
```

## Authentication

Most queries and mutations require authentication via `Authorization: Bearer <jwt-or-api-key>`. The schema marks protected fields with the `@auth` directive.

**Public (no auth):**

* `ratings(limit, start)` — Content ratings (e.g. MPAA, TV).
* `genres(limit, start)` — Content genres.

All other operations require a valid Bearer token.

## Response shape

Responses follow the [GraphQL spec](https://spec.graphql.org/draft/#sec-Response): `{ data?, errors? }`.

* **Success** — `data` is present; its key matches the operation name (e.g. `data.me`, `data.channel`, `data.createContent`).
* **Error** — `errors` is an array of `{ message, path?, extensions? }`. HTTP status may still be 200; always check `response.errors`.

See [Response format and errors](/rad/rad-tv-developer-api/response-format-and-errors.md) for details.

## Introspection

The schema supports introspection. You can run introspection queries against `POST /graphql` to discover the full schema (types, fields, arguments). Use this or a GraphQL client (e.g. Altair at `/altair` in development) to explore the API.

## Main concepts

* **DIDs** — Use DIDs as IDs for channels and content (e.g. `did:rad.live:channel/<uuid>`, `did:rad.live:content/feature/<id>`).
* **Channel catalog** — Channels expose catalog via `features`, `series`, `episodes`, `streams`, etc. There is no legacy `content` field; use `channel.features(limit, start)` and similar.
* **Nullability** — Fields with `!` in the schema are non-null. Single-entity queries (`channel(id)`, `feature(id)`, etc.) return `null` when the entity is not found or not accessible.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.rad.live/rad/rad-tv-developer-api/graphql.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
