Skip to main content
POST
/
v1
/
content
curl -X POST https://api.raily.ai/v1/content \
  -H "Authorization: Bearer raily_sk_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "externalId": "article-123",
    "title": "Introduction to AI",
    "type": "article",
    "source": "https://example.com/articles/ai-intro",
    "policyId": "pol_premium",
    "metadata": {
      "author": "Jane Smith",
      "category": "Technology",
      "publishedAt": "2024-01-15",
      "wordCount": 2500
    },
    "tags": ["ai", "technology", "tutorial"]
  }'
{
  "id": "cnt_abc123xyz",
  "object": "content",
  "externalId": "article-123",
  "title": "Introduction to AI",
  "type": "article",
  "source": "https://example.com/articles/ai-intro",
  "policyId": "pol_premium",
  "metadata": {
    "author": "Jane Smith",
    "category": "Technology",
    "publishedAt": "2024-01-15",
    "wordCount": 2500
  },
  "tags": ["ai", "technology", "tutorial"],
  "status": "active",
  "created": "2024-01-15T10:30:00Z",
  "updated": "2024-01-15T10:30:00Z"
}

Request Body

externalId
string
required
Your unique identifier for this content. Used for syncing with your systems.
title
string
required
Human-readable title for the content.
type
string
required
Content type. One of: article, report, image, dataset, video
source
string
required
URL to the original content.
policyId
string
Policy ID to apply. Uses default policy if not specified.
metadata
object
Custom key-value pairs for your data.
tags
array
Array of string tags for categorization.

Response

Returns the created content object.
id
string
Unique Raily identifier (e.g., cnt_abc123xyz)
object
string
Always content
externalId
string
Your external identifier
title
string
Content title
type
string
Content type
source
string
Source URL
policyId
string
Applied policy ID
metadata
object
Custom metadata
status
string
Always active for new content
created
string
ISO 8601 timestamp
curl -X POST https://api.raily.ai/v1/content \
  -H "Authorization: Bearer raily_sk_xxxxx" \
  -H "Content-Type: application/json" \
  -d '{
    "externalId": "article-123",
    "title": "Introduction to AI",
    "type": "article",
    "source": "https://example.com/articles/ai-intro",
    "policyId": "pol_premium",
    "metadata": {
      "author": "Jane Smith",
      "category": "Technology",
      "publishedAt": "2024-01-15",
      "wordCount": 2500
    },
    "tags": ["ai", "technology", "tutorial"]
  }'
{
  "id": "cnt_abc123xyz",
  "object": "content",
  "externalId": "article-123",
  "title": "Introduction to AI",
  "type": "article",
  "source": "https://example.com/articles/ai-intro",
  "policyId": "pol_premium",
  "metadata": {
    "author": "Jane Smith",
    "category": "Technology",
    "publishedAt": "2024-01-15",
    "wordCount": 2500
  },
  "tags": ["ai", "technology", "tutorial"],
  "status": "active",
  "created": "2024-01-15T10:30:00Z",
  "updated": "2024-01-15T10:30:00Z"
}