{"openapi":"3.0.3","info":{"title":"theazia Content API","version":"1.0.0","description":"Programmatic access to the theazia travel magazine for AI agents and apps. Create, draft, schedule, and publish stories and categories."},"servers":[{"url":"https://theazia.com/api/v1"}],"security":[{"bearerAuth":[]},{"apiKeyHeader":[]}],"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"},"apiKeyHeader":{"type":"apiKey","in":"header","name":"x-api-key"}},"schemas":{"PostInput":{"type":"object","required":["title"],"properties":{"title":{"type":"string"},"slug":{"type":"string"},"dek":{"type":"string","description":"Standfirst / subtitle"},"excerpt":{"type":"string"},"content":{"type":"string","description":"Markdown body"},"coverImage":{"type":"string","format":"uri"},"coverCaption":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"]},"featured":{"type":"boolean"},"publishedAt":{"type":"string","format":"date-time"},"scheduledFor":{"type":"string","format":"date-time"},"country":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"gallery":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"caption":{"type":"string"}}}},"facts":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"}}}},"highlights":{"type":"array","items":{"type":"string"}},"metaTitle":{"type":"string"},"metaDescription":{"type":"string"},"ogImage":{"type":"string","format":"uri"},"category":{"type":"string","description":"Name, slug, or id — auto-created if new"},"author":{"type":"string","description":"Name, slug, or id — auto-created if new"},"tags":{"type":"array","items":{"type":"string"}}}},"PostUpdate":{"type":"object","properties":{"title":{"type":"string"},"slug":{"type":"string"},"dek":{"type":"string","description":"Standfirst / subtitle"},"excerpt":{"type":"string"},"content":{"type":"string","description":"Markdown body"},"coverImage":{"type":"string","format":"uri"},"coverCaption":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SCHEDULED","PUBLISHED","ARCHIVED"]},"featured":{"type":"boolean"},"publishedAt":{"type":"string","format":"date-time"},"scheduledFor":{"type":"string","format":"date-time"},"country":{"type":"string"},"city":{"type":"string"},"region":{"type":"string"},"latitude":{"type":"number"},"longitude":{"type":"number"},"gallery":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"caption":{"type":"string"}}}},"facts":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"value":{"type":"string"}}}},"highlights":{"type":"array","items":{"type":"string"}},"metaTitle":{"type":"string"},"metaDescription":{"type":"string"},"ogImage":{"type":"string","format":"uri"},"category":{"type":"string","description":"Name, slug, or id — auto-created if new"},"author":{"type":"string","description":"Name, slug, or id — auto-created if new"},"tags":{"type":"array","items":{"type":"string"}}}},"Category":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"slug":{"type":"string"},"description":{"type":"string"},"image":{"type":"string","format":"uri"},"accent":{"type":"string","enum":["saffron","jade"]},"order":{"type":"integer"}}},"Author":{"type":"object","required":["name"],"properties":{"name":{"type":"string"},"slug":{"type":"string"},"role":{"type":"string"},"bio":{"type":"string"},"avatar":{"type":"string","format":"uri"},"location":{"type":"string"},"twitter":{"type":"string"},"instagram":{"type":"string"}}}}},"paths":{"/posts":{"get":{"summary":"List posts","parameters":[{"name":"status","in":"query","schema":{"type":"string"}},{"name":"category","in":"query","schema":{"type":"string"}},{"name":"country","in":"query","schema":{"type":"string"}},{"name":"tag","in":"query","schema":{"type":"string"}},{"name":"q","in":"query","schema":{"type":"string"}},{"name":"page","in":"query","schema":{"type":"integer"}},{"name":"limit","in":"query","schema":{"type":"integer"}}],"responses":{"200":{"description":"A page of posts"}}},"post":{"summary":"Create a post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostInput"}}}},"responses":{"201":{"description":"Created"},"422":{"description":"Validation error"}}}},"/posts/{idOrSlug}":{"parameters":[{"name":"idOrSlug","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get a post","responses":{"200":{"description":"The post"},"404":{"description":"Not found"}}},"patch":{"summary":"Update a post","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PostUpdate"}}}},"responses":{"200":{"description":"Updated"}}},"delete":{"summary":"Delete a post","responses":{"200":{"description":"Deleted"}}}},"/posts/{idOrSlug}/publish":{"post":{"summary":"Publish a post now (requires publish scope)","responses":{"200":{"description":"Published"}}}},"/posts/{idOrSlug}/schedule":{"post":{"summary":"Schedule a post","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["scheduledFor"],"properties":{"scheduledFor":{"type":"string","format":"date-time"}}}}}},"responses":{"200":{"description":"Scheduled"}}}},"/categories":{"get":{"summary":"List categories","responses":{"200":{"description":"Categories"}}},"post":{"summary":"Create a category","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Category"}}}},"responses":{"201":{"description":"Created"}}}},"/categories/{idOrSlug}":{"patch":{"summary":"Update a category","responses":{"200":{"description":"Updated"}}},"delete":{"summary":"Delete a category","responses":{"200":{"description":"Deleted"}}}},"/authors":{"get":{"summary":"List authors","responses":{"200":{"description":"Authors"}}},"post":{"summary":"Create an author","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Author"}}}},"responses":{"201":{"description":"Created"},"422":{"description":"Validation error"}}}},"/authors/{idOrSlug}":{"parameters":[{"name":"idOrSlug","in":"path","required":true,"schema":{"type":"string"}}],"get":{"summary":"Get an author","responses":{"200":{"description":"The author"},"404":{"description":"Not found"}}},"patch":{"summary":"Update an author","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Author"}}}},"responses":{"200":{"description":"Updated"}}},"delete":{"summary":"Delete an author","responses":{"200":{"description":"Deleted"}}}},"/me":{"get":{"summary":"Inspect current API key","responses":{"200":{"description":"Key info"}}}}}}