{"openapi":"3.1.0","info":{"title":"Saywick API","version":"1.0.0","description":"Manage sites, posts, pages, media and AI jobs. See docs/API.md."},"servers":[{"url":"https://app.saywick.com/api/v1"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"sw_live_… API key"}}},"paths":{"/sites":{"get":{"summary":"List the sites this key can access","description":"Requires the `sites:read` scope.","security":[{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","active","suspended"]},"primaryDomain":{"type":["string","null"]},"domains":{"type":"array","items":{"type":"string"}},"previewUrl":{"type":"string"},"url":{"type":"string"},"client":{"type":["string","null"]}},"required":["id","name","slug","status","primaryDomain","domains","previewUrl","url","client"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"summary":"Generate a new site from a brief (returns the job; also needs ai:generate)","description":"Requires the `sites:write` scope. Supports `Idempotency-Key`.","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","maxLength":80},"description":{"type":"string","minLength":10,"maxLength":4000},"audience":{"type":"string","maxLength":1000},"tone":{"type":"string","maxLength":300},"client":{"type":"string","minLength":1,"maxLength":200},"direction":{"type":"string","maxLength":60},"colors":{"type":"object","properties":{"brand":{"type":"string","pattern":"^#[0-9a-f]{6}$"},"accent":{"type":"string","pattern":"^#[0-9a-f]{6}$"}},"required":["brand"]}},"required":["description"]}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","cancelled"]},"step":{"type":["string","null"]},"error":{"type":["string","null"]},"siteId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","type","status","step","error","siteId","postId","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/sites/{siteId}/design":{"post":{"summary":"Have the Design Agent change the theme and a page (drafts; also needs ai:generate)","description":"Requires the `pages:write` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"instruction":{"type":"string","minLength":1,"maxLength":2000},"page":{"default":"/","type":"string","maxLength":200}},"required":["instruction"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"summary":{"type":"string"},"operations":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"page":{"type":"string"},"previewUrl":{"type":["string","null"]}},"required":["summary","operations","page","previewUrl"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/sites/{siteId}/design-notes":{"put":{"summary":"Set the site's standing design instructions","description":"Requires the `pages:write` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"notes":{"type":"string","maxLength":2000}},"required":["notes"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"notes":{"type":"string","maxLength":2000}},"required":["notes"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/sites/{siteId}/publish":{"post":{"summary":"Publish the theme and page drafts (taking a draft site live also needs sites:write)","description":"Requires the `pages:write` scope. Supports `Idempotency-Key`.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"note":{"type":"string","maxLength":500}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"themePublished":{"type":"boolean"},"pagesPublished":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"siteStatus":{"type":"string","enum":["draft","active","suspended"]},"url":{"type":"string"}},"required":["themePublished","pagesPublished","siteStatus","url"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/pages/{pageId}":{"get":{"summary":"Get a page with its current blocks (the draft if there is one) and a guide for writing them","description":"Requires the `pages:read` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"pageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"path":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","published"]},"hasUnpublishedChanges":{"type":"boolean"},"updatedAt":{"type":"string"},"blocks":{"type":"array","items":{}},"previewUrl":{"type":["string","null"]},"guide":{"type":"object","properties":{"businessKind":{"type":"string"},"mustCover":{"type":"array","items":{"type":"string"}},"usualSections":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"usualPages":{"type":"array","items":{"type":"string"}},"designNotes":{"type":["string","null"]},"houseStyle":{"type":["string","null"]},"rules":{"type":"array","items":{"type":"string"}}},"required":["businessKind","mustCover","usualSections","usualPages","designNotes","houseStyle","rules"],"additionalProperties":false}},"required":["id","path","title","status","hasUnpublishedChanges","updatedAt","blocks","previewUrl","guide"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"summary":"Change a page's title, path, menu visibility and order, or search text","description":"Requires the `pages:write` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"pageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"path":{"type":"string","minLength":1,"maxLength":200},"showInNav":{"type":"boolean"},"sortOrder":{"type":"integer","minimum":0,"maximum":1000},"seoTitle":{"type":"string","maxLength":120},"seoDescription":{"type":"string","maxLength":300}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"path":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","published"]},"hasUnpublishedChanges":{"type":"boolean"},"updatedAt":{"type":"string"},"showInNav":{"type":"boolean"},"sortOrder":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","path","title","status","hasUnpublishedChanges","updatedAt","showInNav","sortOrder"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"summary":"Delete a page (not the home page); it goes to the site's trash for 30 days","description":"Requires the `pages:write` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"pageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"deleted":{"type":"boolean","const":true},"path":{"type":"string"}},"required":["deleted","path"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/pages/{pageId}/blocks":{"put":{"summary":"Replace a page's draft blocks; returns free design checks on the result","description":"Requires the `pages:write` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"pageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"blocks":{"minItems":1,"maxItems":30,"type":"array","items":{}}},"required":["blocks"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"path":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","published"]},"hasUnpublishedChanges":{"type":"boolean"},"updatedAt":{"type":"string"},"blocks":{"type":"array","items":{}},"previewUrl":{"type":["string","null"]},"checks":{"type":"array","items":{"type":"string"}}},"required":["id","path","title","status","hasUnpublishedChanges","updatedAt","blocks","previewUrl","checks"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/pages/{pageId}/versions":{"get":{"summary":"List a page's published versions, newest first, with what changed in each","description":"Requires the `pages:read` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"pageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"},"createdAt":{"type":"string"},"by":{"type":"object","properties":{"kind":{"type":"string","enum":["person","api","automatic","earlier"]},"name":{"type":["string","null"]}},"required":["kind","name"],"additionalProperties":false},"sections":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"summary":{"type":"string"},"live":{"type":"boolean"}},"required":["version","title","createdAt","by","sections","summary","live"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/pages/{pageId}/versions/{version}/restore":{"post":{"summary":"Put an earlier version of a page back into its draft","description":"Requires the `pages:write` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"pageId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"restored":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"live":{"type":"boolean","const":false}},"required":["restored","live"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/jobs/bulk":{"post":{"summary":"Start one AI Writer job per item (up to 25), all landing in Review","description":"Requires the `ai:generate` scope. Supports `Idempotency-Key`.","security":[{"apiKey":[]}],"parameters":[{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"site":{"type":"string","minLength":1,"maxLength":200},"topic":{"type":"string","minLength":5,"maxLength":500},"keywords":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"notes":{"type":"string","maxLength":2000}},"required":["site","topic"]}},"length":{"default":"medium","type":"string","enum":["short","medium","long"]},"research":{"default":true,"type":"boolean"},"cover":{"default":"stock","type":"string","enum":["stock","ai","none"]}},"required":["items"]}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","cancelled"]},"step":{"type":["string","null"]},"error":{"type":["string","null"]},"siteId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","type","status","step","error","siteId","postId","createdAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/posts/{postId}/approval":{"post":{"summary":"Email the client a link to approve the post or ask for changes","description":"Requires the `posts:write` scope. Supports `Idempotency-Key`.","security":[{"apiKey":[]}],"parameters":[{"name":"postId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"message":{"type":"string","maxLength":2000}},"required":["email"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"postId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"email":{"type":"string"},"status":{"type":"string","enum":["pending","approved","changes_requested","revoked"]},"expiresAt":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","postId","email","status","expiresAt","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/sites/{siteId}":{"get":{"summary":"Get a site","description":"Requires the `sites:read` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","active","suspended"]},"primaryDomain":{"type":["string","null"]},"domains":{"type":"array","items":{"type":"string"}},"previewUrl":{"type":"string"},"url":{"type":"string"},"client":{"type":["string","null"]}},"required":["id","name","slug","status","primaryDomain","domains","previewUrl","url","client"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"summary":"Rename a site, file it under a client, or take it live or offline","description":"Requires the `sites:write` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["draft","active"]},"client":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","active","suspended"]},"primaryDomain":{"type":["string","null"]},"domains":{"type":"array","items":{"type":"string"}},"previewUrl":{"type":"string"},"url":{"type":"string"},"client":{"type":["string","null"]}},"required":["id","name","slug","status","primaryDomain","domains","previewUrl","url","client"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/sites/{siteId}/settings":{"get":{"summary":"Get a site's settings and the menu visitors see","description":"Requires the `sites:read` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"menu":{"type":"object","properties":{"source":{"type":"string","enum":["custom","automatic"]},"links":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"href":{"type":"string"}},"required":["label","href"],"additionalProperties":false}}},"required":["source","links"],"additionalProperties":false}},"required":["settings","menu"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"summary":"Replace settings sections (menu, footer, SEO, social…); null clears one. Live at once","description":"Requires the `pages:write` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"settings":{"type":"object","propertyNames":{"type":"string","enum":["seo","logo","nav","headerCta","footer","social","analytics","blog","business","legal","approval"]},"additionalProperties":{}}},"required":["settings"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"menu":{"type":"object","properties":{"source":{"type":"string","enum":["custom","automatic"]},"links":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string"},"href":{"type":"string"}},"required":["label","href"],"additionalProperties":false}}},"required":["source","links"],"additionalProperties":false}},"required":["settings","menu"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/sites/{siteId}/design/versions":{"get":{"summary":"List the site design's published versions","description":"Requires the `pages:read` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"note":{"type":["string","null"]},"createdAt":{"type":"string"},"live":{"type":"boolean"}},"required":["version","note","createdAt","live"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/sites/{siteId}/design/versions/{version}/restore":{"post":{"summary":"Put an earlier design back into the draft","description":"Requires the `pages:write` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"version","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"restored":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"live":{"type":"boolean","const":false}},"required":["restored","live"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/sites/{siteId}/domains":{"get":{"summary":"List a site's custom domains with the DNS records still needed","description":"Requires the `sites:read` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"hostname":{"type":"string"},"status":{"type":"string"},"https":{"type":"string"},"isPrimary":{"type":"boolean"},"readyToSwitch":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"value":{"type":"string"}},"required":["type","name","value"],"additionalProperties":false}},"lastError":{"type":["string","null"]}},"required":["id","hostname","status","https","isPrimary","readyToSwitch","records","lastError"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"summary":"Connect a domain bought elsewhere (and its www); returns the DNS records to add","description":"Requires the `sites:write` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"hostname":{"type":"string","minLength":1,"maxLength":253},"includeWww":{"default":true,"type":"boolean"}},"required":["hostname"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"hostname":{"type":"string"},"status":{"type":"string"},"https":{"type":"string"},"isPrimary":{"type":"boolean"},"readyToSwitch":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"value":{"type":"string"}},"required":["type","name","value"],"additionalProperties":false}},"lastError":{"type":["string","null"]}},"required":["id","hostname","status","https","isPrimary","readyToSwitch","records","lastError"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/sites/{siteId}/domains/{hostname}":{"delete":{"summary":"Disconnect a domain from the site","description":"Requires the `sites:write` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"hostname","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"hostname":{"type":"string"},"result":{"type":"string","enum":["removed","removing"]}},"required":["hostname","result"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/sites/{siteId}/domains/{hostname}/check":{"post":{"summary":"Check the domain's DNS again now","description":"Requires the `sites:write` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"hostname","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"hostname":{"type":"string"},"checking":{"type":"boolean","const":true}},"required":["hostname","checking"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/sites/{siteId}/domains/{hostname}/primary":{"post":{"summary":"Make a live domain the main address (the others redirect to it)","description":"Requires the `sites:write` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"hostname","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"hostname":{"type":"string"},"status":{"type":"string"},"https":{"type":"string"},"isPrimary":{"type":"boolean"},"readyToSwitch":{"type":"boolean"},"records":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"},"value":{"type":"string"}},"required":["type","name","value"],"additionalProperties":false}},"lastError":{"type":["string","null"]}},"required":["id","hostname","status","https","isPrimary","readyToSwitch","records","lastError"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/sites/{siteId}/forms":{"get":{"summary":"List a site's forms with submission counts","description":"Requires the `forms:read` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"submissions":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"lastSubmissionAt":{"type":["string","null"]}},"required":["id","name","submissions","lastSubmissionAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/clients":{"get":{"summary":"List clients and their sites","description":"Requires the `sites:read` scope.","security":[{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"email":{"type":["string","null"]},"sites":{"type":"array","items":{"type":"string"}}},"required":["id","name","email","sites"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"summary":"Add a client (keys limited to specific sites can't)","description":"Requires the `sites:write` scope.","security":[{"apiKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"notes":{"type":"string","maxLength":2000}},"required":["name"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"name":{"type":"string"},"email":{"type":["string","null"]},"sites":{"type":"array","items":{"type":"string"}}},"required":["id","name","email","sites"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/sites/{siteId}/posts":{"get":{"summary":"List a site's posts","description":"Requires the `posts:read` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"status","in":"query","description":"draft | review | scheduled | published | archived","schema":{"type":"string"}},{"name":"limit","in":"query","description":"1-100 (default 20)","schema":{"type":"string"}},{"name":"offset","in":"query","description":"default 0","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"siteId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","review","scheduled","published","archived"]},"excerpt":{"type":["string","null"]},"bodyMd":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"publishedAt":{"type":["string","null"]},"updatedAt":{"type":"string"},"url":{"type":["string","null"]},"generatedBy":{"type":"string"}},"required":["id","siteId","title","slug","status","excerpt","tags","seo","publishedAt","updatedAt","url","generatedBy"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"summary":"Create a post (in review by default)","description":"Requires the `posts:write` scope. Supports `Idempotency-Key`.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"slug":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"bodyMd":{"default":"","type":"string","maxLength":200000},"excerpt":{"type":"string","maxLength":500},"tags":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"seo":{"type":"object","properties":{"title":{"type":"string","maxLength":120},"description":{"type":"string","maxLength":300}}},"coverMediaId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"status":{"default":"review","type":"string","enum":["draft","review"]}},"required":["title"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"siteId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","review","scheduled","published","archived"]},"excerpt":{"type":["string","null"]},"bodyMd":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"publishedAt":{"type":["string","null"]},"updatedAt":{"type":"string"},"url":{"type":["string","null"]},"generatedBy":{"type":"string"}},"required":["id","siteId","title","slug","status","excerpt","tags","seo","publishedAt","updatedAt","url","generatedBy"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/posts/{postId}":{"get":{"summary":"Get a post with its markdown","description":"Requires the `posts:read` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"postId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"siteId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","review","scheduled","published","archived"]},"excerpt":{"type":["string","null"]},"bodyMd":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"publishedAt":{"type":["string","null"]},"updatedAt":{"type":"string"},"url":{"type":["string","null"]},"generatedBy":{"type":"string"}},"required":["id","siteId","title","slug","status","excerpt","tags","seo","publishedAt","updatedAt","url","generatedBy"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"summary":"Update a post","description":"Requires the `posts:write` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"postId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"slug":{"type":"string","minLength":1,"maxLength":120,"pattern":"^[a-z0-9]+(-[a-z0-9]+)*$"},"bodyMd":{"type":"string","maxLength":200000},"excerpt":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]},"tags":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"seo":{"type":"object","properties":{"title":{"type":"string","maxLength":120},"description":{"type":"string","maxLength":300}}},"coverMediaId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"status":{"type":"string","enum":["draft","review"]}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"siteId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","review","scheduled","published","archived"]},"excerpt":{"type":["string","null"]},"bodyMd":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"publishedAt":{"type":["string","null"]},"updatedAt":{"type":"string"},"url":{"type":["string","null"]},"generatedBy":{"type":"string"}},"required":["id","siteId","title","slug","status","excerpt","tags","seo","publishedAt","updatedAt","url","generatedBy"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"summary":"Archive a post","description":"Requires the `posts:write` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"postId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"siteId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","review","scheduled","published","archived"]},"excerpt":{"type":["string","null"]},"bodyMd":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"publishedAt":{"type":["string","null"]},"updatedAt":{"type":"string"},"url":{"type":["string","null"]},"generatedBy":{"type":"string"}},"required":["id","siteId","title","slug","status","excerpt","tags","seo","publishedAt","updatedAt","url","generatedBy"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/posts/{postId}/publish":{"post":{"summary":"Publish now, or schedule with publishAt (needs the site's API publishing setting)","description":"Requires the `posts:publish` scope. Supports `Idempotency-Key`.","security":[{"apiKey":[]}],"parameters":[{"name":"postId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","default":{},"type":"object","properties":{"publishAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"siteId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"slug":{"type":"string"},"status":{"type":"string","enum":["draft","review","scheduled","published","archived"]},"excerpt":{"type":["string","null"]},"bodyMd":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"seo":{"type":"object","properties":{"title":{"type":"string"},"description":{"type":"string"}},"additionalProperties":false},"publishedAt":{"type":["string","null"]},"updatedAt":{"type":"string"},"url":{"type":["string","null"]},"generatedBy":{"type":"string"}},"required":["id","siteId","title","slug","status","excerpt","tags","seo","publishedAt","updatedAt","url","generatedBy"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/sites/{siteId}/pages":{"get":{"summary":"List a site's pages","description":"Requires the `pages:read` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"path":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","published"]},"hasUnpublishedChanges":{"type":"boolean"},"updatedAt":{"type":"string"}},"required":["id","path","title","status","hasUnpublishedChanges","updatedAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"summary":"Add a page (its content is a draft until published)","description":"Requires the `pages:write` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":300},"path":{"type":"string","minLength":1,"maxLength":200},"blocks":{"minItems":1,"maxItems":30,"type":"array","items":{}},"showInNav":{"default":true,"type":"boolean"}},"required":["title","path"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"path":{"type":"string"},"title":{"type":"string"},"status":{"type":"string","enum":["draft","published"]},"hasUnpublishedChanges":{"type":"boolean"},"updatedAt":{"type":"string"},"showInNav":{"type":"boolean"},"sortOrder":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","path","title","status","hasUnpublishedChanges","updatedAt","showInNav","sortOrder"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/sites/{siteId}/media":{"get":{"summary":"List a site's uploaded images, newest first","description":"Requires the `pages:read` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"alt":{"type":["string","null"]},"mime":{"type":"string"},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"origin":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","url","alt","mime","width","height","origin","createdAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"summary":"Create a media record and a signed upload URL (PUT the file there)","description":"Requires the `media:write` scope. Supports `Idempotency-Key`.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"filename":{"type":"string","minLength":1,"maxLength":200},"contentType":{"type":"string","enum":["image/png","image/jpeg","image/webp","image/gif","image/avif","video/mp4","video/webm","application/pdf"]},"size":{"type":"integer","minimum":1,"maximum":52428800},"alt":{"type":"string","maxLength":300}},"required":["filename","contentType","size"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"alt":{"type":["string","null"]},"upload":{"type":"object","properties":{"url":{"type":"string"},"method":{"type":"string","const":"PUT"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["url","method","headers"],"additionalProperties":false}},"required":["id","url","alt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/sites/{siteId}/media/generate":{"post":{"summary":"Start making a new image with Saywick's image AI (also needs ai:generate; uses the AI allowance). Answers at once with the job; GET its statusUrl until it's done","description":"Requires the `media:write` scope. Supports `Idempotency-Key`.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"description":{"type":"string","minLength":3,"maxLength":1000},"style":{"default":"photo","type":"string","enum":["photo","illustration"]},"shape":{"default":"wide","type":"string","enum":["wide","square","tall","banner"]},"background":{"default":false,"type":"boolean"},"alt":{"type":"string","maxLength":300}},"required":["description"]}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"task":{"type":"string","enum":["create","edit"]},"status":{"type":"string","enum":["queued","running","succeeded","failed","cancelled"]},"step":{"type":["string","null"]},"error":{"type":["string","null"]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"alt":{"type":["string","null"]},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"origin":{"type":"string","enum":["upload","stock","ai","edit"]},"derivedFrom":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"method":{"type":"string","enum":["ai","adjust"]},"chargedUsd":{"type":"number"}},"required":["id","url","alt","width","height","origin","derivedFrom","method","chargedUsd"],"additionalProperties":false},{"type":"null"}]},"statusUrl":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","task","status","step","error","image","statusUrl","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/sites/{siteId}/media/edit":{"post":{"summary":"Start changing an image with the image AI: add, remove or restyle things (also needs ai:generate). Saves a new file; answers at once with the job; GET its statusUrl until it's done","description":"Requires the `media:write` scope. Supports `Idempotency-Key`.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"instruction":{"type":"string","minLength":3,"maxLength":1000},"image":{"type":"object","properties":{"mediaId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string","maxLength":2000,"format":"uri"}}}},"required":["instruction","image"]}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"task":{"type":"string","enum":["create","edit"]},"status":{"type":"string","enum":["queued","running","succeeded","failed","cancelled"]},"step":{"type":["string","null"]},"error":{"type":["string","null"]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"alt":{"type":["string","null"]},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"origin":{"type":"string","enum":["upload","stock","ai","edit"]},"derivedFrom":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"method":{"type":"string","enum":["ai","adjust"]},"chargedUsd":{"type":"number"}},"required":["id","url","alt","width","height","origin","derivedFrom","method","chargedUsd"],"additionalProperties":false},{"type":"null"}]},"statusUrl":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","task","status","step","error","image","statusUrl","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/sites/{siteId}/media/jobs/{jobId}":{"get":{"summary":"How a generate or edit is going: the new image when it succeeded, or what went wrong","description":"Requires the `media:write` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"task":{"type":"string","enum":["create","edit"]},"status":{"type":"string","enum":["queued","running","succeeded","failed","cancelled"]},"step":{"type":["string","null"]},"error":{"type":["string","null"]},"image":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"alt":{"type":["string","null"]},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"origin":{"type":"string","enum":["upload","stock","ai","edit"]},"derivedFrom":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"method":{"type":"string","enum":["ai","adjust"]},"chargedUsd":{"type":"number"}},"required":["id","url","alt","width","height","origin","derivedFrom","method","chargedUsd"],"additionalProperties":false},{"type":"null"}]},"statusUrl":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","task","status","step","error","image","statusUrl","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/sites/{siteId}/media/adjust":{"post":{"summary":"Brightness, contrast, color, flip, rotate or crop an image without AI (free). Saves a new file","description":"Requires the `media:write` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"image":{"type":"object","properties":{"mediaId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string","maxLength":2000,"format":"uri"}}},"adjustments":{"type":"object","properties":{"brightness":{"default":0,"type":"number","minimum":-0.5,"maximum":0.5},"contrast":{"default":0,"type":"number","minimum":-0.5,"maximum":0.5},"saturation":{"default":0,"type":"number","minimum":-1,"maximum":1},"warmth":{"default":0,"type":"number","minimum":-0.5,"maximum":0.5},"flip":{"default":false,"type":"boolean"},"rotate":{"default":"none","type":"string","enum":["none","left","right","half"]},"crop":{"default":"original","type":"string","enum":["original","wide","square","tall","banner"]}}}},"required":["image","adjustments"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"url":{"type":"string"},"alt":{"type":["string","null"]},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"origin":{"type":"string","enum":["upload","stock","ai","edit"]},"derivedFrom":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"method":{"type":"string","enum":["ai","adjust"]},"chargedUsd":{"type":"number"}},"required":["id","url","alt","width","height","origin","derivedFrom","method","chargedUsd"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/sites/{siteId}/jobs":{"post":{"summary":"Start an AI job (write_post)","description":"Requires the `ai:generate` scope. Supports `Idempotency-Key`.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"Idempotency-Key","in":"header","schema":{"type":"string","maxLength":255}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"write_post"},"topic":{"type":"string","minLength":5,"maxLength":500},"keywords":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"audience":{"type":"string","maxLength":300},"length":{"default":"medium","type":"string","enum":["short","medium","long"]},"research":{"default":true,"type":"boolean"},"notes":{"type":"string","maxLength":2000},"cover":{"default":"stock","type":"string","enum":["stock","ai","none"]}},"required":["type","topic"]}]}}}},"responses":{"202":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","cancelled"]},"step":{"type":["string","null"]},"error":{"type":["string","null"]},"siteId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","type","status","step","error","siteId","postId","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/hooks":{"post":{"summary":"Subscribe a URL to an event (post.published needs posts:read, form.submitted forms:read)","description":"Requires one of `posts:read`, `forms:read`.","security":[{"apiKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"event":{"type":"string","enum":["post.published","form.submitted"]},"targetUrl":{"type":"string","maxLength":2000,"pattern":"^https?:\\/\\/"},"siteId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}},"required":["event","targetUrl"]}}}},"responses":{"201":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"event":{"type":"string","enum":["post.published","form.submitted"]},"targetUrl":{"type":"string"},"siteId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"secret":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","event","targetUrl","siteId","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/hooks/{hookId}":{"delete":{"summary":"Unsubscribe (only the key that created the hook)","description":"Requires one of `posts:read`, `forms:read`.","security":[{"apiKey":[]}],"parameters":[{"name":"hookId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/posts/published":{"get":{"summary":"The newest published posts across the key's sites (webhook samples)","description":"Requires the `posts:read` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"query","description":"optional","schema":{"type":"string"}},{"name":"limit","in":"query","description":"1-100 (default 10)","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"siteId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"title":{"type":"string"},"slug":{"type":"string"},"excerpt":{"type":["string","null"]},"tags":{"type":"array","items":{"type":"string"}},"publishedAt":{"type":["string","null"]},"url":{"type":["string","null"]}},"required":["id","siteId","title","slug","excerpt","tags","publishedAt","url"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/form-submissions":{"get":{"summary":"The newest form submissions across the key's sites","description":"Requires the `forms:read` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"siteId","in":"query","description":"optional","schema":{"type":"string"}},{"name":"formId","in":"query","description":"optional","schema":{"type":"string"}},{"name":"limit","in":"query","description":"1-100 (default 10)","schema":{"type":"string"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"siteId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"formId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"formName":{"type":["string","null"]},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"createdAt":{"type":"string"}},"required":["id","siteId","formId","formName","data","createdAt"],"additionalProperties":false}}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/jobs/{jobId}":{"get":{"summary":"Get a job's progress and result","description":"Requires the `ai:generate` scope.","security":[{"apiKey":[]}],"parameters":[{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"data":{"type":"object","properties":{"id":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"type":{"type":"string"},"status":{"type":"string","enum":["queued","running","succeeded","failed","cancelled"]},"step":{"type":["string","null"]},"error":{"type":["string","null"]},"siteId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"postId":{"anyOf":[{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},{"type":"null"}]},"createdAt":{"type":"string"}},"required":["id","type","status","step","error","siteId","postId","createdAt"],"additionalProperties":false}},"required":["data"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["unauthorized","forbidden","not_found","invalid_request","conflict","idempotency_conflict","rate_limited","quota_exceeded","internal"]},"message":{"type":"string"},"details":{}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}}}}