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
| Method | Path | Description | Scope |
|---|---|---|---|
| GET | /api/v1/posts | List & filter posts | read |
| POST | /api/v1/posts | Create a post (draft / scheduled / published) | write |
| GET | /api/v1/posts/{idOrSlug} | Fetch one post | read |
| PATCH | /api/v1/posts/{idOrSlug} | Update any field | write |
| DELETE | /api/v1/posts/{idOrSlug} | Delete a post | write |
| POST | /api/v1/posts/{idOrSlug}/publish | Publish immediately | publish |
| POST | /api/v1/posts/{idOrSlug}/schedule | Schedule for later | write |
| GET | /api/v1/categories | List categories | read |
| POST | /api/v1/categories | Create a category | write |
| PATCH | /api/v1/categories/{id} | Update a category | write |
| DELETE | /api/v1/categories/{id} | Delete a category | write |
| GET | /api/v1/authors | List authors | read |
| GET | /api/v1/me | Inspect your API key | read |