> 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/mutations.md).

# Mutations

{% hint style="info" %}
All mutations are executed via `POST /graphql` with a JSON body. All require the header:

`Authorization: Bearer <token>`
{% endhint %}

## GraphQL mutations

### Mutation list

| Mutation                                              | Description                                    |
| ----------------------------------------------------- | ---------------------------------------------- |
| `createContent(channel?, input)`                      | Create content (optional channel DID)          |
| `updateContent(id?, input)`                           | Update content metadata/hints                  |
| `createContentAsset(id, input)`                       | Create TUS upload session for content          |
| `createPlaylist(channel?, input)`                     | Create playlist                                |
| `updatePlaylist(id, input)`                           | Update playlist metadata                       |
| `createPlaylistAsset(id, input)`                      | Create TUS upload session for playlist image   |
| `submitContentForProcessing(id, input)`               | Submit for transcoding (layout, encoder)       |
| `publishContent(id)`                                  | Make content public                            |
| `unpublishContent(id)`                                | Revert to protected                            |
| `likeContent(id)` / `unlikeContent(id)`               | Like/unlike (idempotent)                       |
| `followChannel(channel)` / `unfollowChannel(channel)` | Follow/unfollow channel                        |
| `createComment(contentId, body)`                      | Create comment on content                      |
| `createContentFromYouTube(channel?, videoId)`         | Import YouTube video as content                |
| `publishContentToYouTube(id, privacyStatus?)`         | Publish Rad content to YouTube (returns job)   |
| `predictVirality(input)`                              | Predict virality score (Creator+ subscription) |

### Content and ingestion flow

{% stepper %}
{% step %}

### Create content

Call `createContent` — Create a content item (optional channel).
{% endstep %}

{% step %}

### Create ingestion session

Call `createContentAsset` — Get an ingestion session (TUS endpoint).
{% endstep %}

{% step %}

### Upload file

Upload the file to the session endpoint (see [Content and uploads](/rad/rad-tv-developer-api/content-and-uploads.md)).
{% endstep %}

{% step %}

### Submit for processing

Call `submitContentForProcessing` — Submit for transcoding.
{% endstep %}

{% step %}

### Publish (optional)

Optionally call `publishContent` to make it public.
{% endstep %}
{% endstepper %}

### Idempotent mutations

* `likeContent` / `like` — Calling multiple times has no additional effect.
* `unlikeContent` / `unlike` — No effect if the content is not liked.
* `followChannel` / `follow` — Idempotent.
* `unfollowChannel` / `unfollow` — Idempotent.


---

# 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/mutations.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.
