Skip to main content
The GraphQL API provides a streamlined, rendering-first interface optimized for client applications consuming published content via API keys. While the REST API offers comprehensive content management capabilities, the GraphQL API focuses exclusively on content delivery, providing a simplified interface that returns only the fields needed for rendering.

Key Principles

Rendering-First Design

  • Returns only fields needed for display and execution
  • Excludes CMS/editorial metadata not required for rendering
  • Includes compiled code ready for execution
  • Provides resolved dependencies in a single request

Published Content Only

  • Always returns the latest published version
  • No draft or unpublished content access
  • Assets are always active (deleted assets excluded)
  • Simplified status model: everything returned is ready to render

API Key Authentication

  • Designed for client-side applications
  • Uses the same API keys as REST endpoints
  • Read-only access to published resources
  • No user authentication required

Simplified Schema

  • No versioning complexity in queries
  • Status is implicit (all returned content is published)
  • Cleaner type definitions
  • Consistent naming with REST API

Real-time Subscriptions

  • WebSocket-based GraphQL subscriptions
  • Watch specific content for updates
  • Automatic filtering to published content
  • Efficient multiplexing over single connection
  • Token-based authentication (no API key required)
  • Access to draft components and unpublished content
  • Real-time updates via WebSocket subscriptions
  • Version-specific component previews

Endpoint

The GraphQL API is available at:

Authentication

GraphQL requests require an API key in the x-api-key header. The value is your organization ID, project ID, and API key, separated by colons:
For WebSocket subscriptions:
Preview queries and subscriptions don’t need an API key. The token argument of preview and previewUpdated authorizes the request.

Making Requests

HTTP POST

JavaScript

Apollo Client

Response Format

Successful responses follow the standard GraphQL format:
Errors are returned in the errors array: