{"name":"theazia Content API","version":"1.0.0","description":"Programmatic read/write access to the theazia travel magazine. Designed for AI agents to create, schedule, draft, and manage stories and categories.","baseUrl":"https://theazia.com/api/v1","authentication":{"type":"api_key","how":"Send your key as 'Authorization: Bearer <key>' or 'x-api-key: <key>'.","scopes":{"read":"List and read posts, categories, authors.","write":"Create and edit posts/categories as drafts or scheduled.","publish":"Publish posts live immediately."}},"hierarchy":{"description":"Destinations form a tree: Country → City. Posts attach to a place (country or city) and a section (category). 'Individual attractions' are simply posts in the 'attractions' section attached to a city. Passing a post's country/city auto-builds the place tree.","sections":["attractions","travel-guide","food-drink","culture-craft","where-to-stay","journeys"],"sectionIntro":"Each section listing (e.g. Attractions in Tehran) can carry an editorial intro/overview shown at the foot of the page. Manage it via PUT /section-intros { place, section, title?, body } where body is markdown.","browse":{"country":"/destinations/{country}","countrySection":"/destinations/{country}/{section}","city":"/destinations/{country}/{city}","citySection":"/destinations/{country}/{city}/{section}"}},"contentModel":{"post":{"required":["title"],"optional":["slug","dek (standfirst)","excerpt","content (markdown)","coverImage (url)","coverCaption","status (DRAFT|SCHEDULED|PUBLISHED|ARCHIVED)","featured (bool)","publishedAt (ISO)","scheduledFor (ISO)","country","city","region","latitude","longitude","gallery [{url,caption}]","facts [{label,value}]","highlights [string]","metaTitle","metaDescription","ogImage","category (name|slug|id — auto-created)","author (name|slug|id — auto-created)","tags [string] (auto-created)"]}},"endpoints":[{"method":"GET","path":"/posts","scope":"read","desc":"List posts. Query: status, category, country, tag, q, page, limit."},{"method":"POST","path":"/posts","scope":"write","desc":"Create a post (draft/scheduled/published)."},{"method":"GET","path":"/posts/{idOrSlug}","scope":"read","desc":"Fetch a single post."},{"method":"PATCH","path":"/posts/{idOrSlug}","scope":"write","desc":"Update any field of a post."},{"method":"DELETE","path":"/posts/{idOrSlug}","scope":"write","desc":"Delete a post."},{"method":"POST","path":"/posts/{idOrSlug}/publish","scope":"publish","desc":"Publish a post immediately."},{"method":"POST","path":"/posts/{idOrSlug}/schedule","scope":"write","desc":"Schedule a post. Body: { scheduledFor: ISO }."},{"method":"GET","path":"/categories","scope":"read","desc":"List categories (a.k.a. sections: Attractions, Travel Guide, Food…)."},{"method":"POST","path":"/categories","scope":"write","desc":"Create a category."},{"method":"GET","path":"/places","scope":"read","desc":"The destination tree — countries each with their cities."},{"method":"POST","path":"/places","scope":"write","desc":"Create a country or city. City needs 'parent' (country)."},{"method":"PATCH","path":"/places/{idOrPath}","scope":"write","desc":"Update a country/city (summary, hero, facts)."},{"method":"DELETE","path":"/places/{idOrPath}","scope":"write","desc":"Delete a place (cities cascade)."},{"method":"GET","path":"/section-intros","scope":"read","desc":"List section intro texts, or one via ?place=&section=."},{"method":"PUT","path":"/section-intros","scope":"write","desc":"Set the editorial intro shown at the foot of a section listing. Body: { place, section, title?, body }."},{"method":"DELETE","path":"/section-intros","scope":"write","desc":"Remove an intro via ?place=&section=."},{"method":"GET","path":"/authors","scope":"read","desc":"List authors."},{"method":"POST","path":"/authors","scope":"write","desc":"Create an author (name, role, bio, avatar, location, twitter, instagram)."},{"method":"GET","path":"/authors/{idOrSlug}","scope":"read","desc":"Fetch one author."},{"method":"PATCH","path":"/authors/{idOrSlug}","scope":"write","desc":"Update an author's profile."},{"method":"DELETE","path":"/authors/{idOrSlug}","scope":"write","desc":"Delete an author (their posts are kept)."},{"method":"GET","path":"/me","scope":"read","desc":"Inspect the current API key."},{"method":"GET","path":"/openapi.json","scope":"public","desc":"OpenAPI 3 specification."}],"examples":{"createPublished":{"method":"POST","url":"https://theazia.com/api/v1/posts","headers":{"Authorization":"Bearer <key>","Content-Type":"application/json"},"body":{"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-...","country":"Iran","city":"Tehran","latitude":35.6892,"longitude":51.389,"category":"Journeys","tags":["rail","iran"],"status":"PUBLISHED"}}},"docs":"https://theazia.com/api-docs"}