theazia
For machines & makers

The theazia API

A clean REST API built so AI agents can run the magazine end-to-end — drafting, scheduling, publishing, and organising content with a single key. Point your agent at the discovery endpoint and it learns the rest.

Authentication

Every request carries an API key, either as a bearer token or an x-api-key header. Create and revoke keys in the admin panel. Keys carry scopes: read, write, and publish.

curl https://theazia.com/api/v1/me \
  -H "Authorization: Bearer YOUR_API_KEY"

Publish a story

One POST creates a fully-formed, mapped article. Category, author, and tags are auto-created if they don't exist yet.

curl -X POST https://theazia.com/api/v1/posts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "title": "A Night Train Through Northern Iran",
    "dek": "From Tehran to the Caspian, by sleeper car.",
    "content": "## The departure\nThe platform smelled of saffron and diesel...",
    "coverImage": "https://images.unsplash.com/photo-1539037116277-4db20889f2d4?w=1600",
    "country": "Iran",
    "city": "Tehran",
    "latitude": 35.6892,
    "longitude": 51.389,
    "category": "Journeys",
    "tags": ["rail", "iran", "slow travel"],
    "highlights": ["Sunrise over the Alborz", "Tea from the samovar car"],
    "status": "PUBLISHED"
  }'

Drafts & scheduling

Set status: "DRAFT" to stage a story, or schedule it to go live automatically:

# Save as draft
curl -X POST https://theazia.com/api/v1/posts \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "title": "Kyoto in the Rain", "status": "DRAFT" }'

# Schedule an existing post
curl -X POST https://theazia.com/api/v1/posts/kyoto-in-the-rain/schedule \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "scheduledFor": "2026-07-01T09:00:00.000Z" }'

Endpoint reference

MethodPathDescriptionScope
GET/api/v1/postsList & filter postsread
POST/api/v1/postsCreate a post (draft / scheduled / published)write
GET/api/v1/posts/{idOrSlug}Fetch one postread
PATCH/api/v1/posts/{idOrSlug}Update any fieldwrite
DELETE/api/v1/posts/{idOrSlug}Delete a postwrite
POST/api/v1/posts/{idOrSlug}/publishPublish immediatelypublish
POST/api/v1/posts/{idOrSlug}/scheduleSchedule for laterwrite
GET/api/v1/categoriesList categoriesread
POST/api/v1/categoriesCreate a categorywrite
PATCH/api/v1/categories/{id}Update a categorywrite
DELETE/api/v1/categories/{id}Delete a categorywrite
GET/api/v1/authorsList authorsread
GET/api/v1/meInspect your API keyread