{"openapi":"3.1.0","info":{"title":"ContentGenius Public API","version":"1.0.0","description":"Every app capability over HTTP. Authenticate with `Authorization: Bearer <cg_ API token or Cognito ID token>`. Errors use one envelope; see components.schemas.ErrorEnvelope. Error codes: validation_failed, unauthenticated, credits_exhausted, insufficient_scope, ai_access_unavailable, workspace_required, forbidden, not_found, conflict, account_link_required, idempotency_key_reused, idempotency_in_progress, version_conflict, session_expired, payload_too_large, unsupported_media_type, reference_not_found, network_rules_violation, network_not_enabled, url_not_allowed, schedule_in_past, connection_needs_reauth, provider_limit_reached, rate_limited, internal, upstream_unavailable."},"servers":[{"url":"https://app.cgenius.app"}],"paths":{"/api/v1/assistants":{"get":{"operationId":"assistants.list","summary":"The caller's EpsimoAgents assistants (the agents generations and lead ideation use)","tags":["assistants"],"parameters":[{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssistantList"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:read"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read","x-needs":["ai"]}},"/api/v1/audit-events":{"get":{"operationId":"auditEvents.list","summary":"List the caller's audit events (kept 90 days)","tags":["auditEvents"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"description":"Page size, 1 to 100","default":25,"type":"integer","minimum":1,"maximum":100},"description":"Page size, 1 to 100"},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page","type":"string","minLength":1,"maxLength":8192},"description":"Opaque cursor from the previous page"},{"name":"from","in":"query","required":false,"schema":{"description":"Default: 30 days ago","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|([+-]\\d{2}:\\d{2})))$"},"description":"Default: 30 days ago"},{"name":"to","in":"query","required":false,"schema":{"description":"Default: now","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|([+-]\\d{2}:\\d{2})))$"},"description":"Default: now"},{"name":"operation","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"tokenId","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuditEventPage"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["tokens:manage"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read"}},"/api/v1/auth/cli-sessions/{id}/deny":{"post":{"operationId":"auth.cliSessions.deny","summary":"Deny a CLI login session","tags":["auth"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"204":{"description":"No content"},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["tokens:manage"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"write"}},"/api/v1/auth/cli-sessions/{id}/exchange":{"post":{"operationId":"auth.cliSessions.exchange","summary":"Poll a CLI login: 202 while pending, then the token once","tags":["auth"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovedCliSession"}}}},"202":{"description":"Accepted: a Job was started; follow the Location header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PendingCliSession"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"410":{"description":"Response"},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-scopes":[],"x-idempotent":false,"x-long-running":false,"x-rate-class":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ExchangeCliSessionRequest"}}}}}},"/api/v1/auth/cli-sessions/{id}":{"get":{"operationId":"auth.cliSessions.get","summary":"What the CLI approve page shows for a login session","tags":["auth"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CliSession"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)"},"410":{"description":"Response"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["tokens:manage"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read"}},"/api/v1/auth/cli-sessions":{"post":{"operationId":"auth.cliSessions.create","summary":"Start a CLI login; the user approves it in the browser","tags":["auth"],"parameters":[{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedCliSession"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited"},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-scopes":[],"x-idempotent":false,"x-long-running":false,"x-rate-class":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCliSessionRequest"}}}}}},"/api/v1/auth/delegation/callback":{"get":{"operationId":"auth.delegation.callback","summary":"Cognito hosted UI redirect target; creates the approved token and returns the browser to the app","tags":["auth"],"parameters":[{"name":"code","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":2048}},{"name":"state","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":256}},{"name":"error","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"error_description","in":"query","required":false,"schema":{"type":"string","maxLength":1000}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"302":{"description":"Redirect"},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-scopes":[],"x-idempotent":false,"x-long-running":false,"x-rate-class":"write"}},"/api/v1/auth/delegation/start":{"get":{"operationId":"auth.delegation.start","summary":"Redirect the browser to the Cognito hosted UI to grant AI access to an approval","tags":["auth"],"parameters":[{"name":"approval","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"302":{"description":"Redirect"},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["tokens:manage"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"write"}},"/api/v1/billing/checkout":{"post":{"operationId":"billing.checkout","summary":"Start a Stripe Checkout for a credit pack (pay as you go) or a monthly plan; answers the URL the user pays at","description":"Give `url` to the user; never pay on their behalf. Credits arrive once Stripe confirms the payment (usually seconds); poll billing.get.","tags":["billing"],"parameters":[{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCheckout"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict"},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["settings:write"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"write","x-needs":["ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingCheckoutRequest"}}}}}},"/api/v1/billing/portal":{"post":{"operationId":"billing.portal","summary":"Open the Stripe customer portal (change or cancel a plan, invoices, card)","tags":["billing"],"parameters":[{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPortal"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict"},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["settings:write"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"write","x-needs":["ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BillingPortalRequest"}}}}}},"/api/v1/billing":{"get":{"operationId":"billing.get","summary":"Your credits (plan remaining, packs), plan, purchases, and the plans and packs for sale","tags":["billing"],"parameters":[{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Billing"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["settings:read"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read","x-needs":["ai"]}},"/api/v1/blogs/v1/jobs/{id}":{"get":{"operationId":"blogs.v1.get","summary":"Read a v1 blog Job","tags":["blogs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:read"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read"}},"/api/v1/blogs/v1/jobs":{"post":{"operationId":"blogs.v1.create","summary":"Write a blog with the v1 engine","tags":["blogs"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeating a request with the same key within 24 hours returns the first response (Req 7.4).","schema":{"type":"string","maxLength":255}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"202":{"description":"Accepted: a Job was started; follow the Location header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobAccepted"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:write","jobs:write"],"x-idempotent":true,"x-long-running":true,"x-rate-class":"job","x-needs":["ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBlogV1Request"}}}}}},"/api/v1/blogs/v2/tasks/{id}/resume":{"post":{"operationId":"blogs.v2.resume","summary":"Resume a failed v2 blog task","tags":["blogs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found"},"409":{"description":"Conflict"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:write","jobs:write"],"x-idempotent":false,"x-long-running":true,"x-rate-class":"job","x-needs":["ai"]}},"/api/v1/blogs/v2/tasks/{id}":{"get":{"operationId":"blogs.v2.get","summary":"Read a v2 blog task and its Job","tags":["blogs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:read"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read"}},"/api/v1/blogs/v2/tasks":{"post":{"operationId":"blogs.v2.create","summary":"Write a blog with the v2 engine","tags":["blogs"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeating a request with the same key within 24 hours returns the first response (Req 7.4).","schema":{"type":"string","maxLength":255}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"202":{"description":"Accepted: a Job was started; follow the Location header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobAccepted"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:write","jobs:write"],"x-idempotent":true,"x-long-running":true,"x-rate-class":"job","x-needs":["ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBlogV2Request"}}}}}},"/api/v1/blogs/v3/pipelines/{id}/resume":{"post":{"operationId":"blogs.v3.resume","summary":"Resume a failed v3 blog from its resume point","tags":["blogs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found"},"409":{"description":"Conflict"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:write","jobs:write"],"x-idempotent":false,"x-long-running":true,"x-rate-class":"job","x-needs":["ai"]}},"/api/v1/blogs/v3/pipelines/{id}/sections/{index}/regenerate":{"post":{"operationId":"blogs.v3.regenerateSection","summary":"Regenerate one section of a completed v3 blog (then reassemble)","tags":["blogs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"index","in":"path","required":true,"schema":{"type":"integer","minimum":0,"maximum":100}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeating a request with the same key within 24 hours returns the first response (Req 7.4).","schema":{"type":"string","maxLength":255}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"202":{"description":"Accepted: a Job was started; follow the Location header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobAccepted"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found"},"409":{"description":"Conflict"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:write","jobs:write"],"x-idempotent":true,"x-long-running":true,"x-rate-class":"job","x-needs":["ai"]}},"/api/v1/blogs/v3/pipelines/{id}":{"get":{"operationId":"blogs.v3.get","summary":"Read a v3 blog pipeline and its Job","tags":["blogs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:read"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read"}},"/api/v1/blogs/v3/pipelines":{"post":{"operationId":"blogs.v3.create","summary":"Write a blog with the v3 engine (research, outline, sections, assembly)","tags":["blogs"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeating a request with the same key within 24 hours returns the first response (Req 7.4).","schema":{"type":"string","maxLength":255}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"202":{"description":"Accepted: a Job was started; follow the Location header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobAccepted"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:write","jobs:write"],"x-idempotent":true,"x-long-running":true,"x-rate-class":"job","x-needs":["ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateBlogV3Request"}}}}}},"/api/v1/connections/buffer/channels":{"get":{"operationId":"connections.buffer.channels","summary":"The channels of the caller's Buffer account","tags":["connections"],"parameters":[{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BufferChannels"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["publish:read"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read"}},"/api/v1/connections/buffer":{"delete":{"operationId":"connections.buffer.disconnect","summary":"Remove the stored Buffer API key","tags":["connections"],"parameters":[{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BufferConnection"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["connections:manage"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"write"},"get":{"operationId":"connections.buffer.get","summary":"The caller's Buffer connection, checked with Buffer","tags":["connections"],"parameters":[{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BufferConnection"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["publish:read"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read"},"put":{"operationId":"connections.buffer.connect","summary":"Connect a Buffer account with a Buffer personal API key (verified with Buffer, then stored encrypted)","tags":["connections"],"parameters":[{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BufferConnection"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["connections:manage"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ConnectBufferRequest"}}}}}},"/api/v1/content/{id}/send":{"post":{"operationId":"contentItems.send","summary":"Send saved content to one of your sites (a publishing endpoint) and record the send","description":"A refusal by the endpoint is a 200 with `ok: false` and its HTTP status and message; the send is recorded either way. The endpoint token stays on the server.","tags":["contentItems"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeating a request with the same key within 24 hours returns the first response (Req 7.4).","schema":{"type":"string","maxLength":255}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendContentResult"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found"},"409":{"description":"Conflict"},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["publish:write"],"x-idempotent":true,"x-long-running":false,"x-rate-class":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SendContentRequest"}}}}}},"/api/v1/content/{id}":{"get":{"operationId":"contentItems.get","summary":"Read one of your saved content records: its body, fields and send history","tags":["contentItems"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentItemEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:read"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read"}},"/api/v1/content":{"get":{"operationId":"contentItems.list","summary":"List your saved content, newest first","tags":["contentItems"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"description":"Page size, 1 to 100","default":25,"type":"integer","minimum":1,"maximum":100},"description":"Page size, 1 to 100"},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page","type":"string","minLength":1,"maxLength":8192},"description":"Opaque cursor from the previous page"},{"name":"type","in":"query","required":false,"schema":{"description":"Only this content type, for example social_post","type":"string","minLength":1,"maxLength":64,"pattern":"^[a-z_-]+$"},"description":"Only this content type, for example social_post"},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentPage"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:read"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read"}},"/api/v1/generate/emails":{"post":{"operationId":"generate.email","summary":"Write an email (email Job)","description":"The result has `subject`, `recipient`, `markdown`, `html`, `text` and `contentId`.","tags":["generate"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeating a request with the same key within 24 hours returns the first response (Req 7.4).","schema":{"type":"string","maxLength":255}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"202":{"description":"Accepted: a Job was started; follow the Location header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobAccepted"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:write","jobs:write"],"x-idempotent":true,"x-long-running":true,"x-rate-class":"job","x-needs":["ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateEmailRequest"}}}}}},"/api/v1/generate/offer":{"post":{"operationId":"generate.offer","summary":"Generate an offer (HTML and PDF) with the offer pipelines","tags":["generate"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeating a request with the same key within 24 hours returns the first response (Req 7.4).","schema":{"type":"string","maxLength":255}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"202":{"description":"Accepted: a Job was started; follow the Location header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobAccepted"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:write","jobs:write"],"x-idempotent":true,"x-long-running":true,"x-rate-class":"job","x-needs":["ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateOfferRequest"}}}}}},"/api/v1/generate/presentations":{"post":{"operationId":"generate.presentation","summary":"Write a slide deck (presentation Job)","description":"The result has `title`, `slides` (`title`, `content` in Markdown, speaker `notes`), the deck as `html`, and `contentId`. The saved deck opens in the presentation editor, which exports it as PowerPoint.","tags":["generate"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeating a request with the same key within 24 hours returns the first response (Req 7.4).","schema":{"type":"string","maxLength":255}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"202":{"description":"Accepted: a Job was started; follow the Location header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobAccepted"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:write","jobs:write"],"x-idempotent":true,"x-long-running":true,"x-rate-class":"job","x-needs":["ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GeneratePresentationRequest"}}}}}},"/api/v1/generate/research":{"post":{"operationId":"generate.research","summary":"Research the web and write a cited report (research Job)","description":"The Job plans search questions, researches each one in parallel with web search, then writes the report from the findings. The result has `title`, `markdown`, `agent`, `questions` (with their `sources`, and `noWebResults` when a run found nothing on the web), `sources`, `words` and `contentId`. The saved report reopens in the Canvas with its research.","tags":["generate"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeating a request with the same key within 24 hours returns the first response (Req 7.4).","schema":{"type":"string","maxLength":255}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"202":{"description":"Accepted: a Job was started; follow the Location header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobAccepted"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:write","jobs:write"],"x-idempotent":true,"x-long-running":true,"x-rate-class":"job","x-needs":["ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateResearchRequest"}}}}}},"/api/v1/generate/social-posts":{"post":{"operationId":"generate.socialPost","summary":"Write a social post sized for its platform, with an optional illustration (social_post Job)","description":"The result has `markdown`, `text` (what the network shows), `fit` (its length against the platform limits), `image` (with `illustration`: the publish-bucket `path`, or a `note` saying why there is none; a missing image does not fail the Job) and `contentId`.","tags":["generate"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeating a request with the same key within 24 hours returns the first response (Req 7.4).","schema":{"type":"string","maxLength":255}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"202":{"description":"Accepted: a Job was started; follow the Location header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobAccepted"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:write","jobs:write"],"x-idempotent":true,"x-long-running":true,"x-rate-class":"job","x-needs":["ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateSocialPostRequest"}}}}}},"/api/v1/generate/video-ads/{id}":{"get":{"operationId":"generate.videoAd.get","summary":"Read a video ad Job; a completed one has a 7-day link on each video","tags":["generate"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:read"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read"}},"/api/v1/generate/video-ads":{"post":{"operationId":"generate.videoAd","summary":"Make a short video ad from a content idea and render it in social formats (video_ad Job)","description":"The Job writes the script (scenes, caption, hashtags), optionally draws scene photos, then renders one MP4 per format on Remotion Lambda (H.264, 30 fps, about 10 to 40 seconds of rendering). The result has `script`, `caption` (with hashtags), `props`, `videos` (`format`, `path` as s3://, `width`, `height`, `durationSeconds`), `notes` and `contentId`. Read it with generate.videoAd.get to get a 7-day `url` on each video. To post, pass a video `path` as `videoUrl` to publish.buffer.","tags":["generate"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeating a request with the same key within 24 hours returns the first response (Req 7.4).","schema":{"type":"string","maxLength":255}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"202":{"description":"Accepted: a Job was started; follow the Location header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobAccepted"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"422":{"description":"Unprocessable"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:write","jobs:write"],"x-idempotent":true,"x-long-running":true,"x-rate-class":"job","x-needs":["ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GenerateVideoAdRequest"}}}}}},"/api/v1/health":{"get":{"operationId":"health.get","summary":"Service health","tags":["health"],"parameters":[{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Health"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-scopes":[],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read"}},"/api/v1/ideation/analyze":{"post":{"operationId":"ideation.analyze","summary":"Suggest content ideas from Lead App leads (content_analysis Job)","tags":["ideation"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeating a request with the same key within 24 hours returns the first response (Req 7.4).","schema":{"type":"string","maxLength":255}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"202":{"description":"Accepted: a Job was started; follow the Location header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobAccepted"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:write","jobs:write"],"x-idempotent":true,"x-long-running":true,"x-rate-class":"job","x-needs":["ai","leadApp"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnalyzeLeadsRequest"}}}}}},"/api/v1/ideation/lead-ideas":{"post":{"operationId":"ideation.leadIdeas.create","summary":"Content ideas from a LeadGenius company's leads, written by an agent (lead_ideation Job)","description":"The Job result has `suggestions` (the ideas, each citing the lead ids it comes from), `analysisId` and `leadsAnalyzed`. Contact data never reaches the agent. Follow the Job with jobs.get or jobs.advance.","tags":["ideation"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeating a request with the same key within 24 hours returns the first response (Req 7.4).","schema":{"type":"string","maxLength":255}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"202":{"description":"Accepted: a Job was started; follow the Location header","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobAccepted"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)"},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:write","jobs:write"],"x-idempotent":true,"x-long-running":true,"x-rate-class":"job","x-needs":["ai"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadIdeasRequest"}}}}}},"/api/v1/jobs/{id}/advance":{"post":{"operationId":"jobs.advance","summary":"Run the next Steps of a Job within one request (JSON, or SSE with Accept: text/event-stream)","tags":["jobs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["jobs:write"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"write"}},"/api/v1/jobs/{id}/cancel":{"post":{"operationId":"jobs.cancel","summary":"Cancel a PENDING or RUNNING Job","tags":["jobs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found"},"409":{"description":"Conflict"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["jobs:write"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"write"}},"/api/v1/jobs/{id}/resume":{"post":{"operationId":"jobs.resume","summary":"Resume a FAILED Job from its failed Step","tags":["jobs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found"},"409":{"description":"Conflict"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["jobs:write"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"job"}},"/api/v1/jobs/{id}":{"get":{"operationId":"jobs.get","summary":"Read a Job; also advances it a little when nothing else is (no browser needed)","tags":["jobs"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobEnvelope"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["jobs:read"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read"}},"/api/v1/jobs":{"get":{"operationId":"jobs.list","summary":"List the caller's Jobs (offers, content analysis, PDF, blog v1), newest first","tags":["jobs"],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"description":"Page size, 1 to 100","default":25,"type":"integer","minimum":1,"maximum":100},"description":"Page size, 1 to 100"},{"name":"cursor","in":"query","required":false,"schema":{"description":"Opaque cursor from the previous page","type":"string","minLength":1,"maxLength":8192},"description":"Opaque cursor from the previous page"},{"name":"type","in":"query","required":false,"schema":{"type":"string","enum":["blog_v3","blog_v2","blog_v1","offer_batch","offer_new_batch","content_analysis","lead_ideation","pdf_conversion","questionnaire","social_post","email","presentation","research","video_ad"]}},{"name":"X-Workspace-Id","in":"header","required":false,"description":"Selects the Active_Workspace among the caller's Workspaces (default: the first).","schema":{"type":"string"}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/JobPage"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["jobs:read"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read"}},"/api/v1/lead-app/companies":{"get":{"operationId":"leadApp.companies.list","summary":"The LeadGenius companies the caller owns or is an active member of, and the one lead ideation uses","tags":["leadApp"],"parameters":[{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LeadAppCompanies"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:read"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read"}},"/api/v1/media/generated-images":{"post":{"operationId":"media.generatedImages.import","summary":"Copy an image an EpsimoAgents agent generated (its temporary URL) to the publish bucket","tags":["media"],"parameters":[{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/StoredImage"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found"},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["media:write"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImportGeneratedImageRequest"}}}}}},"/api/v1/media/images":{"get":{"operationId":"media.images.get","summary":"The bytes of an image stored in the publish bucket, by its s3:// path","tags":["media"],"parameters":[{"name":"path","in":"query","required":true,"schema":{"description":"`s3://bucket/pdfFile/...`, as returned by media.generatedImages.import","type":"string","minLength":1,"maxLength":1200},"description":"`s3://bucket/pdfFile/...`, as returned by media.generatedImages.import"},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK"},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["media:read"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read"}},"/api/v1/me":{"get":{"operationId":"me.get","summary":"The caller: identity, token Scopes and AI access, Workspaces, limits and credits","tags":["me"],"parameters":[{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Me"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["settings:read"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read"}},"/api/v1/openapi.json":{"get":{"operationId":"openapi.get","summary":"The OpenAPI 3.1 document of this API","tags":["openapi"],"parameters":[{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[],"x-scopes":[],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read"}},"/api/v1/projects":{"get":{"operationId":"projects.list","summary":"The caller's EpsimoAgents projects","tags":["projects"],"parameters":[{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectList"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:read"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read","x-needs":["ai"]}},"/api/v1/publish/buffer":{"post":{"operationId":"publish.buffer","summary":"Send a post to Buffer channels: publish now, queue, schedule or save as a draft","description":"One Buffer post per channel. Each channel has its own result; a refused channel does not stop the others.","tags":["publish"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeating a request with the same key within 24 hours returns the first response (Req 7.4).","schema":{"type":"string","maxLength":255}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishBufferResult"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict"},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["publish:write"],"x-idempotent":true,"x-long-running":false,"x-rate-class":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublishBufferRequest"}}}}}},"/api/v1/publish/endpoints":{"get":{"operationId":"integrationEndpoints.list","summary":"List your publishing endpoints (Settings › Integrations), without their tokens","tags":["integrationEndpoints"],"parameters":[{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/IntegrationEndpoints"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["publish:read"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read"}},"/api/v1/settings/{key}":{"delete":{"operationId":"settings.delete","summary":"Remove one of the caller's settings","tags":["settings"],"parameters":[{"name":"key","in":"path","required":true,"schema":{"description":"epsimoagents: publish module preferences; integrations: publishing endpoints; ideation: lead ideation choices","type":"string","enum":["epsimoagents","integrations","ideation"]},"description":"epsimoagents: publish module preferences; integrations: publishing endpoints; ideation: lead ideation choices"},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"204":{"description":"No content"},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["settings:write"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"write"},"get":{"operationId":"settings.get","summary":"One of the caller's settings; `data` is null when nothing is saved","description":"For `integrations`, endpoint tokens are returned decrypted, as the settings page shows them.","tags":["settings"],"parameters":[{"name":"key","in":"path","required":true,"schema":{"description":"epsimoagents: publish module preferences; integrations: publishing endpoints; ideation: lead ideation choices","type":"string","enum":["epsimoagents","integrations","ideation"]},"description":"epsimoagents: publish module preferences; integrations: publishing endpoints; ideation: lead ideation choices"},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Setting"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["settings:read"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read"},"put":{"operationId":"settings.update","summary":"Replace one of the caller's settings","description":"The body is validated per key (the same rules as the settings page). Endpoint tokens are stored encrypted.","tags":["settings"],"parameters":[{"name":"key","in":"path","required":true,"schema":{"description":"epsimoagents: publish module preferences; integrations: publishing endpoints; ideation: lead ideation choices","type":"string","enum":["epsimoagents","integrations","ideation"]},"description":"epsimoagents: publish module preferences; integrations: publishing endpoints; ideation: lead ideation choices"},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SettingSaved"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["settings:write"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateSettingRequest"}}}}}},"/api/v1/social/channels":{"get":{"operationId":"social.channels.list","summary":"Size and structure rules of each social channel (length, structure, hashtags, threads, image size)","tags":["social"],"parameters":[{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChannelProfiles"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:read"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read"}},"/api/v1/social/fit":{"post":{"operationId":"social.fit","summary":"Check a post against a channel and get a version that fits it (and a thread where the channel has threads)","tags":["social"],"parameters":[{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SocialFit"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["content:read"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FitSocialPostRequest"}}}}}},"/api/v1/tokens/{id}/ai-access":{"delete":{"operationId":"tokens.removeAiAccess","summary":"Remove AI access from an API token without revoking it","tags":["tokens"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"204":{"description":"No content"},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["tokens:manage"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"write"}},"/api/v1/tokens/{id}":{"delete":{"operationId":"tokens.delete","summary":"Revoke an API token and every token it created","tags":["tokens"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RevokedTokens"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["tokens:manage"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"write"},"get":{"operationId":"tokens.get","summary":"Read one API token","tags":["tokens"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiToken"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["tokens:manage"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read"},"patch":{"operationId":"tokens.update","summary":"Rename an API token","tags":["tokens"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApiToken"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"404":{"description":"Not found"},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["tokens:manage"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateTokenRequest"}}}}}},"/api/v1/tokens/approvals/{id}/complete":{"post":{"operationId":"tokens.approvals.complete","summary":"Finish an approval without AI access and create the token","tags":["tokens"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenApprovalResult"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"410":{"description":"Response"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["tokens:manage"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"write"}},"/api/v1/tokens/approvals/{id}/result":{"post":{"operationId":"tokens.approvals.result","summary":"The token an approval created; the secret is returned only on the first call","tags":["tokens"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenApprovalResult"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["tokens:manage"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"write"}},"/api/v1/tokens/approvals/{id}/session":{"post":{"operationId":"tokens.approvals.session","summary":"Grant AI access from the signed-in browser session (no second sign-in) and create the token","tags":["tokens"],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenApprovalResult"}}}},"400":{"description":"Validation failed"},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)"},"404":{"description":"Not found"},"409":{"description":"Conflict"},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["tokens:manage"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SessionDelegationRequest"}}}}}},"/api/v1/tokens/approvals":{"post":{"operationId":"tokens.approvals.create","summary":"Start a token approval in the signed-in browser (the way to create a token with AI access)","tags":["tokens"],"parameters":[{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedTokenApproval"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)"},"410":{"description":"Response"},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["tokens:manage"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTokenApprovalRequest"}}}}}},"/api/v1/tokens":{"get":{"operationId":"tokens.list","summary":"List the caller's API tokens","tags":["tokens"],"parameters":[{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TokenList"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["tokens:manage"],"x-idempotent":false,"x-long-running":false,"x-rate-class":"read"},"post":{"operationId":"tokens.create","summary":"Create an API token (without AI access; use the approval flow for AI access)","tags":["tokens"],"parameters":[{"name":"Idempotency-Key","in":"header","required":false,"description":"Repeating a request with the same key within 24 hours returns the first response (Req 7.4).","schema":{"type":"string","maxLength":255}},{"name":"X-Request-Id","in":"header","required":false,"description":"Correlation id, 8 to 128 characters from [A-Za-z0-9._-]; echoed in the response.","schema":{"type":"string","pattern":"^[A-Za-z0-9._-]{8,128}$"}}],"responses":{"201":{"description":"Created","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreatedToken"}}}},"400":{"description":"Validation failed","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"401":{"description":"Authentication required","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"403":{"description":"Forbidden (Scope, AI access, or workspace)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"413":{"description":"Payload too large","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"Rate limited","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"500":{"description":"Internal server error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"503":{"description":"A dependency is unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}}},"security":[{"bearer":[]}],"x-scopes":["tokens:manage"],"x-idempotent":true,"x-long-running":false,"x-rate-class":"write","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTokenRequest"}}}}}}},"components":{"schemas":{"ErrorEnvelope":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","enum":["validation_failed","unauthenticated","credits_exhausted","insufficient_scope","ai_access_unavailable","workspace_required","forbidden","not_found","conflict","account_link_required","idempotency_key_reused","idempotency_in_progress","version_conflict","session_expired","payload_too_large","unsupported_media_type","reference_not_found","network_rules_violation","network_not_enabled","url_not_allowed","schedule_in_past","connection_needs_reauth","provider_limit_reached","rate_limited","internal","upstream_unavailable"]},"message":{"type":"string"},"fields":{"type":"array","items":{"type":"object","properties":{"field":{"type":"string"},"message":{"type":"string"}},"required":["field","message"],"additionalProperties":false}},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"correlationId":{"type":"string"}},"required":["code","message","correlationId"],"additionalProperties":false}},"required":["error"],"additionalProperties":false},"AssistantList":{"type":"object","properties":{"items":{"description":"EpsimoAgents assistants: assistant_id, name, config, ...","type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["items"],"additionalProperties":false},"AuditEvent":{"type":"object","properties":{"auditId":{"type":"string"},"ts":{"type":"string"},"operation":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"correlationId":{"type":"string"},"workspaceId":{"type":"string"},"callerType":{"type":"string","enum":["cognito","api_token","system"]},"callerKeyId":{"description":"API token id","type":"string"},"delegated":{"type":"boolean"},"resourceIds":{"type":"array","items":{"type":"string"}},"event":{"type":"string"},"idempotentReplay":{"type":"boolean"}},"required":["auditId","ts","operation","status","correlationId","callerType","delegated","resourceIds","idempotentReplay"],"additionalProperties":false},"AuditEventPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/AuditEvent"}},"nextCursor":{"type":"string"}},"required":["items"],"additionalProperties":false},"ApprovedCliSession":{"type":"object","properties":{"status":{"type":"string","const":"approved"},"token":{"description":"The plaintext API token","type":"string"},"tokenId":{"type":"string"}},"required":["status","token","tokenId"],"additionalProperties":false},"PendingCliSession":{"type":"object","properties":{"status":{"type":"string","const":"pending"},"interval":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["status","interval"],"additionalProperties":false},"ExchangeCliSessionRequest":{"type":"object","properties":{"pollSecret":{"type":"string","minLength":16,"maxLength":256}},"required":["pollSecret"]},"CliSession":{"type":"object","properties":{"id":{"type":"string"},"userCode":{"description":"Compare with the code the CLI shows","type":"string"},"status":{"type":"string","enum":["pending","approved","denied"]},"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["content:read","content:write","publish:read","publish:write","connections:manage","media:read","media:write","settings:read","settings:write","jobs:read","jobs:write","tokens:manage","maintenance:read","maintenance:write"]}},"aiAccess":{"type":"boolean"},"expiresInDays":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"clientInfo":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","userCode","status","name","scopes","aiAccess","createdAt"],"additionalProperties":false},"CreatedCliSession":{"type":"object","properties":{"sessionId":{"type":"string"},"userCode":{"type":"string"},"pollSecret":{"description":"Send to the exchange Operation; never shown to the user","type":"string"},"approveUrl":{"type":"string"},"expiresIn":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"interval":{"description":"Seconds between exchange polls","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["sessionId","userCode","pollSecret","approveUrl","expiresIn","interval"],"additionalProperties":false},"CreateCliSessionRequest":{"type":"object","properties":{"name":{"default":"cgenius CLI","type":"string","minLength":1,"maxLength":100},"scopes":{"minItems":1,"type":"array","items":{"type":"string","enum":["content:read","content:write","publish:read","publish:write","connections:manage","media:read","media:write","settings:read","settings:write","jobs:read","jobs:write","tokens:manage","maintenance:read","maintenance:write"]}},"aiAccess":{"default":true,"type":"boolean"},"expiresInDays":{"type":"integer","minimum":1,"maximum":365},"clientInfo":{"description":"For example the host name and CLI version, shown on the approve page","type":"string","maxLength":200}},"required":["scopes"]},"BillingCheckout":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false},"BillingCheckoutRequest":{"type":"object","properties":{"kind":{"type":"string","enum":["pack","plan"]},"itemId":{"description":"A pack or plan id from billing.get, for example pack_100 or pro","type":"string","minLength":1,"maxLength":64},"returnUrl":{"description":"Where Stripe returns (an allowed https origin of ContentGenius); default the Credits & Billing page","type":"string","maxLength":500,"format":"uri"}},"required":["kind","itemId"]},"BillingPortal":{"type":"object","properties":{"url":{"type":"string"}},"required":["url"],"additionalProperties":false},"BillingPortalRequest":{"type":"object","properties":{"returnUrl":{"description":"Where Stripe returns (an allowed https origin of ContentGenius); default the Credits & Billing page","type":"string","maxLength":500,"format":"uri"}}},"Billing":{"type":"object","properties":{"creditsLeft":{"description":"Credits the account can still spend (plan remaining + packs); null when unknown","anyOf":[{"type":"number"},{"type":"null"}]},"status":{"anyOf":[{"type":"object","properties":{"thread_counter":{"type":"number"},"thread_max":{"type":"number"},"plan_allowance":{"type":"number"},"plan_used":{"type":"number"},"plan_remaining":{"type":"number"},"pack_balance":{"type":"number"},"subscription":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"has_billing_account":{"type":"boolean"},"purchases":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"additionalProperties":false},{"type":"null"}]},"catalog":{"anyOf":[{"type":"object","properties":{"plans":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"threads_per_month":{"type":"number"},"interval":{"type":"string"},"amount":{"description":"Cents, VAT included","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"}},"required":["id","name","description","threads_per_month","interval","amount","currency"],"additionalProperties":false}},"packs":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"description":{"type":"string"},"threads":{"type":"number"},"amount":{"description":"Cents, VAT included","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currency":{"type":"string"}},"required":["id","name","description","threads","amount","currency"],"additionalProperties":false}},"tax_inclusive":{"type":"boolean"}},"required":["plans","packs","tax_inclusive"],"additionalProperties":false},{"type":"null"}]}},"required":["creditsLeft","status","catalog"],"additionalProperties":false},"Job":{"type":"object","properties":{"jobId":{"type":"string"},"jobType":{"type":"string"},"correlationId":{"type":"string"},"status":{"type":"string","enum":["PENDING","RUNNING","COMPLETED","FAILED","CANCELLED"]},"progress":{"description":"Never decreases","type":"integer","minimum":0,"maximum":100},"currentStep":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"status":{"type":"string","enum":["PENDING","RUNNING","COMPLETED","FAILED","CANCELLED"]},"result":{}},"required":["key","status"],"additionalProperties":false}},"partialContent":{"type":"string"},"result":{"description":"COMPLETED only; `resources` names what the Job created","type":"object","properties":{"resources":{"type":"array","items":{"$ref":"#/components/schemas/ResourceRef"}}},"required":["resources"],"additionalProperties":{}},"error":{"description":"FAILED only","$ref":"#/components/schemas/JobError"},"origin":{"type":"string","enum":["ui","api","scheduler"]},"stream":{"type":"object","properties":{"stepKey":{"type":"string"},"attempt":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"state":{"type":"string","enum":["awaiting_stream","streaming"]},"kind":{"type":"string","enum":["pipeline","run"]}},"required":["stepKey","attempt","state"],"additionalProperties":false}},"required":["jobId","jobType","correlationId","status","progress","currentStep","steps","origin"],"additionalProperties":false},"ResourceRef":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type","id"],"additionalProperties":false},"JobError":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"step":{"type":"string"}},"required":["code","message"],"additionalProperties":false},"JobEnvelope":{"type":"object","properties":{"job":{"$ref":"#/components/schemas/Job"}},"required":["job"],"additionalProperties":false},"JobAccepted":{"type":"object","properties":{"job":{"$ref":"#/components/schemas/Job"}},"required":["job"],"additionalProperties":false},"CreateBlogV1Request":{"type":"object","properties":{"assistant_id":{"type":"string","minLength":1,"maxLength":200},"topic":{"type":"string","minLength":1,"maxLength":500},"blogSize":{"type":"string","enum":["single","small","medium","big","huge"]}},"required":["assistant_id","topic","blogSize"],"additionalProperties":{}},"CreateBlogV2Request":{"type":"object","properties":{"requestData":{"type":"object","properties":{"topic":{"type":"string","minLength":1,"maxLength":500},"wordCount":{"type":"integer","minimum":1,"maximum":50000},"blogSize":{"type":"string","enum":["single","small","medium","big","huge"]},"assistantId":{"type":"string","minLength":1,"maxLength":200}},"required":["topic","wordCount","blogSize","assistantId"],"additionalProperties":{}}},"required":["requestData"]},"CreateBlogV3Request":{"type":"object","properties":{"requestData":{"type":"object","properties":{"topic":{"type":"string","minLength":1,"maxLength":500},"title":{"type":"string","maxLength":500},"keywords":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"tone":{"type":"string","maxLength":200},"wordCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"blogSize":{"type":"string","maxLength":40},"includeFAQ":{"type":"boolean"},"brandVoice":{},"templateId":{"type":"string","maxLength":200}},"required":["topic"],"additionalProperties":{}},"agentConfiguration":{"type":"object","properties":{"defaultAgentId":{"type":"string","minLength":1,"maxLength":200},"researchAgentId":{"type":"string","maxLength":200},"outlineAgentId":{"type":"string","maxLength":200},"writingAgentId":{"type":"string","maxLength":200}},"required":["defaultAgentId"],"additionalProperties":{}}},"required":["requestData","agentConfiguration"]},"BufferChannel":{"type":"object","properties":{"id":{"type":"string"},"organizationId":{"type":"string"},"organizationName":{"type":"string"},"name":{"type":"string"},"displayName":{"type":"string"},"service":{"description":"linkedin, twitter, facebook, instagram, threads, bluesky, ...","type":"string"},"type":{"type":"string"},"avatar":{"type":"string"},"descriptor":{"type":"string"},"usable":{"type":"boolean"},"unusableReason":{"type":"string"},"notificationOnly":{"description":"Buffer sends a reminder and the post is published by hand","type":"boolean"},"isQueuePaused":{"type":"boolean"}},"required":["id","organizationId","organizationName","name","service","type","usable","notificationOnly","isQueuePaused"],"additionalProperties":false},"BufferChannels":{"type":"object","properties":{"channels":{"type":"array","items":{"$ref":"#/components/schemas/BufferChannel"}}},"required":["channels"],"additionalProperties":false},"BufferConnection":{"type":"object","properties":{"connected":{"type":"boolean"},"account":{"type":"object","properties":{"id":{"type":"string"},"email":{"type":"string"},"name":{"type":"string"}},"required":["id"],"additionalProperties":false},"organizations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"keyHint":{"description":"The last 4 characters of the stored key","type":"string"},"connectedAt":{"type":"string"}},"required":["connected"],"additionalProperties":false},"ConnectBufferRequest":{"type":"object","properties":{"apiKey":{"description":"Buffer › Settings › API","type":"string","minLength":10,"maxLength":512,"pattern":"^\\S+$"}},"required":["apiKey"]},"ContentDelivery":{"type":"object","properties":{"deliveryId":{"type":"string"},"endpointId":{"type":"string"},"endpointName":{"type":"string"},"endpointHost":{"type":"string"},"sentAt":{"type":"string"},"status":{"type":"string","enum":["sent","partial","failed"]},"httpStatus":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"type":"string"},"publishedUrl":{"type":"string"},"images":{"type":"object","properties":{"sent":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["sent","total"],"additionalProperties":false},"options":{"type":"object","properties":{"status":{"type":"string"},"images":{"type":"string"},"format":{"type":"string"}},"required":["status","images"],"additionalProperties":false}},"required":["deliveryId","endpointId","endpointName","endpointHost","sentAt","status","images","options"],"additionalProperties":false},"SendContentResult":{"type":"object","properties":{"ok":{"description":"The endpoint accepted the content (2xx)","type":"boolean"},"httpStatus":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"description":"What happened, with the start of the endpoint's answer","type":"string"},"publishedUrl":{"type":"string"},"delivery":{"description":"The send as recorded on the content; null when it could not be recorded","anyOf":[{"$ref":"#/components/schemas/ContentDelivery"},{"type":"null"}]}},"required":["ok","message","delivery"],"additionalProperties":false},"SendContentRequest":{"type":"object","properties":{"endpointId":{"description":"From integrationEndpoints.list","type":"string","minLength":1,"maxLength":128},"options":{"type":"object","properties":{"format":{"description":"simple (default): title, content, featured image; full: every section, block and field","type":"string","enum":["simple","full"]},"status":{"description":"What the receiving site should do: publish (default) or draft","type":"string","enum":["publish","draft"]},"formats":{"description":"Full format: the body formats to include (default all three)","minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["html","markdown","text"]}},"images":{"description":"link (default): 30-day download links; inline: base64 inside the content (full format); none","type":"string","enum":["link","inline","none"]},"includeFields":{"description":"Full format: include the type's own fields","type":"boolean"}}}},"required":["endpointId"]},"ContentItem":{"type":"object","properties":{"id":{"type":"string"},"contentType":{"description":"blog, social_post, email, presentation, research_report, commercial_offer…","type":"string"},"title":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"sends":{"description":"Sends to your sites recorded on the content","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"html":{"description":"Sanitized HTML body","type":"string"},"markdown":{"description":"The Markdown source, when saved with one","anyOf":[{"type":"string"},{"type":"null"}]},"fields":{"description":"The type's own fields: platform, subject, slides, research…","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"deliveries":{"description":"Sends to your sites, oldest first (ContentDelivery)","type":"array","items":{}}},"required":["id","contentType","title","tags","sends","createdAt","updatedAt","html","markdown","fields","deliveries"],"additionalProperties":false},"ContentItemEnvelope":{"type":"object","properties":{"item":{"$ref":"#/components/schemas/ContentItem"}},"required":["item"],"additionalProperties":false},"ContentListItem":{"type":"object","properties":{"id":{"type":"string"},"contentType":{"description":"blog, social_post, email, presentation, research_report, commercial_offer…","type":"string"},"title":{"type":"string"},"tags":{"type":"array","items":{"type":"string"}},"sends":{"description":"Sends to your sites recorded on the content","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["id","contentType","title","tags","sends","createdAt","updatedAt"],"additionalProperties":false},"ContentPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ContentListItem"}},"nextCursor":{"type":"string"}},"required":["items"],"additionalProperties":false},"GenerateEmailRequest":{"type":"object","properties":{"assistantId":{"description":"EpsimoAgents assistant that writes the email","type":"string","minLength":1,"maxLength":200},"recipient":{"description":"Who it is for, for example \"a prospect who downloaded our guide\"","type":"string","minLength":1,"maxLength":200},"subject":{"type":"string","minLength":1,"maxLength":200},"context":{"description":"What the email must say or achieve","type":"string","maxLength":2000},"tone":{"description":"For example \"warm\" or \"formal\"","type":"string","maxLength":100},"length":{"description":"About how many words (default 200)","type":"string","enum":["100","200","400"]},"brandVoiceId":{"description":"One of your brand voices; the writing follows it","type":"string","minLength":1,"maxLength":200},"save":{"description":"Save the result to your content (default true); `result.contentId` names the record","type":"boolean"}},"required":["assistantId","recipient","subject"]},"GenerateOfferRequest":{"type":"object","properties":{"variant":{"description":"batch: one section per subject (offer_batch); the others: the new-batch pipeline variants","type":"string","enum":["batch","basic","zero","mid","full"]},"client_name":{"type":"string","minLength":1,"maxLength":500},"subjects":{"type":"array","items":{"type":"string","minLength":1,"maxLength":2000}},"offerRecord":{},"assistantsId":{"description":"batch: the assistant per subject (array or map); other variants: an object, `{assistantsId: \"<assistant id>\"}` for mid and full","anyOf":[{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["variant","client_name","offerRecord"],"additionalProperties":{}},"GeneratePresentationRequest":{"type":"object","properties":{"assistantId":{"description":"EpsimoAgents assistant that writes the slides","type":"string","minLength":1,"maxLength":200},"topic":{"type":"string","minLength":1,"maxLength":500},"audience":{"description":"Who the presentation is for","type":"string","maxLength":300},"slideCount":{"type":"integer","minimum":3,"maximum":25},"style":{"description":"Default professional","type":"string","enum":["professional","creative","minimal","bold"]},"brandVoiceId":{"description":"One of your brand voices; the writing follows it","type":"string","minLength":1,"maxLength":200},"save":{"description":"Save the result to your content (default true); `result.contentId` names the record","type":"boolean"}},"required":["assistantId","topic","slideCount"]},"GenerateResearchRequest":{"type":"object","properties":{"assistantId":{"description":"EpsimoAgents assistant that plans and researches; give it a web search tool (Tavily or DuckDuckGo)","type":"string","minLength":1,"maxLength":200},"writerAssistantId":{"description":"Assistant that writes the report; default `assistantId`","type":"string","minLength":1,"maxLength":200},"query":{"description":"The research task","type":"string","minLength":1,"maxLength":1000},"reportType":{"description":"Default research_report (a summary report of about 1,200 words)","type":"string","enum":["research_report","outline_report","resource_report","custom_report"]},"customPrompt":{"description":"How to write a custom_report (required for it)","type":"string","maxLength":4000},"tone":{"description":"Default objective","type":"string","enum":["objective","formal","analytical","persuasive","informative","explanatory","descriptive","critical","comparative","speculative","reflective","narrative","humorous","optimistic","pessimistic","simple","casual"]},"language":{"description":"For example \"French\"; default: the language of the query","type":"string","maxLength":40},"domains":{"description":"Only search and cite these sites, for example [\"europa.eu\"]","maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":253}},"questionCount":{"description":"Search questions to plan (default 4); the query itself is researched too","type":"integer","minimum":2,"maximum":8},"brandVoiceId":{"description":"One of your brand voices; the writing follows it","type":"string","minLength":1,"maxLength":200},"save":{"description":"Save the result to your content (default true); `result.contentId` names the record","type":"boolean"}},"required":["assistantId","query"]},"GenerateSocialPostRequest":{"type":"object","properties":{"assistantId":{"description":"EpsimoAgents assistant that writes the post","type":"string","minLength":1,"maxLength":200},"topic":{"description":"What the post is about","type":"string","minLength":1,"maxLength":2000},"platform":{"type":"string","enum":["linkedin","twitter","facebook","instagram","threads"]},"length":{"description":"Default medium; `social.channels.list` gives the character range of each length","type":"string","enum":["short","medium","long"]},"tone":{"description":"For example \"friendly\" or \"expert\"","type":"string","maxLength":100},"hashtags":{"description":"Hashtags to use","type":"string","maxLength":300},"callToAction":{"description":"What the reader should do","type":"string","maxLength":300},"brandVoiceId":{"description":"One of your brand voices; the writing follows it","type":"string","minLength":1,"maxLength":200},"illustration":{"description":"Also draw an illustration (needs `imageAssistantId`)","type":"boolean"},"imageAssistantId":{"description":"An assistant with the DALL-E tool, for the illustration","type":"string","minLength":1,"maxLength":200},"imageIdea":{"description":"What the illustration should show; default: drawn from the post","type":"string","maxLength":500},"save":{"description":"Save the result to your content (default true); `result.contentId` names the record","type":"boolean"}},"required":["assistantId","topic","platform"]},"GenerateVideoAdRequest":{"type":"object","properties":{"assistantId":{"description":"EpsimoAgents assistant that writes the script and the caption (not needed with `script`)","type":"string","minLength":1,"maxLength":200},"ideationId":{"description":"One of your saved ideas (from ideation.leadIdeas or ideation.analyze); it is linked to the saved ad","type":"string","minLength":1,"maxLength":200},"idea":{"description":"The idea itself, instead of `ideationId` (for example a suggestion from ideation.leadIdeas)","type":"object","properties":{"topic":{"type":"string","minLength":1,"maxLength":500},"description":{"type":"string","maxLength":2000},"targetAudience":{"type":"string","maxLength":500},"angles":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":300}},"keywords":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":80}}},"required":["topic"]},"formats":{"description":"One render per format; default [\"9:16\"] (Reels, TikTok, Shorts, Stories)","minItems":1,"maxItems":4,"type":"array","items":{"type":"string","enum":["9:16","1:1","4:5","16:9"]}},"lengthSeconds":{"description":"About how long the ad lasts: 15, 30, 45, 60 (default 30)","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"platform":{"description":"The network the caption is written for (default instagram)","type":"string","minLength":1,"maxLength":40},"url":{"description":"Shown on the call-to-action scene, for example \"acme.com/demo\"","type":"string","maxLength":200},"brand":{"description":"Colours as #rrggbb, and the name or logo shown in a corner","type":"object","properties":{"name":{"type":"string","maxLength":80},"primary":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"accent":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"background":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"text":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},"logoUrl":{"type":"string","maxLength":4000,"pattern":"^https:\\/\\/\\S+$"}}},"brandVoiceId":{"description":"One of your brand voices; the writing follows it","type":"string","minLength":1,"maxLength":200},"language":{"type":"string","maxLength":40},"images":{"description":"Draw a photo behind up to three scenes (needs `imageAssistantId`, an assistant with the DALL-E tool)","type":"boolean"},"imageAssistantId":{"type":"string","minLength":1,"maxLength":200},"musicUrl":{"description":"Background music (an https audio file you may use); it loops and fades out at the end","type":"string","maxLength":4000,"pattern":"^https:\\/\\/\\S+$"},"musicVolume":{"description":"Music volume, 0 to 1 (default 0.35)","type":"number","minimum":0,"maximum":1},"script":{"description":"A script to render as is (`job.result.script` of an earlier Job with `render: false`, edited); the agent is not asked again","type":"object","properties":{"scenes":{"description":"Scenes as in job.result.script.scenes: {kind: hook|point|stat|cta, durationInSeconds, text, sub, title, body, value, label, button, url, imageUrl}","minItems":2,"maxItems":10,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"caption":{"type":"string","maxLength":2200},"hashtags":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":40}}},"required":["scenes"]},"render":{"description":"Render the videos (default true); false stops after the script so it can be checked","type":"boolean"},"save":{"description":"Save the result to your content (default true); `result.contentId` names the record","type":"boolean"}}},"Health":{"type":"object","properties":{"status":{"type":"string","const":"ok"},"apiVersion":{"type":"string"}},"required":["status","apiVersion"],"additionalProperties":false},"AnalyzeLeadsRequest":{"type":"object","properties":{"leadIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"assistantId":{"description":"EpsimoAgents assistant that writes the ideas. Default: the configured content analysis assistant","type":"string","minLength":1,"maxLength":256}},"required":["leadIds"]},"LeadIdeasRequest":{"type":"object","properties":{"assistantId":{"description":"The EpsimoAgents agent that writes the ideas (see assistants.list)","type":"string","minLength":1,"maxLength":256},"companyId":{"description":"A LeadGenius company of the caller (see leadApp.companies.list)","type":"string","minLength":1,"maxLength":256},"mode":{"description":"deep: themes per group of 25 leads, then the ideas; quick: statistics and 40 leads","default":"deep","type":"string","enum":["deep","quick"]},"leadIds":{"description":"Hand-picked leads; without them, the newest leads of the company","maxItems":300,"type":"array","items":{"type":"string","minLength":1,"maxLength":256}},"filters":{"type":"object","properties":{"minScore":{"type":"number","minimum":0,"maximum":100},"statuses":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":60}},"keyword":{"type":"string","maxLength":100},"since":{"description":"ISO date: leads created on or after it","type":"string","maxLength":40}}},"maxLeads":{"type":"integer","minimum":1,"maximum":300},"ideaCount":{"type":"integer","minimum":3,"maximum":15},"focus":{"description":"What the company offers or wants to be known for","type":"string","maxLength":1000}},"required":["assistantId","companyId"]},"JobListItem":{"type":"object","properties":{"jobId":{"type":"string"},"jobType":{"type":"string"},"status":{"type":"string","enum":["PENDING","RUNNING","COMPLETED","FAILED","CANCELLED"]},"progress":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"currentStep":{"type":"string"},"createdAt":{"type":"string"},"updatedAt":{"type":"string"}},"required":["jobId","jobType","status","progress","currentStep","createdAt","updatedAt"],"additionalProperties":false},"JobPage":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/JobListItem"}},"nextCursor":{"type":"string"}},"required":["items"],"additionalProperties":false},"LeadAppCompany":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"}},"required":["id","name","role"],"additionalProperties":false},"LeadAppCompanies":{"type":"object","properties":{"companies":{"type":"array","items":{"$ref":"#/components/schemas/LeadAppCompany"}},"selectedCompanyId":{"description":"The `ideation` setting company when the caller still belongs to it, else the first","anyOf":[{"type":"string"},{"type":"null"}]}},"required":["companies","selectedCompanyId"],"additionalProperties":false},"StoredImage":{"type":"object","properties":{"path":{"description":"`s3://bucket/key`: what a content record stores; read it with media.images.get","type":"string"},"key":{"type":"string"}},"required":["path","key"],"additionalProperties":false},"ImportGeneratedImageRequest":{"type":"object","properties":{"url":{"description":"https URL on the EpsimoAgents host under /generated-images/","type":"string","minLength":1,"maxLength":2048}},"required":["url"]},"Me":{"type":"object","properties":{"ownerId":{"type":"string"},"email":{"type":"string"},"callerType":{"type":"string","enum":["cognito","api_token"]},"token":{"type":"object","properties":{"id":{"type":"string"},"scopes":{"anyOf":[{"type":"string","const":"*"},{"type":"array","items":{"type":"string","enum":["content:read","content:write","publish:read","publish:write","connections:manage","media:read","media:write","settings:read","settings:write","jobs:read","jobs:write","tokens:manage","maintenance:read","maintenance:write"]}}]},"aiAccess":{"type":"string","enum":["active","none","expired","removed"]}},"required":["id","scopes","aiAccess"],"additionalProperties":false},"workspaces":{"description":"null when the workspace lookup is unavailable","anyOf":[{"type":"object","properties":{"active":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["company","personal"]},"name":{"type":"string"}},"required":["id","kind","name"],"additionalProperties":false},"all":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string","enum":["company","personal"]},"name":{"type":"string"}},"required":["id","kind","name"],"additionalProperties":false}}},"required":["active","all"],"additionalProperties":false},{"type":"null"}]},"rateLimit":{"type":"object","properties":{"perMinute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"jobStartsPerMinute":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxConcurrentJobs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["perMinute","jobStartsPerMinute","maxConcurrentJobs"],"additionalProperties":false},"credits":{"description":"EpsimoAgents credits; null without AI access or when EpsimoAgents is unreachable","anyOf":[{"type":"object","properties":{"threads":{"type":"number"},"maxThreads":{"type":"number"}},"required":["threads","maxThreads"],"additionalProperties":false},{"type":"null"}]}},"required":["ownerId","callerType","workspaces","rateLimit","credits"],"additionalProperties":false},"ProjectList":{"type":"object","properties":{"items":{"description":"EpsimoAgents projects: project_id, name, ... (no tokens)","type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["items"],"additionalProperties":false},"PublishBufferResult":{"type":"object","properties":{"results":{"type":"array","items":{"type":"object","properties":{"channelId":{"type":"string"},"ok":{"type":"boolean"},"postId":{"type":"string"},"status":{"type":"string"},"dueAt":{"type":"string"},"error":{"type":"string"}},"required":["channelId","ok"],"additionalProperties":false}},"recorded":{"description":"Whether the posts were recorded on contentId","type":"boolean"}},"required":["results"],"additionalProperties":false},"PublishBufferRequest":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":25000},"channelIds":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":128}},"mode":{"description":"shareNow, addToQueue, customScheduled (needs dueAt), draft","type":"string","enum":["shareNow","addToQueue","customScheduled","draft"]},"dueAt":{"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|([+-]\\d{2}:\\d{2})))$"},"imageUrl":{"description":"A public https URL, or the `s3://` path of one of your saved images (for example `job.result.image.path` of generate.socialPost, or media.generatedImages.import); a path is sent to Buffer as a 30-day download link","type":"string","maxLength":2048,"pattern":"^(https|s3):\\/\\/\\S+$"},"videoUrl":{"description":"A video instead of an image: an https URL, or the `s3://` path of one of your rendered videos (`job.result.videos[].path` of generate.videoAd), sent as a 7-day link","type":"string","maxLength":4096,"pattern":"^(https|s3):\\/\\/\\S+$"},"contentId":{"description":"GeneratedContent record; the posts are recorded on it","type":"string","minLength":1,"maxLength":128},"versions":{"description":"Channel id → its own text (see social.fit), or a thread on X, Threads, Bluesky and Mastodon","type":"object","propertyNames":{"type":"string","minLength":1,"maxLength":128},"additionalProperties":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":25000},"thread":{"minItems":2,"maxItems":25,"type":"array","items":{"type":"string","minLength":1,"maxLength":25000}},"videoUrl":{"description":"This channel's video, for example the 9:16 cut for Instagram and TikTok","type":"string","maxLength":4096,"pattern":"^(https|s3):\\/\\/\\S+$"},"postType":{"description":"Instagram and Facebook: feed post, reel or story (default: reel with a video, else feed post). Instagram needs an image or a video","type":"string","enum":["post","reel","story"]},"vertical":{"description":"False for a landscape video (YouTube regular video instead of a Short)","type":"boolean"}},"required":["text"]}}},"required":["text","channelIds","mode"]},"IntegrationEndpoint":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"host":{"type":"string"},"platform":{"anyOf":[{"type":"string"},{"type":"null"}]},"active":{"type":"boolean"},"usable":{"description":"False when it is turned off or its token can't be read","type":"boolean"}},"required":["id","name","host","platform","active","usable"],"additionalProperties":false},"IntegrationEndpoints":{"type":"object","properties":{"endpoints":{"type":"array","items":{"$ref":"#/components/schemas/IntegrationEndpoint"}}},"required":["endpoints"],"additionalProperties":false},"Setting":{"type":"object","properties":{"key":{"type":"string","enum":["epsimoagents","integrations","ideation"]},"data":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["key","data","updatedAt"],"additionalProperties":false},"SettingSaved":{"type":"object","properties":{"key":{"type":"string","enum":["epsimoagents","integrations","ideation"]},"updatedAt":{"anyOf":[{"type":"string"},{"type":"null"}]}},"required":["key","updatedAt"],"additionalProperties":false},"UpdateSettingRequest":{"type":"object","properties":{"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["data"]},"ChannelProfile":{"type":"object","properties":{"channel":{"type":"string"},"label":{"type":"string"},"maxChars":{"description":"Hard limit (UTF-16 code units, as Buffer counts)","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"target":{"description":"The length that works best (the medium length)","type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"lengths":{"description":"Character range of each post length a brief can ask for","type":"object","properties":{"short":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"medium":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"long":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false}},"required":["short","medium","long"],"additionalProperties":false},"foldChars":{"description":"Characters shown before \"see more\"","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"structure":{"type":"array","items":{"type":"string"}},"hashtags":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"thread":{"type":"object","properties":{"postMaxChars":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxPosts":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["postMaxChars","maxPosts"],"additionalProperties":false},"image":{"type":"object","properties":{"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"label":{"type":"string"}},"required":["width","height","label"],"additionalProperties":false}},"required":["channel","label","maxChars","target","structure","hashtags","image"],"additionalProperties":false},"ChannelProfiles":{"type":"object","properties":{"channels":{"type":"array","items":{"$ref":"#/components/schemas/ChannelProfile"}}},"required":["channels"],"additionalProperties":false},"SocialFit":{"type":"object","properties":{"channel":{"type":"string"},"length":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"maxChars":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"target":{"type":"object","properties":{"min":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"max":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["min","max"],"additionalProperties":false},"status":{"type":"string","enum":["over","long","short","ok"]},"hashtagCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"hashtagsOk":{"type":"boolean"},"fitted":{"description":"The post cut to the limit with the allowed number of hashtags; the text itself when it fits","type":"string"},"thread":{"description":"The post as numbered thread posts, when the channel has threads and the post is longer than one","type":"array","items":{"type":"string"}}},"required":["channel","length","maxChars","target","status","hashtagCount","hashtagsOk","fitted"],"additionalProperties":false},"FitSocialPostRequest":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":25000},"channel":{"description":"linkedin, twitter (or x), facebook, instagram, threads, or another Buffer service","type":"string","minLength":1,"maxLength":40}},"required":["text","channel"]},"RevokedTokens":{"type":"object","properties":{"revoked":{"type":"array","items":{"type":"string"}}},"required":["revoked"],"additionalProperties":false},"ApiToken":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"tokenPrefix":{"description":"First 8 characters of the token, for display","type":"string"},"status":{"type":"string","enum":["active","revoked","expired"]},"scopes":{"description":"\"*\" marks a legacy full-access token","anyOf":[{"type":"string","const":"*"},{"type":"array","items":{"type":"string","enum":["content:read","content:write","publish:read","publish:write","connections:manage","media:read","media:write","settings:read","settings:write","jobs:read","jobs:write","tokens:manage","maintenance:read","maintenance:write"]}}]},"legacyFullAccess":{"type":"boolean"},"aiAccess":{"type":"string","enum":["none","active","expired","removed"]},"aiAccessEndsAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"createdVia":{"anyOf":[{"type":"string","enum":["ui","cli","api","legacy"]},{"type":"null"}]},"parentTokenId":{"anyOf":[{"type":"string"},{"type":"null"}]},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"lastUsedAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"requestsToday":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"createdAt":{"type":"string"},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","name","tokenPrefix","status","scopes","legacyFullAccess","aiAccess","aiAccessEndsAt","createdVia","parentTokenId","expiresAt","lastUsedAt","requestsToday","createdAt","version"],"additionalProperties":false},"UpdateTokenRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100}},"required":["name"]},"TokenApprovalResult":{"type":"object","properties":{"token":{"$ref":"#/components/schemas/ApiToken"},"secret":{"description":"The plaintext token, returned once; absent for CLI approvals (the CLI receives it)","type":"string"},"aiAccess":{"type":"string","enum":["granted","not_granted"]},"aiAccessReason":{"type":"string"}},"required":["token","aiAccess"],"additionalProperties":false},"SessionDelegationRequest":{"type":"object","properties":{"refreshToken":{"description":"The browser session's Cognito refresh token","type":"string","minLength":20,"maxLength":8192}},"required":["refreshToken"]},"TokenApproval":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["pending","redirected","completed"]},"name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string","enum":["content:read","content:write","publish:read","publish:write","connections:manage","media:read","media:write","settings:read","settings:write","jobs:read","jobs:write","tokens:manage","maintenance:read","maintenance:write"]}},"expiresAt":{"anyOf":[{"type":"string"},{"type":"null"}]},"aiAccess":{"type":"boolean"},"via":{"type":"string","enum":["ui","cli"]},"cliSessionId":{"type":"string"},"createdAt":{"type":"string"}},"required":["id","status","name","scopes","expiresAt","aiAccess","via","createdAt"],"additionalProperties":false},"CreatedTokenApproval":{"type":"object","properties":{"approval":{"$ref":"#/components/schemas/TokenApproval"},"next":{"type":"object","properties":{"action":{"description":"delegate: open url in the browser (top-level navigation); complete: POST url","type":"string","enum":["delegate","complete"]},"url":{"type":"string"}},"required":["action","url"],"additionalProperties":false}},"required":["approval","next"],"additionalProperties":false},"CreateTokenApprovalRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"minItems":1,"type":"array","items":{"type":"string","enum":["content:read","content:write","publish:read","publish:write","connections:manage","media:read","media:write","settings:read","settings:write","jobs:read","jobs:write","tokens:manage","maintenance:read","maintenance:write"]}},"expiresAt":{"description":"Default 90 days, at most 365 days away","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|([+-]\\d{2}:\\d{2})))$"},"aiAccess":{"description":"Ask for AI access (a Delegated_Credential); needs a Cognito sign-in","default":true,"type":"boolean"},"via":{"default":"ui","type":"string","enum":["ui","cli"]},"cliSessionId":{"description":"Required when via is cli","type":"string","minLength":1,"maxLength":128}},"required":["name","scopes"]},"TokenList":{"type":"object","properties":{"items":{"type":"array","items":{"$ref":"#/components/schemas/ApiToken"}}},"required":["items"],"additionalProperties":false},"CreatedToken":{"type":"object","properties":{"token":{"$ref":"#/components/schemas/ApiToken"},"secret":{"description":"The plaintext token, shown only in this response","type":"string"}},"required":["token","secret"],"additionalProperties":false},"CreateTokenRequest":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"scopes":{"description":"Scopes the token holds; at most those of the creating token","minItems":1,"type":"array","items":{"type":"string","enum":["content:read","content:write","publish:read","publish:write","connections:manage","media:read","media:write","settings:read","settings:write","jobs:read","jobs:write","tokens:manage","maintenance:read","maintenance:write"]}},"expiresAt":{"description":"Default 90 days, at most 365 days away","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|([+-]\\d{2}:\\d{2})))$"}},"required":["name","scopes"]}},"securitySchemes":{"bearer":{"type":"http","scheme":"bearer","description":"A `cg_` API token or a Cognito ID token."}}}}