{"components":{"schemas":{"AuthBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v2/schemas/AuthBody.json"],"format":"uri","readOnly":true,"type":"string"},"key_prefix":{"description":"Public prefix of the API key used for display and correlation.","type":"string"},"name":{"description":"Human-readable name assigned to the key.","type":"string"},"permissions":{"description":"Permission scopes granted to the key.","items":{"type":"string"},"type":["array","null"]}},"required":["key_prefix","name","permissions"],"type":"object"},"Author":{"additionalProperties":false,"properties":{"email":{"type":"string"},"id":{"format":"int64","type":"integer"},"name":{"type":"string"}},"required":["id","name"],"type":"object"},"Category":{"additionalProperties":false,"properties":{"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"],"type":"object"},"CategoryOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v2/schemas/CategoryOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"$ref":"#/components/schemas/TaxonomyCategory"}},"required":["data"],"type":"object"},"CreateCategoryBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v2/schemas/CreateCategoryBody.json"],"format":"uri","readOnly":true,"type":"string"},"description":{"type":"string"},"language_code":{"type":"string"},"name":{"maxLength":100,"minLength":1,"type":"string"},"parent_id":{"description":"Parent category id; omit or null for a root category.","format":"int64","type":"integer"},"position":{"format":"int64","type":"integer"},"slug":{"maxLength":100,"minLength":1,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"}},"required":["name","slug"],"type":"object"},"CreatePageBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v2/schemas/CreatePageBody.json"],"format":"uri","readOnly":true,"type":"string"},"body":{"type":"string"},"canonical_url":{"format":"uri-reference","maxLength":2048,"type":"string"},"category_ids":{"items":{"format":"int64","type":"integer"},"type":["array","null"]},"exclude_from_lists":{"type":"boolean"},"featured_image_id":{"format":"int64","type":"integer"},"hide_featured_image":{"type":"boolean"},"language_code":{"description":"Falls back to system default if omitted.","type":"string"},"meta_description":{"type":"string"},"meta_keywords":{"type":"string"},"meta_title":{"type":"string"},"no_follow":{"type":"boolean"},"no_index":{"type":"boolean"},"og_image_id":{"format":"int64","type":"integer"},"page_type":{"default":"post","enum":["post","page"],"type":"string"},"scheduled_at":{"description":"RFC3339 timestamp.","format":"date-time","type":"string"},"slug":{"description":"Lowercase alphanumeric with dashes. Must be unique.","maxLength":255,"minLength":1,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"status":{"default":"draft","enum":["draft","published"],"type":"string"},"summary":{"description":"Short plaintext summary, trimmed. Max 500 characters (runes).","maxLength":500,"type":"string"},"tag_ids":{"items":{"format":"int64","type":"integer"},"type":["array","null"]},"tags":{"description":"Tag names; new tags are created if the actor has taxonomy:write.","items":{"type":"string"},"type":["array","null"]},"title":{"maxLength":255,"minLength":1,"type":"string"},"video_title":{"type":"string"},"video_url":{"format":"uri-reference","maxLength":2048,"type":"string"}},"required":["title","slug","body"],"type":"object"},"CreateTagBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v2/schemas/CreateTagBody.json"],"format":"uri","readOnly":true,"type":"string"},"language_code":{"description":"Falls back to system default if omitted.","type":"string"},"name":{"maxLength":100,"minLength":1,"type":"string"},"slug":{"maxLength":100,"minLength":1,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"}},"required":["name","slug"],"type":"object"},"DataStruct":{"additionalProperties":false,"properties":{"errors":{"items":{"$ref":"#/components/schemas/UploadError"},"type":["array","null"]},"uploaded":{"items":{"$ref":"#/components/schemas/Media"},"type":["array","null"]}},"required":["uploaded"],"type":"object"},"Folder":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"parent_id":{"format":"int64","type":"integer"},"position":{"format":"int64","type":"integer"}},"required":["id","name","position","created_at"],"type":"object"},"ListCategoriesOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v2/schemas/ListCategoriesOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"items":{"$ref":"#/components/schemas/TaxonomyCategory"},"type":["array","null"]}},"required":["data"],"type":"object"},"ListMediaOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v2/schemas/ListMediaOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"items":{"$ref":"#/components/schemas/Media"},"type":["array","null"]},"meta":{"$ref":"#/components/schemas/MediaListMeta"}},"required":["data","meta"],"type":"object"},"ListPagesOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v2/schemas/ListPagesOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"items":{"$ref":"#/components/schemas/Page"},"type":["array","null"]},"meta":{"$ref":"#/components/schemas/PagesListMeta"}},"required":["data","meta"],"type":"object"},"ListTagsOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v2/schemas/ListTagsOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"items":{"$ref":"#/components/schemas/TaxonomyTag"},"type":["array","null"]},"meta":{"$ref":"#/components/schemas/TaxonomyListMeta"}},"required":["data","meta"],"type":"object"},"Media":{"additionalProperties":false,"properties":{"alt":{"type":"string"},"caption":{"type":"string"},"created_at":{"format":"date-time","type":"string"},"filename":{"type":"string"},"folder":{"$ref":"#/components/schemas/Folder"},"folder_id":{"format":"int64","type":"integer"},"height":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"mime_type":{"type":"string"},"size":{"description":"File size in bytes.","format":"int64","type":"integer"},"translations":{"items":{"$ref":"#/components/schemas/Translation"},"type":["array","null"]},"updated_at":{"format":"date-time","type":"string"},"uploaded_by":{"format":"int64","type":"integer"},"urls":{"$ref":"#/components/schemas/URLs"},"uuid":{"format":"uuid","type":"string"},"variants":{"items":{"$ref":"#/components/schemas/Variant"},"type":["array","null"]},"width":{"format":"int64","type":"integer"}},"required":["id","uuid","filename","mime_type","size","alt","caption","uploaded_by","created_at","updated_at"],"type":"object"},"MediaListMeta":{"additionalProperties":false,"properties":{"page":{"format":"int64","type":"integer"},"pages":{"format":"int64","type":"integer"},"per_page":{"format":"int64","type":"integer"},"total":{"format":"int64","type":"integer"}},"required":["total","page","per_page","pages"],"type":"object"},"MediaOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v2/schemas/MediaOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"$ref":"#/components/schemas/Media"}},"required":["data"],"type":"object"},"Page":{"additionalProperties":false,"properties":{"author":{"$ref":"#/components/schemas/Author"},"author_id":{"format":"int64","type":"integer"},"body":{"type":"string"},"canonical_url":{"type":"string"},"categories":{"items":{"$ref":"#/components/schemas/Category"},"type":["array","null"]},"created_at":{"format":"date-time","type":"string"},"exclude_from_lists":{"type":"boolean"},"featured_image_id":{"format":"int64","type":"integer"},"hide_featured_image":{"type":"boolean"},"id":{"format":"int64","type":"integer"},"language_code":{"type":"string"},"meta_description":{"type":"string"},"meta_keywords":{"type":"string"},"meta_title":{"type":"string"},"no_follow":{"type":"boolean"},"no_index":{"type":"boolean"},"og_image_id":{"format":"int64","type":"integer"},"page_type":{"enum":["post","page"],"type":"string"},"published_at":{"format":"date-time","type":"string"},"scheduled_at":{"format":"date-time","type":"string"},"slug":{"type":"string"},"status":{"enum":["draft","published"],"type":"string"},"summary":{"type":"string"},"tags":{"items":{"$ref":"#/components/schemas/Tag"},"type":["array","null"]},"title":{"type":"string"},"updated_at":{"format":"date-time","type":"string"},"video_title":{"type":"string"},"video_url":{"type":"string"}},"required":["id","title","slug","body","status","page_type","author_id","language_code","created_at","updated_at","hide_featured_image","exclude_from_lists","no_index","no_follow"],"type":"object"},"PageOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v2/schemas/PageOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"$ref":"#/components/schemas/Page"}},"required":["data"],"type":"object"},"PagesListMeta":{"additionalProperties":false,"properties":{"page":{"format":"int64","type":"integer"},"pages":{"format":"int64","type":"integer"},"per_page":{"format":"int64","type":"integer"},"total":{"format":"int64","type":"integer"}},"required":["total","page","per_page","pages"],"type":"object"},"StatusBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v2/schemas/StatusBody.json"],"format":"uri","readOnly":true,"type":"string"},"status":{"description":"'ok' when the API is reachable.","examples":["ok"],"type":"string"},"version":{"description":"API major version.","examples":["v2"],"type":"string"}},"required":["status","version"],"type":"object"},"StatusError":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v2/schemas/StatusError.json"],"format":"uri","readOnly":true,"type":"string"}},"type":"object"},"Tag":{"additionalProperties":false,"properties":{"id":{"format":"int64","type":"integer"},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","slug"],"type":"object"},"TagOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v2/schemas/TagOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"$ref":"#/components/schemas/TaxonomyTag"}},"required":["data"],"type":"object"},"TaxonomyCategory":{"additionalProperties":false,"properties":{"children":{"description":"Populated only in tree list mode.","items":{"$ref":"#/components/schemas/TaxonomyCategory"},"type":["array","null"]},"created_at":{"format":"date-time","type":"string"},"description":{"type":"string"},"id":{"format":"int64","type":"integer"},"language_code":{"type":"string"},"name":{"type":"string"},"page_count":{"description":"Number of pages linked to this category.","format":"int64","type":"integer"},"parent_id":{"format":"int64","type":"integer"},"position":{"format":"int64","type":"integer"},"slug":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","slug","position","language_code","page_count","created_at","updated_at"],"type":"object"},"TaxonomyListMeta":{"additionalProperties":false,"properties":{"page":{"format":"int64","type":"integer"},"pages":{"format":"int64","type":"integer"},"per_page":{"format":"int64","type":"integer"},"total":{"format":"int64","type":"integer"}},"required":["total","page","per_page","pages"],"type":"object"},"TaxonomyTag":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"id":{"format":"int64","type":"integer"},"language_code":{"type":"string"},"name":{"type":"string"},"page_count":{"description":"Number of pages linked to this tag.","format":"int64","type":"integer"},"slug":{"type":"string"},"updated_at":{"format":"date-time","type":"string"}},"required":["id","name","slug","language_code","page_count","created_at","updated_at"],"type":"object"},"Translation":{"additionalProperties":false,"properties":{"alt":{"type":"string"},"caption":{"type":"string"},"language_code":{"type":"string"},"language_id":{"format":"int64","type":"integer"},"language_name":{"type":"string"}},"required":["language_id","language_code","language_name","alt","caption"],"type":"object"},"URLs":{"additionalProperties":false,"properties":{"large":{"type":"string"},"medium":{"type":"string"},"original":{"type":"string"},"thumbnail":{"type":"string"}},"required":["original"],"type":"object"},"UpdateCategoryBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v2/schemas/UpdateCategoryBody.json"],"format":"uri","readOnly":true,"type":"string"},"description":{"type":"string"},"language_code":{"type":"string"},"name":{"maxLength":100,"minLength":1,"type":"string"},"parent_id":{"description":"Send 0 to move to root.","format":"int64","type":"integer"},"position":{"format":"int64","type":"integer"},"slug":{"maxLength":100,"minLength":1,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"}},"type":"object"},"UpdateMediaBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v2/schemas/UpdateMediaBody.json"],"format":"uri","readOnly":true,"type":"string"},"alt":{"type":"string"},"caption":{"type":"string"},"filename":{"maxLength":255,"minLength":1,"type":"string"},"folder_id":{"description":"Send 0 or null to move to root.","format":"int64","type":["integer","null"]}},"type":"object"},"UpdatePageBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v2/schemas/UpdatePageBody.json"],"format":"uri","readOnly":true,"type":"string"},"body":{"type":"string"},"canonical_url":{"format":"uri-reference","maxLength":2048,"type":"string"},"category_ids":{"items":{"format":"int64","type":"integer"},"type":"array"},"exclude_from_lists":{"type":"boolean"},"featured_image_id":{"format":"int64","type":"integer"},"hide_featured_image":{"type":"boolean"},"meta_description":{"type":"string"},"meta_keywords":{"type":"string"},"meta_title":{"type":"string"},"no_follow":{"type":"boolean"},"no_index":{"type":"boolean"},"og_image_id":{"format":"int64","type":"integer"},"page_type":{"enum":["post","page"],"type":"string"},"scheduled_at":{"format":"date-time","type":"string"},"slug":{"maxLength":255,"minLength":1,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"},"status":{"enum":["draft","published"],"type":"string"},"summary":{"maxLength":500,"type":"string"},"tag_ids":{"items":{"format":"int64","type":"integer"},"type":"array"},"tags":{"items":{"type":"string"},"type":"array"},"title":{"maxLength":255,"minLength":1,"type":"string"},"video_title":{"type":"string"},"video_url":{"format":"uri-reference","maxLength":2048,"type":"string"}},"type":"object"},"UpdateTagBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v2/schemas/UpdateTagBody.json"],"format":"uri","readOnly":true,"type":"string"},"language_code":{"type":"string"},"name":{"maxLength":100,"minLength":1,"type":"string"},"slug":{"maxLength":100,"minLength":1,"pattern":"^[a-z0-9]+(?:-[a-z0-9]+)*$","type":"string"}},"type":"object"},"UploadBatchOutputBody":{"additionalProperties":false,"properties":{"$schema":{"description":"A URL to the JSON Schema for this object.","examples":["/api/v2/schemas/UploadBatchOutputBody.json"],"format":"uri","readOnly":true,"type":"string"},"data":{"$ref":"#/components/schemas/DataStruct"}},"required":["data"],"type":"object"},"UploadError":{"additionalProperties":false,"properties":{"error":{"type":"string"},"filename":{"type":"string"}},"required":["filename","error"],"type":"object"},"Variant":{"additionalProperties":false,"properties":{"created_at":{"format":"date-time","type":"string"},"height":{"format":"int64","type":"integer"},"id":{"format":"int64","type":"integer"},"size":{"format":"int64","type":"integer"},"type":{"description":"Variant kind (thumbnail / medium / large).","type":"string"},"url":{"type":"string"},"width":{"format":"int64","type":"integer"}},"required":["id","type","width","height","size","url","created_at"],"type":"object"}},"securitySchemes":{"ApiKeyAuth":{"bearerFormat":"API key","description":"API key issued from /admin/api-keys. Send as `Authorization: Bearer \u003ckey\u003e`.","scheme":"bearer","type":"http"}}},"info":{"description":"REST API v2 for oCMS. Spec generated from Go types via huma v2 — requests and responses match the handler implementation exactly.","license":{"identifier":"GPL-3.0-or-later","name":"GPL-3.0-or-later"},"title":"oCMS REST API","version":"2.0.0"},"openapi":"3.1.0","paths":{"/auth":{"get":{"description":"Returns the prefix, name, and permissions of the API key that authenticated the request.","operationId":"auth","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[{"ApiKeyAuth":[]}],"summary":"Authenticated API key info","tags":["Meta"]}},"/categories":{"get":{"description":"Defaults to a nested tree (parent → children). Pass `flat=true` for a flat list.","operationId":"listCategories","parameters":[{"description":"Return a flat list instead of a nested tree.","explode":false,"in":"query","name":"flat","schema":{"description":"Return a flat list instead of a nested tree.","type":"boolean"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListCategoriesOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[],"summary":"List categories","tags":["Categories"]},"post":{"description":"Requires the `taxonomy:write` permission.","operationId":"createCategory","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCategoryBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryOutputBody"}}},"description":"Created"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[{"ApiKeyAuth":["taxonomy:write"]}],"summary":"Create a category","tags":["Categories"]}},"/categories/{id}":{"delete":{"description":"Requires the `taxonomy:write` permission. Returns 409 if child categories still exist.","operationId":"deleteCategory","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"int64","minimum":1,"type":"integer"}}],"responses":{"204":{"description":"No Content"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[{"ApiKeyAuth":["taxonomy:write"]}],"summary":"Delete a category","tags":["Categories"]},"get":{"description":"Includes direct children; does NOT recurse grandchildren.","operationId":"getCategory","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"int64","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[],"summary":"Get category by ID","tags":["Categories"]},"put":{"description":"Requires the `taxonomy:write` permission. Circular parent references are rejected.","operationId":"updateCategory","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"int64","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCategoryBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CategoryOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[{"ApiKeyAuth":["taxonomy:write"]}],"summary":"Update a category","tags":["Categories"]}},"/media":{"get":{"description":"Returns a paginated list of media. Use `type`, `folder`, or `search` to narrow the result set.","operationId":"listMedia","parameters":[{"explode":false,"in":"query","name":"page","schema":{"default":1,"format":"int64","minimum":1,"type":"integer"}},{"explode":false,"in":"query","name":"per_page","schema":{"default":20,"format":"int64","maximum":100,"minimum":1,"type":"integer"}},{"description":"Filter by media kind.","explode":false,"in":"query","name":"type","schema":{"description":"Filter by media kind.","enum":["image","document","video"],"type":"string"}},{"description":"Restrict to this folder id.","explode":false,"in":"query","name":"folder","schema":{"description":"Restrict to this folder id.","format":"int64","type":"integer"}},{"description":"Fuzzy match against filename / alt text.","explode":false,"in":"query","name":"search","schema":{"description":"Fuzzy match against filename / alt text.","type":"string"}},{"description":"Comma-separated relations: variants, folder, translations.","explode":false,"in":"query","name":"include","schema":{"description":"Comma-separated relations: variants, folder, translations.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListMediaOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[{"ApiKeyAuth":[]},{}],"summary":"List media","tags":["Media"]},"post":{"description":"Requires `media:write`. For multiple files use `POST /media/batch`.","operationId":"uploadMedia","requestBody":{"content":{"multipart/form-data":{"encoding":{"alt":{"contentType":"text/plain"},"caption":{"contentType":"text/plain"},"file":{"contentType":"application/octet-stream,image/*,application/pdf,video/*"},"folder_id":{"contentType":"text/plain"}},"schema":{"properties":{"alt":{"type":"string"},"caption":{"type":"string"},"file":{"contentEncoding":"binary","contentMediaType":"application/octet-stream","format":"binary","type":"string"},"folder_id":{"type":"string"}},"required":["file","folder_id","alt","caption"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaOutputBody"}}},"description":"Created"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[{"ApiKeyAuth":["media:write"]}],"summary":"Upload a single media file","tags":["Media"]}},"/media/batch":{"post":{"description":"Requires `media:write`. Per-file errors are returned in `data.errors`; at least one file must succeed.","operationId":"uploadMediaBatch","requestBody":{"content":{"multipart/form-data":{"encoding":{"alt":{"contentType":"text/plain"},"caption":{"contentType":"text/plain"},"files":{"contentType":"application/octet-stream,image/*,application/pdf,video/*"},"folder_id":{"contentType":"text/plain"}},"schema":{"properties":{"alt":{"type":"string"},"caption":{"type":"string"},"files":{"items":{"contentEncoding":"binary","contentMediaType":"application/octet-stream","format":"binary","type":"string"},"type":"array"},"folder_id":{"type":"string"}},"required":["files","folder_id","alt","caption"],"type":"object"}}}},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UploadBatchOutputBody"}}},"description":"Created"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[{"ApiKeyAuth":["media:write"]}],"summary":"Upload multiple media files","tags":["Media"]}},"/media/{id}":{"delete":{"description":"Requires `media:write`. Removes the stored file, all generated variants, and the database row.","operationId":"deleteMedia","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"int64","minimum":1,"type":"integer"}}],"responses":{"204":{"description":"No Content"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[{"ApiKeyAuth":["media:write"]}],"summary":"Delete media","tags":["Media"]},"get":{"operationId":"getMedia","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"int64","minimum":1,"type":"integer"}},{"explode":false,"in":"query","name":"include","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[{"ApiKeyAuth":[]},{}],"summary":"Get media by ID","tags":["Media"]},"put":{"description":"Requires `media:write`. Pass `folder_id: 0` or null to move the item to the root folder.","operationId":"updateMedia","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"int64","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateMediaBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MediaOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[{"ApiKeyAuth":["media:write"]}],"summary":"Update media metadata","tags":["Media"]}},"/pages":{"get":{"description":"Returns a paginated list of pages. Unauthenticated and non-pages:read keys receive only published pages.","operationId":"listPages","parameters":[{"description":"1-indexed page number.","explode":false,"in":"query","name":"page","schema":{"default":1,"description":"1-indexed page number.","format":"int64","minimum":1,"type":"integer"}},{"description":"Items per page (max 100).","explode":false,"in":"query","name":"per_page","schema":{"default":20,"description":"Items per page (max 100).","format":"int64","maximum":100,"minimum":1,"type":"integer"}},{"description":"Filter by page status. Requires pages:read for non-published.","explode":false,"in":"query","name":"status","schema":{"description":"Filter by page status. Requires pages:read for non-published.","enum":["draft","published"],"type":"string"}},{"description":"Restrict results to this category id.","explode":false,"in":"query","name":"category","schema":{"description":"Restrict results to this category id.","format":"int64","type":"integer"}},{"description":"Restrict results to this tag id.","explode":false,"in":"query","name":"tag","schema":{"description":"Restrict results to this tag id.","format":"int64","type":"integer"}},{"description":"Comma-separated relations to populate: author, categories, tags.","explode":false,"in":"query","name":"include","schema":{"description":"Comma-separated relations to populate: author, categories, tags.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListPagesOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[{"ApiKeyAuth":[]},{}],"summary":"List pages","tags":["Pages"]},"post":{"description":"Requires the `pages:write` permission. Creates a page with optional category / tag links in a single transaction.","operationId":"createPage","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatePageBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageOutputBody"}}},"description":"Created"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[{"ApiKeyAuth":["pages:write"]}],"summary":"Create a page","tags":["Pages"]}},"/pages/slug/{slug}":{"get":{"operationId":"getPageBySlug","parameters":[{"in":"path","name":"slug","required":true,"schema":{"minLength":1,"type":"string"}},{"explode":false,"in":"query","name":"include","schema":{"type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[{"ApiKeyAuth":[]},{}],"summary":"Get page by slug","tags":["Pages"]}},"/pages/{id}":{"delete":{"description":"Requires the `pages:write` permission. Cascades to page categories, tags, and versions.","operationId":"deletePage","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"int64","minimum":1,"type":"integer"}}],"responses":{"204":{"description":"No Content"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[{"ApiKeyAuth":["pages:write"]}],"summary":"Delete a page","tags":["Pages"]},"get":{"operationId":"getPage","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"int64","minimum":1,"type":"integer"}},{"description":"Comma-separated relations to populate: author, categories, tags.","explode":false,"in":"query","name":"include","schema":{"description":"Comma-separated relations to populate: author, categories, tags.","type":"string"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[{"ApiKeyAuth":[]},{}],"summary":"Get page by ID","tags":["Pages"]},"put":{"description":"Requires the `pages:write` permission. Only provided fields are modified; nullable columns can be cleared by sending null.","operationId":"updatePage","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"int64","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdatePageBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PageOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[{"ApiKeyAuth":["pages:write"]}],"summary":"Update a page","tags":["Pages"]}},"/status":{"get":{"description":"Lightweight liveness check. Public, no authentication required.","operationId":"status","responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[],"summary":"API status","tags":["Meta"]}},"/tags":{"get":{"operationId":"listTags","parameters":[{"explode":false,"in":"query","name":"page","schema":{"default":1,"format":"int64","minimum":1,"type":"integer"}},{"explode":false,"in":"query","name":"per_page","schema":{"default":50,"format":"int64","maximum":100,"minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ListTagsOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[],"summary":"List tags","tags":["Tags"]},"post":{"description":"Requires the `taxonomy:write` permission.","operationId":"createTag","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTagBody"}}},"required":true},"responses":{"201":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagOutputBody"}}},"description":"Created"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[{"ApiKeyAuth":["taxonomy:write"]}],"summary":"Create a tag","tags":["Tags"]}},"/tags/{id}":{"delete":{"description":"Requires the `taxonomy:write` permission.","operationId":"deleteTag","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"int64","minimum":1,"type":"integer"}}],"responses":{"204":{"description":"No Content"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[{"ApiKeyAuth":["taxonomy:write"]}],"summary":"Delete a tag","tags":["Tags"]},"get":{"operationId":"getTag","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"int64","minimum":1,"type":"integer"}}],"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[],"summary":"Get tag by ID","tags":["Tags"]},"put":{"description":"Requires the `taxonomy:write` permission.","operationId":"updateTag","parameters":[{"in":"path","name":"id","required":true,"schema":{"format":"int64","minimum":1,"type":"integer"}}],"requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTagBody"}}},"required":true},"responses":{"200":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TagOutputBody"}}},"description":"OK"},"default":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/StatusError"}}},"description":"Error"}},"security":[{"ApiKeyAuth":["taxonomy:write"]}],"summary":"Update a tag","tags":["Tags"]}}},"servers":[{"url":"/api/v2"}]}
