GraphQL API

Content Management

Create, update, publish, and unpublish content on the Rad TV platform.

These mutations manage the content lifecycle — from creation through publication.

Create Content

curl -X POST https://api.rad.live/graphql \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
    "query": "mutation($input: ContentInput!) { createContent(input: $input) { id metadata { title summary } } }",
    "variables": {
      "input": {
        "metadata": {
          "title": "My New Video",
          "summary": "A description of my video",
          "keywords": ["tech", "tutorial"],
          "categories": [{"name": "Technology"}]
        },
        "hints": { "type": "FEATURE", "containsAds": "NO" }
      }
    }
  }'
const response = await fetch('https://api.rad.live/graphql', {
  method: 'POST',
  headers: {
    'Content-Type': 'application/json',
    'Authorization': 'Bearer YOUR_API_KEY',
  },
  body: JSON.stringify({
    query: `
      mutation($input: ContentInput!) {
        createContent(input: $input) {
          id
          metadata { title summary }
        }
      }
    `,
    variables: {
      input: {
        metadata: {
          title: 'My New Video',
          summary: 'A description of my video',
          keywords: ['tech', 'tutorial'],
          categories: [{ name: 'Technology' }],
        },
        hints: { type: 'FEATURE', containsAds: 'NO' },
      },
    },
  }),
});

const { data } = await response.json();
const contentId = data.createContent.id; // did:rad.live:content/feature/...
response = requests.post(
    "https://api.rad.live/graphql",
    headers={
        "Content-Type": "application/json",
        "Authorization": "Bearer YOUR_API_KEY",
    },
    json={
        "query": """
        mutation($input: ContentInput!) {
          createContent(input: $input) {
            id
            metadata { title summary }
          }
        }
        """,
        "variables": {
            "input": {
                "metadata": {
                    "title": "My New Video",
                    "summary": "A description of my video",
                    "keywords": ["tech", "tutorial"],
                    "categories": [{"name": "Technology"}],
                },
                "hints": {"type": "FEATURE", "containsAds": "NO"},
            }
        },
    },
)

content_id = response.json()["data"]["createContent"]["id"]

ContentInput Fields

FieldTypeDescription
metadataContentMetadataInput!Title, summary, genre, rating, keywords, categories. Required
hints[ContentHintInput]!Content type and ad status. Required, and a list

ContentHintInput

FieldTypeValues
typeContentTypeFEATURE, LIVE, SERIES, EPISODE, SHORT, ANY
containsAdsContentAdHintYES, NO, MAYBE

ContentMetadataInput

FieldTypeDescription
titleStringContent title
summaryStringDescription
shortSummaryStringBrief tagline
genreContentGenreInputGenre object, e.g. { name: "Documentary" }
ratingContentRatingInputRating object, e.g. { name: "PG-13", system: MPAA }
keywords[String]Search keywords
categories[CategoryInput]Content categories

Update Content

mutation {
  updateContent(
    id: "did:rad.live:content/feature/123"
    input: {
      metadata: {
        title: "Updated Title"
        summary: "Updated description"
      }
      hints: { type: FEATURE, containsAds: NO }
    }
  ) {
    id
    metadata { title summary }
  }
}

Publish Content

Make content publicly visible:

mutation {
  publishContent(
    id: "did:rad.live:content/feature/123"
    releaseDate: "2025-03-20"
  ) {
    id
    metadata { title }
  }
}
ArgumentTypeDescription
idDID!Content identifier
releaseDateDateTimeOptional scheduled release (ISO 8601). Converted to noon UTC for timezone stability.

Unpublish Content

Revert content to protected (not publicly visible):

mutation {
  unpublishContent(id: "did:rad.live:content/feature/123") {
    id
  }
}

For the complete end-to-end workflow (create → upload → transcode → publish), see Publish to Rad or use the publishVideo compound mutation.

On this page