{"openapi":"3.0.3","info":{"title":"SoPresence API","version":"1.0.0","description":"Versioned, tenant-isolated API for the SoPresence platform. Browser clients use a session cookie + X-CSRF-Token; servers use API keys (Authorization: Bearer sos_live_...). All errors share one envelope."},"servers":[{"url":"/"}],"components":{"securitySchemes":{"session":{"type":"apiKey","in":"cookie","name":"sos_session"},"csrf":{"type":"apiKey","in":"header","name":"X-CSRF-Token"},"apiKey":{"type":"http","scheme":"bearer","description":"Organisation API key"}}},"paths":{"/v1/auth/app-link":{"get":{"summary":"Mobile: open an emailed sign-in link in the app, or offer the App Store / the website when the app is not installed (email clients do not open custom schemes directly)","tags":["Auth (mobile)"],"operationId":"Auth_appLink","security":[],"parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/native/magic-link/verify":{"post":{"summary":"Mobile: exchange a magic-link token for an access + refresh token pair (or an MFA challenge)","tags":["Auth (mobile)"],"operationId":"Auth_nativeVerify","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":20,"maxLength":200},"device":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"platform":{"type":"string","enum":["ios","android"]}},"required":["name","platform"]}},"required":["token","device"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/native/review-login":{"post":{"summary":"Mobile, App Store review only: sign in the one configured demo account with its review code. Answers 404 unless the server has it switched on.","tags":["Auth (mobile)"],"operationId":"Auth_nativeReviewLogin","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","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,}$"},"code":{"type":"string","minLength":16,"maxLength":200},"device":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"platform":{"type":"string","enum":["ios","android"]}},"required":["name","platform"]}},"required":["email","code","device"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/native/mfa/verify":{"post":{"summary":"Mobile: complete sign-in with a TOTP code","tags":["Auth (mobile)"],"operationId":"Auth_nativeMfa","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"challengeId":{"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)$"},"code":{"type":"string","pattern":"^\\d{6}$"},"device":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"platform":{"type":"string","enum":["ios","android"]}},"required":["name","platform"]}},"required":["challengeId","code","device"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/native/refresh":{"post":{"summary":"Mobile: rotate the refresh token and get a new access token. A reused refresh token revokes the session.","tags":["Auth (mobile)"],"operationId":"Auth_nativeRefresh","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"refreshToken":{"type":"string","minLength":20,"maxLength":200}},"required":["refreshToken"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/magic-link":{"post":{"summary":"Request a passwordless sign-in link (always 202; no account enumeration)","tags":["Auth"],"operationId":"Auth_requestMagicLink","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"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,}$"}},"required":["email"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/magic-link/verify":{"post":{"summary":"Exchange a magic-link token for a session (or an MFA challenge)","tags":["Auth"],"operationId":"Auth_verifyMagicLink","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":20,"maxLength":200}},"required":["token"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/mfa/verify":{"post":{"summary":"Complete sign-in with a TOTP code","tags":["Auth"],"operationId":"Auth_verifyMfa","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"challengeId":{"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)$"},"code":{"type":"string","pattern":"^\\d{6}$"}},"required":["challengeId","code"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/passkeys/login/options":{"post":{"summary":"Begin passkey sign-in","tags":["Auth"],"operationId":"Auth_passkeyLoginOptions","security":[],"parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/passkeys/login/verify":{"post":{"summary":"Complete passkey sign-in","tags":["Auth"],"operationId":"Auth_passkeyLoginVerify","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"challengeId":{"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)$"},"response":{"type":"object","additionalProperties":{}}},"required":["challengeId","response"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/csrf":{"get":{"summary":"CSRF token for this session (send as X-CSRF-Token on unsafe requests)","tags":["Auth"],"operationId":"Auth_csrf","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/me":{"get":{"summary":"Current user, memberships and effective permissions","tags":["Auth"],"operationId":"Auth_me","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"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)$"},"email":{"type":"string"},"displayName":{"nullable":true,"type":"string"},"mfaEnabled":{"type":"boolean"},"aiConsentVersion":{"nullable":true,"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","email","displayName","mfaEnabled"]},"memberships":{"type":"array","items":{"type":"object","properties":{"orgId":{"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)$"},"orgName":{"type":"string"},"role":{"type":"string","enum":["owner","admin","manager","editor","reviewer","viewer"]},"workspaceIds":{"nullable":true,"type":"array","items":{"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":["orgId","orgName","role","workspaceIds"]}},"permissions":{"type":"object","additionalProperties":{"type":"array","items":{"type":"string","enum":["org:read","org:update","org:delete","member:read","member:invite","member:update_role","member:remove","workspace:create","workspace:read","workspace:update","workspace:delete","brand:create","brand:read","brand:update","brand:delete","social_account:read","social_account:connect","social_account:disconnect","content:read","content:create","content:update","content:delete","content:submit","content:approve","content:schedule","content:publish","inbox:read","inbox:reply","analytics:read","ai:use","ai:configure","audit:read","security:read","api_key:manage","billing:read","publishing:pause","publishing:resume","billing:manage","privacy:export","privacy:delete"]}}}},"required":["user","memberships","permissions"]}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/ai-consent":{"post":{"summary":"Agree to (or withdraw from) sending your text to the AI providers. The phone app asks before any AI feature runs.","tags":["Auth"],"operationId":"Auth_aiConsent","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accept":{"type":"boolean"}},"required":["accept"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/logout":{"post":{"summary":"Sign out of this session","tags":["Auth"],"operationId":"Auth_logout","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/sessions":{"get":{"summary":"Active sessions (device management)","tags":["Auth"],"operationId":"Auth_listSessions","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/sessions/{id}":{"delete":{"summary":"Revoke one of your sessions","tags":["Auth"],"operationId":"Auth_revokeSession","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/sessions/revoke-others":{"post":{"summary":"Sign out everywhere else","tags":["Auth"],"operationId":"Auth_revokeOthers","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/mfa/totp/setup":{"post":{"summary":"Start authenticator-app MFA setup","tags":["Auth"],"operationId":"Auth_totpSetup","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/mfa/totp/confirm":{"post":{"summary":"Confirm MFA setup with a code; other sessions are signed out","tags":["Auth"],"operationId":"Auth_totpConfirm","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^\\d{6}$"}},"required":["code"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/passkeys/register/options":{"post":{"summary":"Begin adding a passkey","tags":["Auth"],"operationId":"Auth_passkeyRegisterOptions","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/passkeys/register/verify":{"post":{"summary":"Finish adding a passkey","tags":["Auth"],"operationId":"Auth_passkeyRegisterVerify","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"response":{"type":"object","additionalProperties":{}},"name":{"type":"string","maxLength":60}},"required":["response"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/organisations":{"post":{"summary":"Create an organisation (you become its owner)","tags":["Organisations"],"operationId":"Tenancy_create","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["business","individual","creator","agency"]}},"required":["name"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/invitations/accept":{"post":{"summary":"Accept an invitation sent to your email","tags":["Organisations"],"operationId":"Tenancy_accept","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":20,"maxLength":200}},"required":["token"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/organisation":{"get":{"summary":"Current organisation, plan and settings","tags":["Organisations"],"operationId":"Tenancy_get","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"org:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"patch":{"summary":"Update organisation name and security/AI/retention settings","tags":["Organisations"],"operationId":"Tenancy_update","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"org:update","x-step-up-mfa":true,"parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"settings":{"type":"object","properties":{"security":{"type":"object","properties":{"requireMfa":{"type":"boolean"}}},"ai":{"type":"object","properties":{"monthlyBudgetMicroUsd":{"type":"integer","minimum":0,"maximum":1000000000000}}},"retention":{"type":"object","properties":{"contentDays":{"type":"integer","minimum":30,"maximum":3650},"auditDays":{"type":"integer","minimum":365,"maximum":3650},"aiLogDays":{"type":"integer","minimum":7,"maximum":730},"inboxDays":{"type":"integer","minimum":30,"maximum":1825},"securityEventDays":{"type":"integer","minimum":180,"maximum":2555}}}}}}}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/workspaces":{"get":{"summary":"Workspaces you can access","tags":["Organisations"],"operationId":"Tenancy_workspaces","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"workspace:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"summary":"Create a workspace","tags":["Organisations"],"operationId":"Tenancy_createWorkspace","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"workspace:create","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120}},"required":["name"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/members":{"get":{"summary":"Organisation members","tags":["Team"],"operationId":"Tenancy_members","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"member:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/members/invitations":{"post":{"summary":"Invite a member (role cannot exceed your own)","tags":["Team"],"operationId":"Tenancy_invite","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"member:invite","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","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,}$"},"role":{"type":"string","enum":["owner","admin","manager","editor","reviewer","viewer"]},"workspaceIds":{"default":null,"nullable":true,"type":"array","items":{"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":["email","role"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/members/{id}":{"patch":{"summary":"Change a member role or workspace scope","tags":["Team"],"operationId":"Tenancy_updateMember","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"member:update_role","x-step-up-mfa":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"role":{"type":"string","enum":["owner","admin","manager","editor","reviewer","viewer"]},"workspaceIds":{"nullable":true,"type":"array","items":{"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":["role"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"delete":{"summary":"Remove a member","tags":["Team"],"operationId":"Tenancy_remove","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"member:remove","x-step-up-mfa":true,"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands":{"get":{"summary":"Brands you can access","tags":["Brands"],"operationId":"Brands_list","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"summary":"Create a brand in a workspace","tags":["Brands"],"operationId":"Brands_create","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:create","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"workspaceId":{"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","minLength":1,"maxLength":120}},"required":["workspaceId","name"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}":{"get":{"summary":"Brand with its BrandBrain, settings, strategy and preferences","tags":["Brands"],"operationId":"Brands_get","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:read","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/onboarding":{"post":{"summary":"Analyse onboarding answers, website and materials to build the BrandBrain","tags":["BrandBrain"],"operationId":"Brands_onboard","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:update","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"businessName":{"type":"string","minLength":1,"maxLength":120},"whatYouSell":{"default":"","type":"string","maxLength":2000},"problemSolved":{"default":"","type":"string","maxLength":2000},"customers":{"default":"","type":"string","maxLength":2000},"locations":{"default":"","type":"string","maxLength":500},"differentiators":{"default":"","type":"string","maxLength":2000},"objectives":{"default":[],"maxItems":11,"type":"array","items":{"type":"string","enum":["generate_leads","increase_sales","website_traffic","awareness","grow_followers","build_authority","promote_products","promote_events","engagement","personal_brand","product_launch"]}},"platforms":{"default":[],"maxItems":9,"type":"array","items":{"type":"string","enum":["linkedin","instagram","facebook","x","tiktok","youtube","pinterest","threads","google_business"]}},"websiteUrl":{"type":"string","maxLength":500,"format":"uri"},"materials":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","maxLength":20000}}},"required":["businessName"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/profile":{"put":{"summary":"Save an edited BrandBrain (creates a new version)","tags":["BrandBrain"],"operationId":"Brands_updateProfile","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:update","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"profile":{"type":"object","properties":{"summary":{"default":"","type":"string","maxLength":2000},"personality":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","maxLength":60}},"toneOfVoice":{"default":{"descriptors":[],"do":[],"dont":[]},"type":"object","properties":{"descriptors":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","maxLength":60}},"do":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","maxLength":300}},"dont":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","maxLength":300}}}},"audiences":{"default":[],"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"default":"","type":"string","maxLength":600},"painPoints":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","maxLength":300}},"goals":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","maxLength":300}}},"required":["name"]}},"products":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"default":"","type":"string","maxLength":1000},"benefits":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","maxLength":300}}},"required":["name"]}},"services":{"default":[],"maxItems":30,"type":"array","items":{"type":"string","maxLength":300}},"valuePropositions":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","maxLength":300}},"keyMessages":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","maxLength":300}},"differentiators":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","maxLength":300}},"topicsToDiscuss":{"default":[],"maxItems":30,"type":"array","items":{"type":"string","maxLength":300}},"topicsToAvoid":{"default":[],"maxItems":30,"type":"array","items":{"type":"string","maxLength":300}},"preferredTerminology":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"use":{"type":"string","minLength":1,"maxLength":80},"insteadOf":{"type":"string","maxLength":80}},"required":["use"]}},"vocabulary":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","maxLength":60}},"bannedPhrases":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","maxLength":120}},"approvedClaims":{"default":[],"maxItems":50,"type":"array","items":{"type":"string","maxLength":300}},"competitors":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"notes":{"default":"","type":"string","maxLength":500}},"required":["name"]}},"contentOpportunities":{"default":[],"maxItems":20,"type":"array","items":{"type":"string","maxLength":300}},"objectives":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","maxLength":80}},"locations":{"default":[],"maxItems":12,"type":"array","items":{"type":"string","maxLength":120}},"contentPillars":{"default":[],"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"description":{"default":"","type":"string","maxLength":500},"share":{"default":0,"type":"number","minimum":0,"maximum":100}},"required":["name"]}},"website":{"type":"string","maxLength":500,"format":"uri"}}},"changeNote":{"type":"string","maxLength":300}},"required":["profile"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/profile/history":{"get":{"summary":"BrandBrain version history","tags":["BrandBrain"],"operationId":"Brands_history","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:read","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/page-kit":{"get":{"summary":"Draft name, tagline and About text for creating a company page, from the brand profile","tags":["Brands"],"operationId":"Brands_pageKit","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:read","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/settings":{"patch":{"summary":"Update automation level, AI permissions, approval policy and guardrails","tags":["Brands"],"operationId":"Brands_settings","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:update","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"automationLevel":{"default":"assisted","type":"string","enum":["manual","assisted","autopilot"]},"aiCapabilities":{"default":["READ_BRAND_DATA","CREATE_DRAFT","EDIT_DRAFT","READ_ANALYTICS"],"type":"array","items":{"type":"string","enum":["READ_BRAND_DATA","CREATE_DRAFT","EDIT_DRAFT","CREATE_CAMPAIGN","READ_ANALYTICS","CREATE_SCHEDULE","PUBLISH_CONTENT","DELETE_CONTENT","RESPOND_TO_MESSAGE"]}},"approvalPolicy":{"default":{"alwaysRequire":["product_launch","pricing","legal","financial","medical","testimonial","sensitive","news"],"autoPublish":[],"requireApprovalForAiContent":true,"forbidSelfApproval":false},"type":"object","properties":{"alwaysRequire":{"default":["product_launch","pricing","legal","financial","medical","testimonial","sensitive","news"],"type":"array","items":{"type":"string","enum":["educational","evergreen","community","behind_the_scenes","thought_leadership","product","promotional","product_launch","pricing","legal","financial","medical","testimonial","sensitive","news"]}},"autoPublish":{"default":[],"type":"array","items":{"type":"string","enum":["educational","evergreen","community","behind_the_scenes","thought_leadership","product","promotional","product_launch","pricing","legal","financial","medical","testimonial","sensitive","news"]}},"requireApprovalForAiContent":{"default":true,"type":"boolean"},"forbidSelfApproval":{"default":false,"type":"boolean"}}},"maxPostsPerPlatformPerDay":{"default":3,"type":"integer","minimum":1,"maximum":20},"timezone":{"default":"Europe/London","type":"string","maxLength":64},"preferredPlatforms":{"default":[],"maxItems":9,"type":"array","items":{"type":"string","enum":["linkedin","instagram","facebook","x","tiktok","youtube","pinterest","threads","google_business"]}},"videoVoice":{"default":null,"nullable":true,"type":"string","enum":["ava","ben","cleo","dan","eve","finn"]},"autoPictures":{"default":"instagram","type":"string","enum":["off","instagram","instagram_facebook"]},"cardColor":{"default":null,"nullable":true,"type":"string","pattern":"^#[0-9a-f]{6}$"}}}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/strategy":{"post":{"summary":"Generate a social media strategy from the BrandBrain","tags":["Strategy"],"operationId":"Brands_strategy","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"ai:use","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"platforms":{"minItems":1,"maxItems":9,"type":"array","items":{"type":"string","enum":["linkedin","instagram","facebook","x","tiktok","youtube","pinterest","threads","google_business"]}},"days":{"default":30,"type":"integer","minimum":7,"maximum":90}},"required":["platforms"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/preferences":{"post":{"summary":"Add a structured content preference (preference memory)","tags":["BrandBrain"],"operationId":"Brands_addPref","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:update","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"statement":{"type":"string","minLength":3,"maxLength":300}},"required":["statement"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/preferences/{id}":{"delete":{"summary":"Remove a preference","tags":["BrandBrain"],"operationId":"Brands_delPref","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:update","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/assets":{"get":{"summary":"Brand asset library","tags":["Assets"],"operationId":"Assets_list","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:read","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"summary":"Upload an asset (multipart field \"file\"; ?kind=logo|image|video|document|guideline|other)","tags":["Assets"],"operationId":"Assets_upload","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:update","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/assets/{assetId}/download":{"get":{"summary":"Download an asset (always as an attachment)","tags":["Assets"],"operationId":"Assets_download","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:read","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/assets/{assetId}":{"delete":{"summary":"Delete an asset","tags":["Assets"],"operationId":"Assets_remove","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:update","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"assetId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/public-media/{token}":{"get":{"summary":"Short-lived signed address for one file, used by platforms that fetch media themselves","tags":["Assets"],"operationId":"PublicMedia_get","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/social/providers":{"get":{"summary":"Available social providers and their capabilities (mock providers are labelled)","tags":["Social accounts"],"operationId":"Social_providers","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"social_account:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/social/connect":{"post":{"summary":"Start OAuth connection (returns the provider authorisation URL)","tags":["Social accounts"],"operationId":"Social_connect","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"social_account:connect","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"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)$"},"platform":{"type":"string","enum":["linkedin","instagram","facebook","x","tiktok","youtube","pinterest","threads","google_business"]},"accountType":{"default":"personal","type":"string","enum":["personal","page"]}},"required":["brandId","platform"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/social/oauth/callback/{platform}":{"get":{"summary":"OAuth callback (browser redirect)","tags":["Social accounts"],"operationId":"Social_callback","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/social/pending/{id}":{"get":{"summary":"Pages offered after a company-page sign-in (only the member and session that signed in)","tags":["Social accounts"],"operationId":"Social_pending","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"social_account:connect","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/social/pending/{id}/select":{"post":{"summary":"Connect the chosen company pages","tags":["Social accounts"],"operationId":"Social_selectPages","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"social_account:connect","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"externalIds":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}}},"required":["externalIds"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/social/brands/{brandId}/accounts":{"get":{"summary":"Connected accounts for a brand (tokens are never returned)","tags":["Social accounts"],"operationId":"Social_accounts","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"social_account:read","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/social/brands/{brandId}/health":{"get":{"summary":"Social Account Health dashboard data","tags":["Social accounts"],"operationId":"Social_health","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"social_account:read","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/social/accounts/{id}/move":{"post":{"summary":"Move a connected account to another brand of the organisation (it was connected to the wrong one). Waiting posts for it are cancelled","tags":["Social accounts"],"operationId":"Social_move","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"social_account:connect","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"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":["brandId"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/social/accounts/{id}":{"delete":{"summary":"Disconnect an account (revokes and deletes tokens, cancels pending posts)","tags":["Social accounts"],"operationId":"Social_disconnect","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"social_account:disconnect","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/generate":{"post":{"summary":"Generate platform-native drafts from one idea (AI, grounded in BrandBrain, quality-checked)","tags":["Content"],"operationId":"Content_generate","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:create","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"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)$"},"idea":{"type":"string","minLength":1,"maxLength":2000},"platforms":{"minItems":1,"maxItems":9,"type":"array","items":{"type":"string","enum":["linkedin","instagram","facebook","x","tiktok","youtube","pinterest","threads","google_business"]}},"objective":{"type":"string","enum":["generate_leads","increase_sales","website_traffic","awareness","grow_followers","build_authority","promote_products","promote_events","engagement","personal_brand","product_launch"]},"pillar":{"type":"string","maxLength":80},"category":{"default":"educational","type":"string","enum":["educational","evergreen","community","behind_the_scenes","thought_leadership","product","promotional","product_launch","pricing","legal","financial","medical","testimonial","sensitive","news"]},"format":{"type":"string","enum":["text_post","image_post","carousel","short_video","long_video","thread","article","story"]}},"required":["brandId","idea","platforms"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content":{"get":{"summary":"List content variants for a brand","tags":["Content"],"operationId":"Content_list","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."},{"name":"brandId","in":"query","required":true,"schema":{"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":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","in_review","changes_requested","approved","scheduled","publishing","published","failed","archived"]}},{"name":"platform","in":"query","required":false,"schema":{"type":"string","enum":["linkedin","instagram","facebook","x","tiktok","youtube","pinterest","threads","google_business"]}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/approvals":{"get":{"summary":"Mobile approval queue: posts in review across your brands, oldest first, cursor-paged","tags":["Approvals"],"operationId":"Content_approvals","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:approve","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."},{"name":"limit","in":"query","required":false,"schema":{"default":20,"type":"integer","minimum":1,"maximum":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":300}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/image-guide":{"get":{"summary":"The shapes and sizes each platform wants for photos (with where each figure comes from), used by \"fit to platform\"","tags":["Content"],"operationId":"Content_imageGuide","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/pack":{"post":{"summary":"One idea (or web page) to every format: text posts for each platform plus a photo set and a video script","tags":["Content"],"operationId":"Content_pack","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:create","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"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)$"},"idea":{"type":"string","minLength":2,"maxLength":2000},"url":{"type":"string","maxLength":2000,"format":"uri"},"platforms":{"minItems":1,"maxItems":9,"type":"array","items":{"type":"string","enum":["linkedin","instagram","facebook","x","tiktok","youtube","pinterest","threads","google_business"]}},"category":{"default":"educational","type":"string","enum":["educational","evergreen","community","behind_the_scenes","thought_leadership","product","promotional","product_launch","pricing","legal","financial","medical","testimonial","sensitive","news"]},"briefs":{"default":["photo_set","video_script"],"maxItems":2,"type":"array","items":{"type":"string","enum":["photo_set","video_script"]}}},"required":["brandId","platforms"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/capture":{"post":{"summary":"Capture: turn photos or a video (multipart \"files\", plus brandId, platforms, optional note) into drafts. Photos are shown to the AI; the files are attached to each draft","tags":["Content"],"operationId":"Content_capture","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:create","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/from-url":{"post":{"summary":"Turn a public web page into platform-native drafts (the page is read through the SSRF guard and treated as data)","tags":["Content"],"operationId":"Content_fromUrl","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:create","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"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"},"platforms":{"minItems":1,"maxItems":9,"type":"array","items":{"type":"string","enum":["linkedin","instagram","facebook","x","tiktok","youtube","pinterest","threads","google_business"]}},"category":{"default":"educational","type":"string","enum":["educational","evergreen","community","behind_the_scenes","thought_leadership","product","promotional","product_launch","pricing","legal","financial","medical","testimonial","sensitive","news"]}},"required":["brandId","url","platforms"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/calendar":{"get":{"summary":"Calendar feed (scheduled + unscheduled content)","tags":["Calendar"],"operationId":"Content_calendar","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."},{"name":"brandId","in":"query","required":true,"schema":{"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":"from","in":"query","required":true,"schema":{}},{"name":"to","in":"query","required":true,"schema":{}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/card":{"post":{"summary":"Draw a branded card from this post's opening line and attach it as the picture (only when the post has none)","tags":["Content"],"operationId":"Content_card","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/set":{"get":{"summary":"All the versions of this post's idea (one per platform) with their status and where each can be published","tags":["Content"],"operationId":"Content_versions","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/set/approve":{"post":{"summary":"Submit and approve every version of this idea (each is checked on its own)","tags":["Approvals"],"operationId":"Content_approveSet","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:approve","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/set/publish":{"post":{"summary":"Publish every approved version to its platform's connected account, now or at a time","tags":["Publishing"],"operationId":"Content_publishSet","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:publish","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scheduledAt":{"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))$"}}}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/set/caption":{"post":{"summary":"Use this version's caption and hashtags on the other versions, cut to each platform's limits","tags":["Content"],"operationId":"Content_captionSet","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}":{"get":{"summary":"Content detail: quality report, versions, approvals, comments, publishing attempts","tags":["Content"],"operationId":"Content_get","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"patch":{"summary":"Edit a variant (new version; resets approval; re-runs quality checks)","tags":["Content"],"operationId":"Content_update","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":63206},"hashtags":{"default":[],"maxItems":30,"type":"array","items":{"type":"string","pattern":"^#?[\\p{L}\\p{N}_]{1,100}$"}},"mediaNotes":{"type":"string","maxLength":2000}},"required":["body"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"delete":{"summary":"Archive a variant (not allowed once scheduled or published)","tags":["Content"],"operationId":"Content_remove","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:delete","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/creator-info":{"get":{"summary":"What the connected account on this post's platform may do (TikTok: nickname and the visibility choices it has), to build the posting form","tags":["Content"],"operationId":"Content_creatorInfo","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/platform-options":{"put":{"summary":"Save the choices a platform requires for this post (TikTok: who can see it, comments, duet, stitch, commercial disclosure). Counts as an edit: approval is reset","tags":["Content"],"operationId":"Content_setPlatformOptions","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"tiktok":{"type":"object","properties":{"privacy":{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]},"allowComment":{"type":"boolean"},"allowDuet":{"type":"boolean"},"allowStitch":{"type":"boolean"},"discloseCommercial":{"type":"boolean"},"yourBrand":{"default":false,"type":"boolean"},"brandedContent":{"default":false,"type":"boolean"}},"required":["privacy","allowComment","allowDuet","allowStitch","discloseCommercial"]},"youtube":{"type":"object","properties":{"privacy":{"type":"string","enum":["public","unlisted","private"]},"madeForKids":{"type":"boolean"}},"required":["privacy","madeForKids"]}}}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/briefs":{"post":{"summary":"Add a photo set or a video script to this post's idea","tags":["Content"],"operationId":"Content_addBrief","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:create","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["photo_set","video_script"]},"platform":{"type":"string","enum":["linkedin","instagram","facebook","x","tiktok","youtube","pinterest","threads","google_business"]}},"required":["kind"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/briefs/{briefId}":{"delete":{"summary":"Delete a brief","tags":["Content"],"operationId":"Content_deleteBrief","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"briefId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/media":{"post":{"summary":"Add a photo (PNG, JPG, GIF) or an MP4 video to a post (multipart field \"file\", optional \"altText\" for images). A post has up to 20 images or one video. Counts as an edit: approval is reset","tags":["Content"],"operationId":"Content_addMedia","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/media/order":{"put":{"summary":"Set the order of the media on a post (every item exactly once). Counts as an edit: approval is reset","tags":["Content"],"operationId":"Content_reorderMedia","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"mediaIds":{"minItems":1,"maxItems":20,"type":"array","items":{"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":["mediaIds"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/media/{mediaId}":{"patch":{"summary":"Describe an image for people who cannot see it (alt text). Counts as an edit: approval is reset","tags":["Content"],"operationId":"Content_describeMedia","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"mediaId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"altText":{"nullable":true,"type":"string","maxLength":500}},"required":["altText"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"delete":{"summary":"Remove a photo or video from a post. Counts as an edit: approval is reset","tags":["Content"],"operationId":"Content_removeMedia","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"mediaId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/regenerate":{"post":{"summary":"Regenerate a variant with an optional instruction","tags":["Content"],"operationId":"Content_regenerate","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"instruction":{"type":"string","maxLength":500}}}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/submit":{"post":{"summary":"Submit a draft for approval, optionally asking one colleague to approve it","tags":["Approvals"],"operationId":"Content_submit","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:submit","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"default":{},"type":"object","properties":{"askUserId":{"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)$"},"note":{"type":"string","maxLength":2000}}}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/approvers":{"get":{"summary":"Colleagues who can approve this post (to ask one of them)","tags":["Approvals"],"operationId":"Content_approvers","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:submit","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/decision":{"post":{"summary":"Approve, request changes or reject","tags":["Approvals"],"operationId":"Content_decide","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:approve","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","request_changes","reject"]},"comment":{"type":"string","maxLength":2000}},"required":["decision"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/schedule":{"post":{"summary":"Schedule approved content (anti-spam and duplicate guardrails apply)","tags":["Publishing"],"operationId":"Content_schedule","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:schedule","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scheduledAt":{"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)))$"},"accountIds":{"minItems":1,"maxItems":10,"type":"array","items":{"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":["scheduledAt"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"patch":{"summary":"Move a scheduled post (drag and drop)","tags":["Publishing"],"operationId":"Content_reschedule","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:schedule","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"scheduledAt":{"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)))$"}},"required":["scheduledAt"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"delete":{"summary":"Unschedule a post","tags":["Publishing"],"operationId":"Content_unschedule","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:schedule","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/publish-now":{"post":{"summary":"Publish approved content as soon as possible, to one or more connected accounts","tags":["Publishing"],"operationId":"Content_publishNow","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:publish","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accountIds":{"minItems":1,"maxItems":10,"type":"array","items":{"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)$"}}}}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/retry":{"post":{"summary":"Retry failed destinations of a post (all, or one account); same idempotency key","tags":["Publishing"],"operationId":"Content_retry","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:publish","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"accountId":{"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)$"}}}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/duplicate":{"post":{"summary":"Duplicate a variant as a new draft","tags":["Content"],"operationId":"Content_duplicate","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:create","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/comments":{"post":{"summary":"Comment on content (collaboration)","tags":["Content"],"operationId":"Content_comment","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":2000}},"required":["body"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/video/voices":{"get":{"summary":"The stock voices for video voiceovers, with the address of a sample of each (empty when voices are not switched on)","tags":["Video"],"operationId":"Video_voices","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/video/voices/{voiceId}/sample":{"get":{"summary":"Hear a voice: a short audio sample, made once and kept","tags":["Video"],"operationId":"Video_sample","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:read","parameters":[{"name":"voiceId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/video/credits":{"get":{"summary":"Video credits: this month's plan allowance, bought credits, and the packs on offer","tags":["Video"],"operationId":"Video_credits","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/video":{"get":{"summary":"Video status for a post: what a video costs, your credits, the voices and the latest video job","tags":["Video"],"operationId":"Video_status","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"summary":"Make a video from the post's script or photo set (one click). Reserves credits, then a worker makes it and adds it to the post; approval is reset when it lands","tags":["Video"],"operationId":"Video_make","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"voiceId":{"nullable":true,"type":"string","enum":["ava","ben","cleo","dan","eve","finn"]},"textOnScreen":{"default":true,"type":"boolean"},"briefId":{"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)$"}}}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/content/{id}/video/{jobId}/cancel":{"post":{"summary":"Cancel a video that has not started yet (credits are returned)","tags":["Video"],"operationId":"Video_cancel","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"jobId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/social/platform/{app}/deauthorize":{"post":{"summary":"Meta deauthorize callback (signed_request verified): disconnects the person's accounts and deletes their tokens","tags":["Social accounts"],"operationId":"PlatformCallbacks_deauthorize","security":[],"parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/social/platform/{app}/data-deletion":{"post":{"summary":"Meta data deletion request callback (signed_request verified): disconnects and erases what we hold from the platform; returns a status address and confirmation code","tags":["Social accounts"],"operationId":"PlatformCallbacks_deletion","security":[],"parameters":[{"name":"app","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/social/platform/requests/{code}":{"get":{"summary":"Progress of a platform deauthorize or deletion request, by its confirmation code","tags":["Social accounts"],"operationId":"PlatformCallbacks_status","security":[],"parameters":[{"name":"code","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/analytics/overview":{"get":{"summary":"Measured performance: totals, followers, by platform/pillar/format, best and worst posts","tags":["Analytics"],"operationId":"Analytics_overview","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"analytics:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."},{"name":"brandId","in":"query","required":true,"schema":{"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":"days","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":365}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/analytics/summary":{"get":{"summary":"AI performance summary: what happened (facts), why it may have happened, what to do next","tags":["Analytics"],"operationId":"Analytics_summary","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"analytics:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."},{"name":"brandId","in":"query","required":true,"schema":{"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":"days","in":"query","required":false,"schema":{"default":30,"type":"integer","minimum":1,"maximum":365}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/assistant/messages":{"post":{"summary":"Talk to Social Copilot (natural-language control)","tags":["Assistant"],"operationId":"Assistant_message","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"ai:use","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"brandId":{"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)$"},"message":{"type":"string","minLength":1,"maxLength":4000}},"required":["brandId","message"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/assistant/actions/{id}/confirm":{"post":{"summary":"Confirm an action the assistant proposed","tags":["Assistant"],"operationId":"Assistant_confirm","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"ai:use","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/assistant/history":{"get":{"summary":"Your recent conversation with the assistant for a brand","tags":["Assistant"],"operationId":"Assistant_history","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"ai:use","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."},{"name":"brandId","in":"query","required":true,"schema":{"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)$"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/assistant/actions":{"get":{"summary":"Explainable log of AI actions (what, why, information used, what next)","tags":["Assistant"],"operationId":"Assistant_actions","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."},{"name":"brandId","in":"query","required":true,"schema":{"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)$"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/dashboard":{"get":{"summary":"Command Centre: today, upcoming, approvals, performance, recommendations","tags":["Dashboard"],"operationId":"Dashboard_get","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."},{"name":"brandId","in":"query","required":true,"schema":{"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":"tz","in":"query","required":false,"schema":{"default":"Europe/London","type":"string","maxLength":64,"pattern":"^[A-Za-z_]+(\\/[A-Za-z_+-]+)*$"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/publishing/status":{"get":{"summary":"Is publishing paused for this organisation?","tags":["Publishing"],"operationId":"PublishingControl_status","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/publishing/pause":{"post":{"summary":"Emergency: pause all publishing for the organisation (requires confirm: true)","tags":["Publishing"],"operationId":"PublishingControl_pause","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"publishing:pause","x-step-up-mfa":true,"parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"boolean","enum":[true]},"reason":{"type":"string","maxLength":300}},"required":["confirm"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/publishing/resume":{"post":{"summary":"Resume publishing after a pause (requires confirm: true)","tags":["Publishing"],"operationId":"PublishingControl_resume","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"publishing:resume","x-step-up-mfa":true,"parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirm":{"type":"boolean","enum":[true]}},"required":["confirm"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/autopilot":{"get":{"summary":"Autopilot settings and status: planned times, drafts waiting for approval, recent runs, and the accounts it may publish to","tags":["Autopilot"],"operationId":"Autopilot_get","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:read","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"put":{"summary":"Save the Autopilot plan (days, time, platforms, publishing accounts). Does not turn it on","tags":["Autopilot"],"operationId":"Autopilot_configure","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"ai:configure","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"weekdays":{"minItems":1,"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"postTime":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"platforms":{"minItems":1,"maxItems":9,"type":"array","items":{"type":"string","enum":["linkedin","instagram","facebook","x","tiktok","youtube","pinterest","threads","google_business"]}},"accountIds":{"minItems":1,"maxItems":10,"type":"array","items":{"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)$"}},"planAheadDays":{"default":7,"type":"integer","minimum":3,"maximum":14},"maxPending":{"default":7,"type":"integer","minimum":1,"maximum":14},"format":{"type":"string","enum":["text","tip_card"]},"tipTopics":{"maxItems":10,"type":"array","items":{"type":"string","minLength":2,"maxLength":120}}},"required":["weekdays","postTime","platforms","accountIds"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/autopilot/enable":{"post":{"summary":"Turn Autopilot on. The AI drafts posts on the plan and sends them for approval; nothing publishes without approval","tags":["Autopilot"],"operationId":"Autopilot_enable","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"ai:configure","x-step-up-mfa":true,"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/autopilot/auto-mode":{"put":{"summary":"Switch automatic mode on or off: Autopilot approves and schedules its own posts, within a daily limit and with a hold before publishing. Needs \"publish content\" on for the AI","tags":["Autopilot"],"operationId":"Autopilot_autoMode","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"ai:configure","x-step-up-mfa":true,"parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"dailyCap":{"default":1,"type":"integer","minimum":1,"maximum":5},"holdMinutes":{"default":60,"type":"integer","minimum":15,"maximum":1440}},"required":["enabled"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/autopilot/disable":{"post":{"summary":"Turn Autopilot off. Drafts already made are kept","tags":["Autopilot"],"operationId":"Autopilot_disable","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"ai:configure","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/autopilot/resume":{"post":{"summary":"Resume after Autopilot stopped itself (failed runs, or a disconnected account)","tags":["Autopilot"],"operationId":"Autopilot_resume","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"ai:configure","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/autopilot/run":{"post":{"summary":"Draft now instead of waiting for the next run (same limits as a scheduled run)","tags":["Autopilot"],"operationId":"Autopilot_run","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:create","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/webhooks/events":{"get":{"summary":"The events a webhook can subscribe to","tags":["Webhooks"],"operationId":"Webhooks_events","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"api_key:manage","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/webhooks":{"get":{"summary":"List webhooks (signing secrets are never returned)","tags":["Webhooks"],"operationId":"Webhooks_list","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"api_key:manage","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"summary":"Create a webhook. The signing secret is shown once","tags":["Webhooks"],"operationId":"Webhooks_create","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"api_key:manage","x-step-up-mfa":true,"parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"description":{"type":"string","maxLength":200},"events":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","enum":["content.approved","content.rejected","content.changes_requested","content.published","content.publish_failed","autopilot.drafted","inbox.comment_received"]}},"brandId":{"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":["url","events"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/webhooks/{id}":{"patch":{"summary":"Switch a webhook on or off","tags":["Webhooks"],"operationId":"Webhooks_toggle","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"api_key:manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"delete":{"summary":"Delete a webhook","tags":["Webhooks"],"operationId":"Webhooks_remove","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"api_key:manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/webhooks/{id}/test":{"post":{"summary":"Send a test event (ping) to a webhook now","tags":["Webhooks"],"operationId":"Webhooks_test","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"api_key:manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/webhooks/{id}/deliveries":{"get":{"summary":"The last 50 deliveries to a webhook and how each went","tags":["Webhooks"],"operationId":"Webhooks_deliveries","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"api_key:manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/sso/start":{"post":{"summary":"Whether an email address signs in with single sign-on, and the address to send the person to","tags":["Auth"],"operationId":"SsoAuth_start","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"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,}$"}},"required":["email"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/sso/domain-hint":{"get":{"summary":"Whether an organisation has proved it owns your email domain, so you can ask for an invitation instead of creating a second organisation","tags":["Auth"],"operationId":"SsoAuth_domainHint","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/sso/native/start":{"post":{"summary":"Phone: whether an email address signs in with single sign-on; returns the address to open and a secret to keep for the exchange","tags":["Auth (mobile)"],"operationId":"SsoAuth_nativeStart","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","maxLength":254,"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,}$"}},"required":["email"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/sso/native/exchange":{"post":{"summary":"Phone: exchange the one-time code from the app link, with the secret from the start, for access and refresh tokens","tags":["Auth (mobile)"],"operationId":"SsoAuth_nativeExchange","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"code":{"type":"string","pattern":"^[A-Za-z0-9_-]{20,100}$"},"secret":{"type":"string","pattern":"^[A-Za-z0-9_-]{20,100}$"},"device":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"platform":{"type":"string","enum":["ios","android"]}},"required":["name","platform"]}},"required":["code","secret","device"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/auth/sso/callback":{"get":{"summary":"Where the identity provider sends the person back; finishes sign-in and redirects to the app","tags":["Auth"],"operationId":"SsoAuth_callback","security":[],"parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/sso":{"get":{"summary":"Single sign-on settings, the domains and the DNS records to add (the client secret is never returned)","tags":["Single sign-on"],"operationId":"Sso_get","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"org:update","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"put":{"summary":"Save the OpenID Connect provider (issuer, client id and secret)","tags":["Single sign-on"],"operationId":"Sso_save","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"org:update","x-step-up-mfa":true,"parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"issuer":{"type":"string","maxLength":500,"format":"uri"},"clientId":{"type":"string","minLength":1,"maxLength":300},"clientSecret":{"type":"string","minLength":1,"maxLength":2000},"defaultRole":{"default":"editor","type":"string","enum":["viewer","reviewer","editor","manager"]}},"required":["issuer","clientId"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"patch":{"summary":"Switch single sign-on on or off, and require it for the verified domains","tags":["Single sign-on"],"operationId":"Sso_switchOn","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"org:update","x-step-up-mfa":true,"parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"type":"boolean"},"enforce":{"type":"boolean"}}}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"delete":{"summary":"Remove single sign-on and its domains","tags":["Single sign-on"],"operationId":"Sso_remove","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"org:update","x-step-up-mfa":true,"parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/sso/domains":{"post":{"summary":"Add an email domain to prove ownership of","tags":["Single sign-on"],"operationId":"Sso_addDomain","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"org:update","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"domain":{"type":"string","maxLength":253,"pattern":"^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$"}},"required":["domain"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/sso/domains/{domain}/verify":{"post":{"summary":"Check the DNS record and verify the domain","tags":["Single sign-on"],"operationId":"Sso_verify","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"org:update","parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/sso/domains/{domain}":{"delete":{"summary":"Remove a domain","tags":["Single sign-on"],"operationId":"Sso_removeDomain","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"org:update","x-step-up-mfa":true,"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/branding":{"get":{"summary":"The organisation's own name, colour and logo shown in the app","tags":["White-label"],"operationId":"Branding_get","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"org:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"put":{"summary":"Set the display name, accent colour and logo (PNG or JPEG up to 100 KB)","tags":["White-label"],"operationId":"Branding_save","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"org:update","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"displayName":{"nullable":true,"type":"string","minLength":1,"maxLength":60},"accentColor":{"nullable":true,"type":"string","pattern":"^#[0-9a-f]{6}$"},"logoBase64":{"nullable":true,"type":"string","maxLength":140000}}}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/portfolio":{"get":{"summary":"Every brand you can reach in one view: what needs attention, what is going out, what was published lately","tags":["Portfolio"],"operationId":"Portfolio_overview","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/watch":{"get":{"summary":"Followed competitor and industry feeds and what they published recently","tags":["Research"],"operationId":"Watch_list","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:read","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"summary":"Follow a public website or RSS/Atom feed (read through the SSRF guard; nothing is scraped from social networks)","tags":["Research"],"operationId":"Watch_add","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:update","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"url":{"type":"string","maxLength":2000,"format":"uri"},"kind":{"type":"string","enum":["competitor","industry"]}},"required":["name","url","kind"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/watch/check":{"post":{"summary":"Check the followed feeds for new posts now","tags":["Research"],"operationId":"Watch_check","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:update","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/watch/digest":{"get":{"summary":"The latest research digest: themes in what others published, and original post ideas","tags":["Research"],"operationId":"Watch_latest","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:read","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"summary":"Make a new research digest from recent posts (AI; describes what was published, makes no claims about performance)","tags":["Research"],"operationId":"Watch_digest","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:create","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/watch/{id}":{"delete":{"summary":"Stop following a source","tags":["Research"],"operationId":"Watch_remove","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:update","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/inbox":{"get":{"summary":"Comments on published posts, sorted by priority, with the AI's category and a suggested reply for a person to review","tags":["Inbox"],"operationId":"Inbox_list","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"inbox:read","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."},{"name":"status","in":"query","required":false,"schema":{"default":"new","type":"string","enum":["new","replied","dismissed"]}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/inbox/sync":{"post":{"summary":"Check for new comments now","tags":["Inbox"],"operationId":"Inbox_sync","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"inbox:read","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/inbox/{id}/suggest":{"post":{"summary":"Write a fresh suggested reply for a comment (AI)","tags":["Inbox"],"operationId":"Inbox_suggest","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"inbox:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/inbox/{id}/reply":{"post":{"summary":"Send a reply as the connected account. The text is what the person approved; nothing is sent automatically","tags":["Inbox"],"operationId":"Inbox_reply","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"inbox:reply","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":1000}},"required":["text"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/inbox/{id}/dismiss":{"post":{"summary":"Mark a comment as not needing a reply","tags":["Inbox"],"operationId":"Inbox_dismiss","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"inbox:reply","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/campaigns":{"get":{"summary":"Campaigns for a brand, with how many posts are planned, scheduled and published","tags":["Campaigns"],"operationId":"Campaigns_list","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:read","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"summary":"Create a campaign (name, goal and dates)","tags":["Campaigns"],"operationId":"Campaigns_create","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:create","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"objective":{"type":"string","maxLength":500},"startsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"endsOn":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["name","startsOn","endsOn"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/campaigns/{id}":{"get":{"summary":"A campaign and its posts, with the time each was planned for","tags":["Campaigns"],"operationId":"Campaigns_get","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:read","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"patch":{"summary":"Rename, change the goal of, or archive a campaign","tags":["Campaigns"],"operationId":"Campaigns_update","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:create","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"objective":{"nullable":true,"type":"string","maxLength":500},"status":{"type":"string","enum":["draft","active","archived"]}}}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/campaigns/{id}/plan":{"post":{"summary":"Draft a spread of posts across the campaign dates (AI). Nothing is submitted, approved or scheduled","tags":["Campaigns"],"operationId":"Campaigns_plan","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:create","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"posts":{"default":5,"type":"integer","minimum":2,"maximum":14},"platforms":{"minItems":1,"maxItems":9,"type":"array","items":{"type":"string","enum":["linkedin","instagram","facebook","x","tiktok","youtube","pinterest","threads","google_business"]}},"postTime":{"default":"09:00","type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"}},"required":["platforms"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/learning":{"get":{"summary":"Style suggestions learned from how drafts were edited before approval (counts as evidence; no claims about performance)","tags":["Learning"],"operationId":"Learning_list","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:read","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/learning/accept":{"post":{"summary":"Accept a suggestion: it becomes a style preference used when drafting","tags":["Learning"],"operationId":"Learning_accept","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:update","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":100}},"required":["key"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/learning/dismiss":{"post":{"summary":"Turn down a suggestion so it is not offered again","tags":["Learning"],"operationId":"Learning_dismiss","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:update","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"key":{"type":"string","minLength":1,"maxLength":100}},"required":["key"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/social/page-setup/{platform}":{"get":{"summary":"The fields a platform requires to create a company or brand page, and whether SoPresence can create it or the person must","tags":["Social"],"operationId":"PageSetup_spec","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"social_account:read","parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/social/setup-order":{"post":{"summary":"The order to set several platforms up in: what a platform needs (a Facebook Page for Instagram) comes first and is added if not chosen","tags":["Social"],"operationId":"PageSetup_order","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"social_account:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"platforms":{"maxItems":12,"type":"array","items":{"type":"string","enum":["linkedin","instagram","facebook","x","tiktok","youtube","pinterest","threads","google_business"]}}},"required":["platforms"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/social/setup-check/{platform}":{"post":{"summary":"Where are you starting from? Plain questions about the person's account on a platform; once answered, what to do next and which pitfalls apply","tags":["Social"],"operationId":"PageSetup_check","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"social_account:read","parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"answers":{"default":{},"type":"object","additionalProperties":{"type":"string","maxLength":40}}}}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/page-setup/{platform}":{"get":{"summary":"Saved page details for a brand, prefilled from its profile, with what is still missing","tags":["Social"],"operationId":"PageSetup_get","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"brand:read","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"platform","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"put":{"summary":"Save the page details (partial saves allowed)","tags":["Social"],"operationId":"PageSetup_save","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"social_account:connect","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"platform","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"string","maxLength":2500}}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/page-setup/{platform}/create":{"post":{"summary":"Create the page: sent to the platform when it has an API for that, otherwise returns the details to paste and where","tags":["Social"],"operationId":"PageSetup_create","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"social_account:connect","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"platform","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/brands/{brandId}/page-setup/{platform}/confirm":{"post":{"summary":"Record that the person created the page on the platform","tags":["Social"],"operationId":"PageSetup_confirm","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"social_account:connect","parameters":[{"name":"brandId","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"platform","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pageUrl":{"type":"string","maxLength":300}}}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/push/devices":{"post":{"summary":"Mobile: register this device for push notifications (bound to the current session)","tags":["Notifications"],"operationId":"Push_register","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"token":{"type":"string","minLength":10,"maxLength":4096},"platform":{"type":"string","enum":["ios","android"]}},"required":["token","platform"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"delete":{"summary":"Mobile: stop push notifications for this device","tags":["Notifications"],"operationId":"Push_unregister","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/notifications/preferences":{"get":{"summary":"Which notification categories send you a push (security alerts are always on)","tags":["Notifications"],"operationId":"Push_prefs","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"org:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"put":{"summary":"Choose which notification categories send you a push","tags":["Notifications"],"operationId":"Push_setPrefs","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"org:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"preferences":{"type":"object","additionalProperties":{"type":"boolean"}}},"required":["preferences"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/plans":{"get":{"summary":"Plans and the store products that unlock them","tags":["Billing"],"operationId":"Billing_plans","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"billing:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/pricing":{"get":{"summary":"Plan prices for a country (two-letter code, default GB), with the price band that applies","tags":["Billing"],"operationId":"Billing_pricing","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"billing:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/entitlement":{"get":{"summary":"Current plan and where it came from (same on every device)","tags":["Billing"],"operationId":"Billing_entitlement","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"billing:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/redeem":{"post":{"summary":"Send an in-app purchase receipt for server verification and apply the plan","tags":["Billing"],"operationId":"Billing_redeem","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"billing:manage","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"platform":{"type":"string","enum":["ios","android","mock"]},"receipt":{"type":"string","minLength":8,"maxLength":20000}},"required":["platform","receipt"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/checkout":{"post":{"summary":"Start a card subscription: returns the address of Stripe's hosted payment page","tags":["Billing"],"operationId":"Billing_checkout","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"billing:manage","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"plan":{"type":"string","enum":["starter","growth","pro","agency"]},"period":{"default":"monthly","type":"string","enum":["monthly","yearly"]},"country":{"type":"string","minLength":2,"maxLength":2,"pattern":"^[A-Za-z]{2}$"}},"required":["plan","country"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/video-pack":{"post":{"summary":"Buy a pack of video credits: returns the address of Stripe's hosted payment page","tags":["Billing"],"operationId":"Billing_videoPack","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"billing:manage","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"credits":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["credits"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/portal":{"post":{"summary":"Open Stripe's page to change card, switch plan or cancel","tags":["Billing"],"operationId":"Billing_portal","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"billing:manage","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/stripe/webhook":{"post":{"summary":"Stripe webhook (signature verified)","tags":["Billing"],"operationId":"Billing_stripeWebhook","security":[],"parameters":[],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/billing/notifications/{platform}":{"post":{"summary":"Store server notification webhook (signature verified)","tags":["Billing"],"operationId":"Billing_notification","security":[],"parameters":[{"name":"platform","in":"path","required":true,"schema":{"type":"string","format":"uuid"}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/links/resolve":{"get":{"summary":"Resolve a deep link (screen + id) after authentication; 404 if you may not see it","tags":["Notifications"],"operationId":"Links_resolve","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"org:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/sync/changes":{"get":{"summary":"Content and schedule changes since a cursor (for multi-device sync)","tags":["Sync"],"operationId":"Sync_changes","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"content:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."},{"name":"brandId","in":"query","required":true,"schema":{"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":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"limit","in":"query","required":false,"schema":{"default":100,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/config":{"get":{"summary":"Remote config and feature flags for this user, organisation and client (web, ios, android)","tags":["Config"],"operationId":"RemoteConfig_get","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"org:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/config/flags/{key}":{"put":{"summary":"Override a feature flag for this organisation (enabled: null clears the override)","tags":["Config"],"operationId":"RemoteConfig_override","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"org:update","parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"enabled":{"nullable":true,"type":"boolean"}},"required":["enabled"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/notifications":{"get":{"summary":"Your notifications","tags":["Notifications"],"operationId":"Notifications_list","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"org:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/notifications/read":{"post":{"summary":"Mark notifications as read","tags":["Notifications"],"operationId":"Notifications_read","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"org:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"ids":{"anyOf":[{"maxItems":100,"type":"array","items":{"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":"string","enum":["all"]}]}},"required":["ids"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/security/audit-log":{"get":{"summary":"Searchable, tamper-evident audit trail","tags":["Security"],"operationId":"Security_auditLog","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"audit:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."},{"name":"action","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"actorType","in":"query","required":false,"schema":{"type":"string","enum":["user","ai","system","api_key"]}},{"name":"resourceId","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"name":"before","in":"query","required":false,"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"maximum":9007199254740991}},{"name":"limit","in":"query","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/security/audit-log/verify":{"get":{"summary":"Verify the audit hash chain has not been tampered with","tags":["Security"],"operationId":"Security_verify","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"audit:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/security/events":{"get":{"summary":"Security alerts for this organisation","tags":["Security"],"operationId":"Security_events","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"security:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/privacy/processing":{"get":{"summary":"Data processing record: what is processed, where, retention, AI providers, training use","tags":["Privacy"],"operationId":"Privacy_processing","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"org:read","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/privacy/export":{"post":{"summary":"Export all organisation data (portability)","tags":["Privacy"],"operationId":"Privacy_export","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"privacy:export","x-step-up-mfa":true,"parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/privacy/subject-requests":{"post":{"summary":"Handle a data-subject access or erasure request for a member","tags":["Privacy"],"operationId":"Privacy_subject","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"privacy:export","x-step-up-mfa":true,"parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","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,}$"},"kind":{"type":"string","enum":["export","delete"]}},"required":["email","kind"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/privacy/organisation":{"delete":{"summary":"Delete the organisation (30-day grace period, then permanent purge)","tags":["Privacy"],"operationId":"Privacy_deleteOrg","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"org:delete","x-step-up-mfa":true,"parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirmName":{"type":"string","minLength":1,"maxLength":120}},"required":["confirmName"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/privacy/me":{"delete":{"summary":"Delete your own account: erases your personal data in every organisation, ends all sessions and anonymises your sign-in. Refused while you are the only owner of an organisation with other people, or of one with a paid subscription.","tags":["Privacy"],"operationId":"Privacy_deleteMe","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-step-up-mfa":true,"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"confirmEmail":{"type":"string","minLength":3,"maxLength":320}},"required":["confirmEmail"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/api-keys":{"get":{"summary":"List API keys (secrets are never returned)","tags":["API keys"],"operationId":"ApiKeys_list","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"api_key:manage","parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}},"post":{"summary":"Create an API key (shown once)","tags":["API keys"],"operationId":"ApiKeys_create","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"api_key:manage","x-step-up-mfa":true,"parameters":[{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"permissions":{"minItems":1,"type":"array","items":{"type":"string","enum":["org:read","org:update","org:delete","member:read","member:invite","member:update_role","member:remove","workspace:create","workspace:read","workspace:update","workspace:delete","brand:create","brand:read","brand:update","brand:delete","social_account:read","social_account:connect","social_account:disconnect","content:read","content:create","content:update","content:delete","content:submit","content:approve","content:schedule","content:publish","inbox:read","inbox:reply","analytics:read","ai:use","ai:configure","audit:read","security:read","api_key:manage","billing:read","publishing:pause","publishing:resume","billing:manage","privacy:export","privacy:delete"]}},"expiresInDays":{"default":90,"type":"integer","minimum":1,"maximum":365}},"required":["name","permissions"]}}}},"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}},"/v1/api-keys/{id}":{"delete":{"summary":"Revoke an API key","tags":["API keys"],"operationId":"ApiKeys_revoke","security":[{"session":[],"csrf":[]},{"apiKey":[]}],"x-permission":"api_key:manage","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"uuid"}},{"name":"X-Org-Id","in":"header","required":true,"schema":{"type":"string","format":"uuid"},"description":"Organisation (tenant) id. Implied by API keys."}],"responses":{"200":{"description":"Success"},"default":{"description":"Error","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{},"requestId":{"type":"string"}},"required":["code","message"]}},"required":["error"]}}}}}}}}}