Skip to main content
The Relixir Developer API allows you to programmatically access and manage your CMS content. Use it to integrate Relixir with your existing workflows, build custom integrations, or automate content management.

Base URL

https://api.relixir.ai

Authentication

All API requests require authentication using an API key. Include your API key in the Authorization header:
Authorization: Bearer rlx_live_your_api_key_here

Creating an API Key

  1. Go to SettingsDeveloper API in your Relixir dashboard
  2. Click Create API key
  3. Give your key a descriptive name (e.g., “Production API Key”)
  4. Copy the key immediately - it will only be shown once
Keep your API keys secure. Never expose them in client-side code or commit them to version control.

Interactive Documentation

Full interactive API documentation with request/response examples is available at:

API Reference

Explore the full API with Swagger UI

Endpoints

Collections

Returns all internal (Relixir-owned) CMS collections for your organization.Request
GET /v1/collections
Query Parameters
ParameterTypeDefaultDescription
limitinteger100Maximum number of collections (1-500)
offsetinteger0Number of collections to skip
Example
curl -X GET "https://api.relixir.ai/v1/collections" \
  -H "Authorization: Bearer rlx_live_your_api_key"
Response
{
  "collections": [
    {
      "id": "550e8400-e29b-41d4-a716-446655440000",
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z",
      "name": "Blog Posts",
      "slug": "blog",
      "settings": {}
    }
  ],
  "total": 1
}
Get details of a specific collection by ID.Request
GET /v1/collections/{collection_id}
Example
curl -X GET "https://api.relixir.ai/v1/collections/550e8400-e29b-41d4-a716-446655440000" \
  -H "Authorization: Bearer rlx_live_your_api_key"

Content Items

Returns content items with optional filters.Request
GET /v1/items
Query Parameters
ParameterTypeDescription
collection_idUUIDFilter by collection
statusstringFilter by status: draft, published, archived
limitintegerMaximum items to return (1-500, default: 100)
offsetintegerNumber of items to skip
Example
curl -X GET "https://api.relixir.ai/v1/items?collection_id=550e8400-e29b-41d4-a716-446655440000&status=published" \
  -H "Authorization: Bearer rlx_live_your_api_key"
Response
{
  "items": [
    {
      "id": "660e8400-e29b-41d4-a716-446655440001",
      "created_at": "2024-01-15T10:30:00Z",
      "updated_at": "2024-01-15T10:30:00Z",
      "collection_id": "550e8400-e29b-41d4-a716-446655440000",
      "status": "published",
      "slug": "hello-world",
      "title": "Hello World",
      "body": "<p>Welcome to my blog!</p>",
      "meta_description": "An introduction post",
      "thumbnail_url": null,
      "extra_fields": {}
    }
  ],
  "total": 1,
  "limit": 100,
  "offset": 0
}
Get a specific content item by ID.Request
GET /v1/items/{item_id}
Create a new content item in a collection.Request
POST /v1/items
Request Body
FieldTypeRequiredDescription
collection_idUUIDYesCollection to add the item to
slugstringYesURL slug (must be unique in collection)
titlestringNoItem title
bodystringNoMain content (HTML or Markdown)
meta_descriptionstringNoSEO meta description
thumbnail_urlstringNoFeatured image URL
extra_fieldsobjectNoCustom fields as key-value pairs
publish_immediatelybooleanNoIf true, publish after creation
Example
curl -X POST "https://api.relixir.ai/v1/items" \
  -H "Authorization: Bearer rlx_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
    "collection_id": "550e8400-e29b-41d4-a716-446655440000",
    "slug": "my-new-post",
    "title": "My New Post",
    "body": "<p>This is the content of my post.</p>",
    "meta_description": "A great new post about...",
    "publish_immediately": true
  }'
Response (201 Created)
{
  "id": "770e8400-e29b-41d4-a716-446655440002",
  "created_at": "2024-01-15T10:30:00Z",
  "updated_at": "2024-01-15T10:30:00Z",
  "collection_id": "550e8400-e29b-41d4-a716-446655440000",
  "status": "published",
  "slug": "my-new-post",
  "title": "My New Post",
  "body": "<p>This is the content of my post.</p>",
  "meta_description": "A great new post about...",
  "thumbnail_url": null,
  "extra_fields": null,
  "current_revision_id": "880e8400-e29b-41d4-a716-446655440003"
}
Update an existing content item.Request
PATCH /v1/items/{item_id}
Request BodyAll fields are optional. Only include fields you want to update.
FieldTypeDescription
slugstringURL slug
titlestringItem title
bodystringMain content
meta_descriptionstringSEO description
thumbnail_urlstringFeatured image URL
extra_fieldsobjectCustom fields
Example
curl -X PATCH "https://api.relixir.ai/v1/items/770e8400-e29b-41d4-a716-446655440002" \
  -H "Authorization: Bearer rlx_live_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"title": "Updated Title"}'
Delete a content item and all its revisions.Request
DELETE /v1/items/{item_id}
Example
curl -X DELETE "https://api.relixir.ai/v1/items/770e8400-e29b-41d4-a716-446655440002" \
  -H "Authorization: Bearer rlx_live_your_api_key"
Response: 204 No Content
Publish a content item, creating a new revision.Request
POST /v1/items/{item_id}/publish
Example
curl -X POST "https://api.relixir.ai/v1/items/770e8400-e29b-41d4-a716-446655440002/publish" \
  -H "Authorization: Bearer rlx_live_your_api_key"
Response
{
  "success": true,
  "message": "Content item published successfully",
  "revision_id": "990e8400-e29b-41d4-a716-446655440004",
  "revision_number": 2,
  "published_at": "2024-01-15T12:00:00Z"
}

Error Handling

The API uses standard HTTP status codes:
StatusDescription
200Success
201Created
204No Content (successful deletion)
400Bad Request - Invalid parameters
401Unauthorized - Invalid or missing API key
403Forbidden - API key missing required scope
404Not Found - Resource doesn’t exist
409Conflict - e.g., duplicate slug
500Server Error
Error Response Format
{
  "detail": "Error message describing what went wrong"
}

Rate Limits

  • 1000 requests per minute per API key
  • 100 requests per second burst limit
If you exceed the rate limit, you’ll receive a 429 Too Many Requests response.

API Key Scopes

API keys have the following scopes by default:
ScopeDescription
collections:readRead collection information
items:readRead content items
items:writeCreate, update, delete, and publish items
Currently, all scopes are granted by default when creating an API key. Granular scope management will be available in a future update.