{"openapi":"3.1.0","info":{"title":"Scheeleworks API","version":"0.1.0","description":"REST API for your organization's data and agents.\n\n**Auth:** `Authorization: Bearer <api key>` (create keys in Settings → API keys). Each key has explicit scopes.\n**Rate limits:** 100 requests per minute per key, app token or user (keys can set their own limit; a person reading in the web app gets more room). Every response carries `X-RateLimit-Limit`, `X-RateLimit-Remaining` and `X-RateLimit-Reset` (Unix seconds); 429 responses add `Retry-After` (seconds).\n**Partner apps** use OAuth 2.1 (authorization code + PKCE S256). Metadata: `/.well-known/oauth-authorization-server`.\n**IDs** are opaque and prefixed (`ws_…`, `run_…`, `key_…`). **Lists** use cursor pagination: pass `cursor` from `next_cursor`.\n**Schemas:** `GET /v1/schemas/{resource}` returns JSON Schema for each resource.\n\n**Scopes** are `resource:action`; each route needs one. Sending (email, texts, chats, LinkedIn, calls) always needs `messages:send`, named explicitly. `resource:*` grants a resource's read and write.\nScopes: `connections:read` (Read connected accounts and their sync status), `connections:write` (Connect accounts and change their sync), `knowledge:read` (Read the knowledge base (positioning, products, proof points, voice, audience, claims, playbooks)), `knowledge:write` (Change the knowledge base), `messages:send` (Send email, texts and posts, and start or resume automation that sends. Only ever granted by name), `settings:read` (Read organization settings), `settings:write` (Change organization settings (owners)), `members:read` (Read members and their roles), `members:write` (Invite, change and remove members (owners)), `billing:read` (Read the plan and usage), `billing:write` (Change the plan, seats and invoices (owners)), `security:write` (Single sign-on, SCIM, data-source access, secrets, webhooks, MCP servers, exports and the organization itself (owners)), `integrations:write` (Connect organization-wide vendors and providers (owners)), `audit:read` (Read the audit log), `agents:read` (Read agents and runs), `agents:write` (Create, configure and run agents), `approvals:write` (Approve or reject queued agent actions), `keys:write` (Create and revoke API keys), `marketing:read` (Read brands, audiences, campaigns, assets, channel accounts and results), `marketing:write` (Create and change brands, audiences, campaigns, assets and channel accounts (never sends, publishes or spends on its own)), `edge:write` (The edge worker in front of one of your sites: read what it serves there and report AI crawler visits; nothing else), `mkt-approvals:read` (Read the marketing approvals waiting for your organization and who manages it; nothing else), `mkt-approvals:write` (Approve or reject marketing approvals in the inbox; nothing else), `app-inbox:write` (An app's inbox: read a person's in-app messages, mark them seen or dismissed and register devices; nothing else)\nBundles (the scopes from before fine-grained scopes; existing keys keep them): `org:read` = `settings:read` `members:read` `billing:read`; `org:write` = `settings:write` `members:write` `billing:write` `security:write` `integrations:write`"},"servers":[{"url":"https://api.scheeleworks.com"}],"components":{"securitySchemes":{"apiKey":{"type":"http","scheme":"bearer","description":"API key (ma_live_…)"},"session":{"type":"apiKey","in":"cookie","name":"better-auth.session_token","description":"Browser session from the web app. In production the cookie is named __Secure-better-auth.session_token."},"oauth2":{"type":"oauth2","flows":{"authorizationCode":{"authorizationUrl":"https://app.scheeleworks.com/oauth/authorize","tokenUrl":"https://api.scheeleworks.com/oauth/token","refreshUrl":"https://api.scheeleworks.com/oauth/token","scopes":{"org:read":"Bundle: read organization settings, members and the plan","org:write":"Bundle: manage organization settings, members, billing, security and integrations","audit:read":"Read the audit log","agents:read":"Read agents and runs","agents:write":"Create, configure and run agents","approvals:write":"Approve or reject queued agent actions","keys:write":"Create and revoke API keys","connections:read":"Read connected accounts and their sync status","connections:write":"Connect accounts and change their sync","knowledge:read":"Read the knowledge base (positioning, products, proof points, voice, audience, claims, playbooks)","knowledge:write":"Change the knowledge base","messages:send":"Send email, texts and posts, and start or resume automation that sends. Only ever granted by name","settings:read":"Read organization settings","settings:write":"Change organization settings (owners)","members:read":"Read members and their roles","members:write":"Invite, change and remove members (owners)","billing:read":"Read the plan and usage","billing:write":"Change the plan, seats and invoices (owners)","security:write":"Single sign-on, SCIM, data-source access, secrets, webhooks, MCP servers, exports and the organization itself (owners)","integrations:write":"Connect organization-wide vendors and providers (owners)","marketing:read":"Read brands, audiences, campaigns, assets, channel accounts and results","marketing:write":"Create and change brands, audiences, campaigns, assets and channel accounts (never sends, publishes or spends on its own)","edge:write":"The edge worker in front of one of your sites: read what it serves there and report AI crawler visits; nothing else","mkt-approvals:read":"Read the marketing approvals waiting for your organization and who manages it; nothing else","mkt-approvals:write":"Approve or reject marketing approvals in the inbox; nothing else","app-inbox:write":"An app's inbox: read a person's in-app messages, mark them seen or dismissed and register devices; nothing else"}}}}}},"paths":{"/v1/mkt/orchestrator/background":{"get":{"tags":["Plans"],"summary":"Background agents: what runs overnight or on a schedule, its credit budget per run and its last runs","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Plans"],"summary":"Set an agent or a plan step to run in the background (overnight, daily or weekly) as a dry run; results wait in the morning queue","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":120},"agent_id":{"type":"string","pattern":"^agt_[0-9a-z]{26}$"},"plan_id":{"type":"string","pattern":"^pln_[0-9a-z]{26}$"},"step_id":{"type":"string","pattern":"^or_stp_[0-9a-z]{26}$"},"skill_id":{"type":"string","pattern":"^or_skl_[0-9a-z]{26}$"},"task":{"type":"string","maxLength":2000},"cadence":{"type":"string","enum":["overnight","daily","weekly","event","threshold"]},"hour":{"type":"integer","minimum":0,"maximum":23},"weekday":{"type":"integer","minimum":0,"maximum":6},"credit_budget":{"type":"number","exclusiveMinimum":0,"maximum":10000},"event_type":{"type":"string","maxLength":80},"watch":{"type":"object","properties":{"metric":{"type":"string","maxLength":60},"op":{"type":"string","enum":["above","below"]},"value":{"type":"number","minimum":-1000000000000,"maximum":1000000000000},"days":{"type":"integer","minimum":1,"maximum":90},"campaign_id":{"type":"string","pattern":"^cmp_[0-9a-z]{26}$"},"source":{"description":"channel (default): ad and channel accounts; site or page: the website's figures; visibility: the share of AI answers mentioning the brand","type":"string","enum":["channel","site","page","visibility"]},"ref":{"description":"For site or page: the site's origin or the page's address","type":"string","maxLength":300}},"required":["metric","op","value","days"],"additionalProperties":false},"runs_per_day":{"type":"integer","minimum":1,"maximum":24}},"required":["name","agent_id","cadence","credit_budget"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/background/{id}/status":{"post":{"tags":["Plans"],"summary":"Turn a background agent on (a person) or off (anyone who can change marketing work; a running run stops)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"on":{"type":"boolean"}},"required":["on"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/queue":{"get":{"tags":["Plans"],"summary":"The morning queue: what background agents produced, grouped by plan, each with what it would do and what it cost","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"status","in":"query","required":true,"schema":{"default":"waiting","type":"string","enum":["waiting","decided"]}},{"name":"limit","in":"query","required":true,"schema":{"default":100,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/queue/{id}/verdict":{"post":{"tags":["Plans"],"summary":"Accept (optionally edited) or turn down an item in the morning queue; nothing in the queue acts until a person accepts it","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"decision":{"type":"string","enum":["accept","turn_down"]},"edited_body":{"type":"string","maxLength":20000},"reason":{"type":"string","maxLength":500},"acknowledged":{"type":"boolean"}},"required":["decision"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/skills":{"get":{"tags":["Plans"],"summary":"Marketing skills: named, versioned instructions with the tools they may use and the checks they must pass","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Plans"],"summary":"Write a skill, or import one from SKILL.md or a zip; it's checked and saved as a draft until an owner turns it on","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"skill_md":{"type":"string","maxLength":250000},"zip_base64":{"type":"string","maxLength":3000000},"name":{"type":"string","maxLength":64},"description":{"type":"string","maxLength":1024},"instructions":{"type":"string","maxLength":200000},"tools":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":80}},"checks":{"maxItems":5,"type":"array","items":{"type":"string","maxLength":20}}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/skills/{id}":{"get":{"tags":["Plans"],"summary":"A skill with its instructions, findings and the runs that used it","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/skills/{id}/status":{"post":{"tags":["Plans"],"summary":"Turn a skill on (an owner, after reading it) or off","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"on":{"type":"boolean"},"acknowledged":{"type":"boolean"},"revision":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["on"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/skills/{id}/assignments":{"post":{"tags":["Plans"],"summary":"Assign a skill that's on to an agent, or to a step of a draft plan","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"agent_id":{"type":"string","pattern":"^agt_[0-9a-z]{26}$"},"step_id":{"type":"string","pattern":"^or_stp_[0-9a-z]{26}$"}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/skill-assignments/{id}":{"delete":{"tags":["Plans"],"summary":"Remove a skill from an agent or step","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/delegations":{"get":{"tags":["Plans"],"summary":"Tasks handed to outside agents (proposed, approved, sent), with exactly what each shared, and the connected agents that take tasks","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Plans"],"summary":"Propose handing a task to an outside agent: it waits for the approval chain, bound to what would be shared; nothing is sent before it's approved","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connection_id":{"type":"string","minLength":3,"maxLength":60},"task":{"type":"string","minLength":10,"maxLength":4000},"plan_id":{"type":"string","pattern":"^pln_[0-9a-z]{26}$"},"shared_hash":{"type":"string","pattern":"^[0-9a-f]{64}$"}},"required":["connection_id","task","shared_hash"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/delegations/preview":{"post":{"tags":["Plans"],"summary":"See exactly what would be shared with an outside agent before proposing a hand-off (nothing is saved or sent)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connection_id":{"type":"string","minLength":3,"maxLength":60},"task":{"type":"string","minLength":10,"maxLength":4000},"plan_id":{"type":"string","pattern":"^pln_[0-9a-z]{26}$"}},"required":["connection_id","task"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/campaign-modes":{"get":{"tags":["Plans"],"summary":"Campaigns with their own control mode (by hand, mixed, or by agents within their limits)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/campaigns/{id}/control-mode":{"put":{"tags":["Plans"],"summary":"Choose how a campaign is run: by hand, mixed (launches and spend increases wait for a person), or by agents within their limits","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^cmp_[0-9a-z]{26}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"control_mode":{"type":"string","enum":["manual","ai","mixed"]}},"required":["control_mode"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/builder/from-words":{"post":{"tags":["Plans"],"summary":"Describe the work in plain words and get a drafted layout for the plan builder to review (nothing is saved)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"words":{"type":"string","minLength":10,"maxLength":2000},"budget":{"type":"number","minimum":0,"maximum":1000000000}},"required":["words"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/program-audit":{"get":{"tags":["Plans"],"summary":"A cross-channel audit of your live programs: wasted spend, campaigns competing for the same audience, the costliest performers and audiences or accounts nothing reaches","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":true,"schema":{"default":30,"type":"integer","minimum":1,"maximum":90}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/agent-evaluation":{"get":{"tags":["Plans"],"summary":"Each agent's health (runs, success rate, run time, edit rate, its own scorers' average) and the most common failures, ranked","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":true,"schema":{"default":30,"type":"integer","minimum":1,"maximum":90}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/autopilot":{"get":{"tags":["Plans"],"summary":"For each kind of work, what more autonomy would save in waiting against how often people still change or turn down the work","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":true,"schema":{"default":30,"type":"integer","minimum":1,"maximum":90}},{"name":"agent_id","in":"query","required":false,"schema":{"type":"string","pattern":"^agt_[0-9a-z]{26}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/self-reviews":{"get":{"tags":["Plans"],"summary":"What agents found looking at their own results, and the revisions they propose to their owners","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/self-reviews/{id}/verdict":{"post":{"tags":["Plans"],"summary":"Accept or dismiss an agent's proposed revision (it changes nothing by itself)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^or_srv_[0-9a-z]{26}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"accept":{"type":"boolean"},"use_revision":{"type":"boolean"}},"required":["accept"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/directory":{"get":{"tags":["Plans"],"summary":"Prebuilt marketing agents by function: what each does and saves, whether its area is on, and the checks it passes","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/bundles":{"get":{"tags":["Plans"],"summary":"Role bundles: the agents, connections, starter skill and commands for a marketing role","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/bundles/{key}/install":{"post":{"tags":["Plans"],"summary":"Add a role bundle: draft agents and a draft skill (nothing runs, connects or goes outside)","x-required-scope":"agents:write","description":"Requires scope `agents:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z-]{2,40}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/template-reviews":{"get":{"tags":["Plans"],"summary":"Your organization's own agent templates and whether an owner verified their current version","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Plans"],"summary":"Ask an owner to review a template's current version before it shows as verified","x-required-scope":"agents:write","description":"Requires scope `agents:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"template_key":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{1,79}$"}},"required":["template_key"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/template-reviews/{id}/verdict":{"post":{"tags":["Plans"],"summary":"Verify a template's version, or ask for changes (owners; not the author or whoever asked)","x-required-scope":"agents:write","description":"Requires scope `agents:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^or_tpr_[0-9a-z]{26}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"verdict":{"type":"string","enum":["verified","changes_requested"]},"note":{"type":"string","maxLength":2000}},"required":["verdict"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/assistants":{"get":{"tags":["Plans"],"summary":"Assistants connected to the MCP server: what each may do (read, draft, propose, or as before) and whether it's on the allowlist","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":100,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T[\\d:.]+Z\\|or_ast_[0-9a-z]{26}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/assistants/{id}":{"patch":{"tags":["Plans"],"summary":"Change what a connected assistant may do through the MCP server, whether its actions wait for a yes instead of being refused, whether it's on the allowlist, or turn the built-in one off (an owner; more access, or allowing it, in the web app only)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^or_ast_[0-9a-z]{26}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tier":{"type":"string","enum":["read","draft","propose"]},"allowed":{"type":"boolean"},"off":{"type":"boolean"},"waits":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/assistants/keys/{key_id}":{"post":{"tags":["Plans"],"summary":"Set what an API key may do through the MCP server before its assistant first connects, or whether it's on the allowlist (an owner; more than read, or allowing it, in the web app only)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[{"name":"key_id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tier":{"type":"string","enum":["read","draft","propose"]},"allowed":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/assistants/allowlist":{"put":{"tags":["Plans"],"summary":"Turn the allowlist on (only allowed assistants may connect) or off (an owner; off in the web app only)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"on":{"type":"boolean"}},"required":["on"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/knowledge-answers":{"get":{"tags":["Plans"],"summary":"Answers from your knowledge base asked for today (customer replies and the website chat), against the daily ceiling","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/knowledge-answers/settings":{"put":{"tags":["Plans"],"summary":"Set the most knowledge-base answers a day (0 to 5,000; an owner; raising it in the web app only)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"daily_answers":{"type":"integer","minimum":0,"maximum":5000}},"required":["daily_answers"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/knowledge-answers/try":{"post":{"tags":["Plans"],"summary":"Ask a question as a customer would and see the answer your public knowledge-base sections give (or that there's none). Charged like any answer","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"question":{"type":"string","minLength":2,"maxLength":500},"channel":{"default":"chat","type":"string","enum":["chat","sms","whatsapp","email"]},"locale":{"type":"string","maxLength":12}},"required":["question","channel"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/plans":{"get":{"tags":["Plans"],"summary":"List plans with where each stands (the plan board)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Plans"],"summary":"Turn a goal and budget into a plan to review: channels, audiences, assets, KPIs, timeline, steps and cost. Nothing runs until it's approved","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"goal":{"type":"string","minLength":3,"maxLength":4000},"budget":{"type":"number","minimum":0,"maximum":1000000000},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"channels":{"maxItems":10,"type":"array","items":{"type":"string","enum":["search_ads","social_ads","email","social","seo","content"]}},"audiences":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":200}},"starts_on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"ends_on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"control_mode":{"type":"string","enum":["manual","ai","mixed"]}},"required":["workspace_id","goal"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/plans/{id}":{"get":{"tags":["Plans"],"summary":"Get a plan with its steps, approval, cost estimate and spend","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/plans/{id}/submit":{"post":{"tags":["Plans"],"summary":"Ask for a plan's approval (its approval chain decides; nothing runs before)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/plans/{id}/control-mode":{"put":{"tags":["Plans"],"summary":"Choose how a plan is run: by hand, by agents within their limits, or mixed","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"control_mode":{"type":"string","enum":["manual","ai","mixed"]}},"required":["control_mode"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/steps/{id}/agent":{"put":{"tags":["Plans"],"summary":"Choose the agent that does a plan step (or none: a person does it)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"agent_id":{"anyOf":[{"type":"string","pattern":"^agt_[0-9a-z]{26}$"},{"type":"null"}]}},"required":["agent_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/steps/{id}/complete":{"post":{"tags":["Plans"],"summary":"Mark a plan step that waits for a person as done","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"note":{"default":"","type":"string","maxLength":2000}},"required":["note"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/approvals":{"get":{"tags":["Plans"],"summary":"List marketing approvals with their chain of approvers","x-required-scope":"mkt-approvals:read","description":"Requires scope `mkt-approvals:read`.","security":[{"apiKey":[]},{"oauth2":["mkt-approvals:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","decided"]}},{"name":"subject_id","in":"query","required":false,"schema":{"type":"string","maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/approvals/{id}":{"get":{"tags":["Plans"],"summary":"Get a marketing approval: what changes, the chain and each decision","x-required-scope":"mkt-approvals:read","description":"Requires scope `mkt-approvals:read`.","security":[{"apiKey":[]},{"oauth2":["mkt-approvals:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/approvals/{id}/decide":{"post":{"tags":["Plans"],"summary":"Approve or reject the step of a marketing approval that waits for you","x-required-scope":"mkt-approvals:write","description":"Requires scope `mkt-approvals:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"decision":{"type":"string","enum":["approve","reject"]},"reason":{"type":"string","maxLength":2000},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["decision"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/proposals":{"post":{"tags":["Plans"],"summary":"Propose a marketing change for people to approve (launch, spend, publish, send…); nothing changes until the approval chain says yes","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":300},"summary":{"default":"","type":"string","maxLength":4000},"action_type":{"type":"string","enum":["publish","launch","spend_change","send","payout","site_change","crawler_rule","data_sync","outreach","paused_create"]},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"amount":{"type":"number","minimum":0,"maximum":1000000000},"changes":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"system":{"type":"string","maxLength":100},"field":{"type":"string","maxLength":200},"from":{},"to":{}},"required":["system","field"],"additionalProperties":false}},"operation":{"type":"object","properties":{"provider":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,40}$"},"operation":{"type":"string","pattern":"^[a-z][a-z0-9_.]{1,60}$"},"target":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"daily_increase":{"default":null,"anyOf":[{"type":"number","minimum":-1000000000,"maximum":1000000000},{"type":"null"}]}},"required":["provider","operation","target","daily_increase"],"additionalProperties":false}},"required":["title","summary","action_type","changes"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/autonomy":{"get":{"tags":["Plans"],"summary":"The autonomy ladder: each kind of marketing work with its rung (L0 to L4) and the most it allows","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"type":"string","pattern":"^agt_[0-9a-z]{26}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Plans"],"summary":"Set the autonomy rung for a kind of work, for the organization or one agent (owners; recorded)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"agent_id":{"default":null,"anyOf":[{"type":"string","pattern":"^agt_[0-9a-z]{26}$"},{"type":"null"}]},"activity":{"type":"string"},"rung":{"type":"string","enum":["L0","L1","L2","L3","L4"]},"flagged":{"default":false,"type":"boolean"},"note":{"type":"string","maxLength":500}},"required":["agent_id","activity","rung","flagged"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/autonomy/history":{"get":{"tags":["Plans"],"summary":"Every autonomy change: who, when, from which rung to which","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/autonomy/suggestion":{"get":{"tags":["Plans"],"summary":"Whether an agent has earned the next rung for a kind of work (after a clean record)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"agent_id","in":"query","required":true,"schema":{"type":"string","pattern":"^agt_[0-9a-z]{26}$"}},{"name":"activity","in":"query","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/switches":{"get":{"tags":["Plans"],"summary":"List the pause switches (organization, agent, channel, account, campaign, plan)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Plans"],"summary":"Pause or resume marketing work; pausing holds queued work at once (anyone who can write), resuming is for owners","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"scope":{"type":"string","enum":["org","agent","provider","channel_account","campaign","plan"]},"ref":{"default":"","type":"string","maxLength":60},"paused":{"type":"boolean"},"reason":{"default":"","type":"string","maxLength":300}},"required":["scope","ref","paused","reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/brand-roles":{"get":{"tags":["Plans"],"summary":"List who holds which brand role (brand manager, legal reviewer, channel owner, analyst, viewer)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Plans"],"summary":"Give a member a brand role (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"user_id":{"type":"string","minLength":3,"maxLength":60},"brand_id":{"default":null,"anyOf":[{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},{"type":"null"}]},"role":{"type":"string","enum":["brand_manager","legal_reviewer","channel_owner","analyst","viewer"]},"channel":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["user_id","brand_id","role"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/brand-roles/{id}":{"delete":{"tags":["Plans"],"summary":"Take a brand role away (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/chains":{"get":{"tags":["Plans"],"summary":"List the approval chains by kind of action (and brand, and amount)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Plans"],"summary":"Set the ordered approvers for a kind of action (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action_type":{"type":"string","enum":["publish","launch","spend_change","send","payout","site_change","crawler_rule","data_sync","outreach","paused_create"]},"brand_id":{"default":null,"anyOf":[{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},{"type":"null"}]},"min_amount":{"default":null,"anyOf":[{"type":"number","minimum":0,"maximum":1000000000},{"type":"null"}]},"steps":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["role","user"]},"ref":{"type":"string","minLength":2,"maxLength":60},"label":{"default":"","type":"string","maxLength":100}},"required":["kind","ref","label"],"additionalProperties":false}}},"required":["action_type","brand_id","min_amount","steps"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/settings":{"get":{"tags":["Plans"],"summary":"Agent platform settings: model per marketing task, change-rate limits and the notice ceiling","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Plans"],"summary":"Change agent platform settings (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"model_routes":{"type":"object","propertyNames":{"type":"string","enum":["copy","brief","plan","classify","extract","research","analysis","reply","translate"]},"additionalProperties":{"type":"string","enum":["classify","extract","draft","research","agent","plan"]}},"change_limits":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"integer","minimum":0,"maximum":100}},"notice_hourly_cap":{"type":"integer","minimum":1,"maximum":500},"digest":{"type":"object","properties":{"cadence":{"type":"string","enum":["daily","weekly","off"]},"recommendations":{"type":"boolean"}},"required":["cadence"],"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/activity":{"get":{"tags":["Plans"],"summary":"Agent activity: marketing changes, approvals, autonomy changes and pauses, newest first","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/digest":{"get":{"tags":["Plans"],"summary":"Your marketing digest as it stands now: what agents did, what waits for you, spend and credits against budget, what changed in results","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"period","in":"query","required":true,"schema":{"default":"day","type":"string","enum":["day","week"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/edit-rates":{"get":{"tags":["Plans"],"summary":"How much people change what each agent drafts, per kind of work: shipped as written, edited first, turned down","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":true,"schema":{"default":30,"type":"integer","minimum":1,"maximum":90}},{"name":"agent_id","in":"query","required":false,"schema":{"type":"string","pattern":"^agt_[0-9a-z]{26}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/slack":{"get":{"tags":["Plans"],"summary":"Slack approval cards: whether Slack is connected, your link and whether your cards are on","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/slack/link":{"post":{"tags":["Plans"],"summary":"Link your Slack account for approval cards: a confirmation goes to that Slack member, and cards start once you confirm there","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"slack_user_id":{"type":"string","minLength":3,"maxLength":24},"cards":{"type":"boolean"}},"required":["slack_user_id","cards"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Plans"],"summary":"Turn your Slack approval cards (and your digest in Slack) on or off","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"cards":{"type":"boolean"},"digest":{"type":"boolean"}},"required":["cards"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Plans"],"summary":"Unlink your Slack account (no more cards)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/settings/overview":{"get":{"tags":["Plans"],"summary":"Everything the autonomy and approvals settings page shows, in one request","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"type":"string","pattern":"^agt_[0-9a-z]{26}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/deep-dives":{"post":{"tags":["Plans"],"summary":"Ask several specialist agents one question at once; a review reconciles their findings into one action plan (a plan to approve, inside a credit budget)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"question":{"type":"string","minLength":10,"maxLength":2000},"credit_budget":{"type":"number","minimum":1,"maximum":100000},"specialists":{"minItems":1,"maxItems":6,"type":"array","items":{"type":"object","properties":{"agent_id":{"type":"string","pattern":"^agt_[0-9a-z]{26}$"},"focus":{"type":"string","minLength":3,"maxLength":500},"credits":{"type":"number","minimum":1,"maximum":10000}},"required":["agent_id","focus"],"additionalProperties":false}}},"required":["workspace_id","question","credit_budget","specialists"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/agent-tests":{"get":{"tags":["Plans"],"summary":"List A/B tests of agent versions (with their holdout)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Plans"],"summary":"Start an A/B test of an agent's versions with a holdout share done by a person (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"agent_id":{"type":"string","pattern":"^agt_[0-9a-z]{26}$"},"name":{"type":"string","minLength":2,"maxLength":120},"holdout_pct":{"default":10,"type":"integer","minimum":0,"maximum":50}},"required":["agent_id","name","holdout_pct"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/agent-tests/{id}/stop":{"post":{"tags":["Plans"],"summary":"Stop an agent A/B test (its readout stays)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/agent-tests/{id}/readout":{"get":{"tags":["Plans"],"summary":"An agent A/B test's readout: each version and the holdout, side by side","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/builder/check":{"post":{"tags":["Plans"],"summary":"Check a plan laid out in the builder (steps, tools, agents, spend): every problem with what to change; saves nothing","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"name":{"type":"string","minLength":2,"maxLength":200},"goal":{"type":"string","minLength":3,"maxLength":4000},"budget":{"type":"number","minimum":0,"maximum":1000000000},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"control_mode":{"type":"string","enum":["manual","ai","mixed"]},"steps":{"maxItems":17,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"module":{"type":"string","maxLength":40},"activity":{"type":"string","maxLength":60},"agent_id":{"anyOf":[{"type":"string","pattern":"^agt_[0-9a-z]{26}$"},{"type":"null"}]},"tools":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":80}},"daily_spend":{"type":"number","minimum":-1000000000,"maximum":1000000000},"detail":{"type":"string","maxLength":2000}},"required":["title","module","activity"],"additionalProperties":false}}},"required":["workspace_id","name","goal","steps"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/builder/plans":{"post":{"tags":["Plans"],"summary":"Save a plan laid out in the builder as a draft in Plan Mode (nothing runs until it's approved)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"name":{"type":"string","minLength":2,"maxLength":200},"goal":{"type":"string","minLength":3,"maxLength":4000},"budget":{"type":"number","minimum":0,"maximum":1000000000},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"control_mode":{"type":"string","enum":["manual","ai","mixed"]},"steps":{"maxItems":17,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"module":{"type":"string","maxLength":40},"activity":{"type":"string","maxLength":60},"agent_id":{"anyOf":[{"type":"string","pattern":"^agt_[0-9a-z]{26}$"},{"type":"null"}]},"tools":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":80}},"daily_spend":{"type":"number","minimum":-1000000000,"maximum":1000000000},"detail":{"type":"string","maxLength":2000}},"required":["title","module","activity"],"additionalProperties":false}}},"required":["workspace_id","name","goal","steps"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/orchestrator/agent-card":{"get":{"tags":["Plans"],"summary":"What outside agent platforms read to delegate marketing work here: the skills offered and how to call them","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/overview":{"get":{"tags":["Guardrails"],"summary":"The central admin view: every agent (state, pause, autonomy, last run), recent actions, approvals waiting, pauses, spend and connected accounts","x-required-scope":"audit:read","description":"Requires scope `audit:read`.","security":[{"apiKey":[]},{"oauth2":["audit:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/campaign-ceilings":{"get":{"tags":["Guardrails"],"summary":"Daily media ceilings set per campaign, with each campaign's live daily budgets","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/campaign-ceilings/{campaign_id}":{"put":{"tags":["Guardrails"],"summary":"Set a campaign's daily media ceiling (an owner; lowering an existing one is anyone's who may change settings), or remove it with null (an owner)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"string","pattern":"^cmp_[0-9a-z]{26}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"daily_ceiling":{"anyOf":[{"type":"number","minimum":0,"maximum":10000000000},{"type":"null"}]}},"required":["daily_ceiling"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/lift-ledger":{"get":{"tags":["Guardrails"],"summary":"The claims ledger: lift figures measured with your own holdouts, the only ones the product states","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/lift-ledger/record":{"post":{"tags":["Guardrails"],"summary":"Record the lift your own holdouts measured over a period (only readouts with enough people and a clear result are kept)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"month":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/connector-scopes":{"get":{"tags":["Guardrails"],"summary":"What each connector asks your accounts for, why, whether it reads or writes, and when it's asked","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/erasure/possible-consents":{"post":{"tags":["Guardrails"],"summary":"Likeness and voice consents recorded under a name only that are possibly this person's (the same name as one of their profiles), each with whether you ticked it. An owner, in the web app","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","minLength":3,"maxLength":320}},"required":["email"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Guardrails"],"summary":"Tick which of those consents are this person's (the list replaces earlier ticks, for a day); only ticked ones are anonymised and revoked when the person is erased","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","minLength":3,"maxLength":320},"consent_ids":{"maxItems":200,"type":"array","items":{"type":"string","pattern":"^gv_lc_[0-9a-z]{26}$"}}},"required":["email","consent_ids"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/outside-budget":{"put":{"tags":["Guardrails"],"summary":"Turn on or off budget and spend increases by outside assistants (keys and connected apps). On, they can only propose them for a person; turning it off is the web app's","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"blocked":{"type":"boolean"}},"required":["blocked"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/mcp-gateway":{"get":{"tags":["Guardrails"],"summary":"Outside MCP servers your agents call: whether calls and removals go out, the ad account a vendor's server acts on, and each tool's class","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/mcp-gateway/servers/{id}":{"put":{"tags":["Guardrails"],"summary":"Turn a server's calls or removals on or off, or mark it as an ads vendor's server for one of your ad accounts (paid media's stop switch and ceilings then apply). Turning something on, or unbinding, is the web app's","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^msv_[0-9a-z]{26}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"calls_on":{"type":"boolean"},"removals_on":{"type":"boolean"},"ads":{"anyOf":[{"type":"object","properties":{"provider":{"type":"string","maxLength":40},"channel_account_id":{"type":"string","maxLength":80}},"required":["provider","channel_account_id"],"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/mcp-gateway/servers/{id}/tools/{tool}":{"put":{"tags":["Guardrails"],"summary":"Classify a server's tool as it is now: read, write or destructive. A tool nobody classified, or one that changed since, isn't called","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^msv_[0-9a-z]{26}$"}},{"name":"tool","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,64}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"class":{"type":"string","enum":["read","write","destructive"]}},"required":["class"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/mcp-gateway/calls":{"get":{"tags":["Guardrails"],"summary":"The call log for outside MCP servers: each call's server, tool, class and outcome (never its arguments or answer)","x-required-scope":"audit:read","description":"Requires scope `audit:read`.","security":[{"apiKey":[]},{"oauth2":["audit:read"]},{"session":[]}],"parameters":[{"name":"server_id","in":"query","required":false,"schema":{"type":"string","pattern":"^msv_[0-9a-z]{26}$"}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}T[\\d:.]+Z\\|gv_mc_[0-9a-z]{26}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/rule-sets":{"get":{"tags":["Guardrails"],"summary":"List guardrail and QA rule sets","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Guardrails"],"summary":"Add a rule set written in plain language (one rule per line)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"kind":{"default":"brand_safety","type":"string","enum":["brand_safety","claims","regulated","qa"]},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"source_text":{"type":"string","minLength":1,"maxLength":20000}},"required":["name","kind","source_text"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/rule-sets/compile":{"post":{"tags":["Guardrails"],"summary":"Preview the checks plain-language rules compile to (saves nothing)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"source_text":{"type":"string","maxLength":20000}},"required":["source_text"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/rule-sets/{id}":{"patch":{"tags":["Guardrails"],"summary":"Change a rule set or turn it on or off","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"source_text":{"type":"string","minLength":1,"maxLength":20000},"enabled":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/check":{"post":{"tags":["Guardrails"],"summary":"Check copy against the brand guardrails and QA rules before it goes out","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"action_type":{"default":"publish","type":"string","enum":["publish","launch","spend_change","send","payout","site_change","crawler_rule","data_sync","outreach","paused_create"]},"channel":{"default":"web","type":"string","minLength":1,"maxLength":40},"text":{"type":"string","maxLength":50000},"html":{"type":"string","maxLength":200000},"claims":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":500}}},"required":["action_type","channel"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/likeness-consents":{"get":{"tags":["Guardrails"],"summary":"List recorded likeness and voice consents","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Guardrails"],"summary":"Record a person's consent to use their likeness or voice","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"person_ref":{"type":"string","minLength":1,"maxLength":200},"person_name":{"type":"string","minLength":1,"maxLength":200},"uses":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","enum":["avatar","voice_clone","face_swap","dub"]}},"evidence":{"type":"string","minLength":1,"maxLength":4000},"expires_at":{"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))$"},"subject_profile_id":{"type":"string","pattern":"^prf_[0-9a-z]{26}$"},"subject_email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}},"required":["person_ref","person_name","uses","evidence"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/likeness-consents/{id}/revoke":{"post":{"tags":["Guardrails"],"summary":"Withdraw a likeness or voice consent (new uses stop at once)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/provenance/verify":{"post":{"tags":["Guardrails"],"summary":"Check a provenance label was signed here and hasn't been changed","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"manifest":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"signature":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["manifest"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/provenance/embedded":{"post":{"tags":["Guardrails"],"summary":"Read the AI marking embedded in an image, video or audio file and check it was signed here","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"media_base64":{"type":"string","minLength":8,"maxLength":1000000,"pattern":"^[A-Za-z0-9+/=\\s]+$"}},"required":["media_base64"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/settings":{"get":{"tags":["Guardrails"],"summary":"Get quiet hours, frequency caps and the monthly media ceiling","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Guardrails"],"summary":"Set quiet hours, frequency caps and the monthly media ceiling","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"quiet_hours":{"type":"object","properties":{"start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"timezone":{"type":"string","minLength":1,"maxLength":64},"channels":{"maxItems":4,"type":"array","items":{"type":"string","enum":["email","sms","whatsapp","push"]}}},"required":["start","end","timezone","channels"],"additionalProperties":false},"frequency_caps":{"type":"object","propertyNames":{"type":"string","enum":["email","sms","whatsapp","push"]},"additionalProperties":{"type":"object","properties":{"cap":{"type":"integer","minimum":1,"maximum":100},"window_hours":{"type":"integer","minimum":1,"maximum":720}},"required":["cap","window_hours"],"additionalProperties":false}},"monthly_spend_ceiling":{"anyOf":[{"type":"number","minimum":0,"maximum":1000000000000},{"type":"null"}]},"action_spend_ceiling":{"anyOf":[{"type":"number","minimum":0,"maximum":1000000000000},{"type":"null"}]},"regulated_checks":{"type":"boolean"},"packs":{"maxItems":8,"type":"array","items":{"type":"string","enum":["alcohol","gambling","finance","crypto","health","pharma","cannabis","special_ads"]}},"data_access":{"type":"object","properties":{"agents_pii":{"type":"boolean"},"outside_pii":{"type":"boolean"},"outside_destructive":{"type":"boolean"}},"required":["agents_pii","outside_pii"],"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/decisions":{"get":{"tags":["Guardrails"],"summary":"List guardrail checks, policy decisions on marketing changes and claim approvals (one by an organization's only member marked as approved alone), newest first","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/decisions/export":{"get":{"tags":["Guardrails"],"summary":"Export the decision log for a date range (JSON or CSV, up to 5,000 rows)","x-required-scope":"audit:read","description":"Requires scope `audit:read`.","security":[{"apiKey":[]},{"oauth2":["audit:read"]},{"session":[]}],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"format","in":"query","required":true,"schema":{"default":"json","type":"string","enum":["json","csv"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/preflight":{"post":{"tags":["Guardrails"],"summary":"Before spending credits on a draft, image or video: go, review or stop (pauses, credits left, the guardrails on the brief)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"module":{"type":"string","pattern":"^[a-z]{2,20}$"},"action_type":{"type":"string","enum":["publish","launch","spend_change","send","payout","site_change","crawler_rule","data_sync","outreach","paused_create"]},"credits":{"type":"number","minimum":0,"maximum":10000000},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"campaign_id":{"type":"string","pattern":"^cmp_[0-9a-z]{26}$"},"plan_id":{"type":"string","pattern":"^pln_[0-9a-z]{26}$"},"agent_id":{"type":"string","pattern":"^agt_[0-9a-z]{26}$"},"channel":{"type":"string","maxLength":40},"content":{"type":"object","properties":{"text":{"type":"string","maxLength":100000},"html":{"type":"string","maxLength":200000},"claims":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":500}}},"additionalProperties":false}},"required":["module","action_type"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/claims":{"get":{"tags":["Guardrails"],"summary":"List marketing claims with their evidence and whether a person approved them","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["proposed","approved","retired"]}},{"name":"limit","in":"query","required":true,"schema":{"default":100,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Guardrails"],"summary":"Add a claim with its evidence; another person approves it before copy may use it (the only member of an organization approves their own)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","minLength":3,"maxLength":500},"evidence":{"type":"string","minLength":3,"maxLength":4000},"source_url":{"type":"string","maxLength":500,"format":"uri"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"expires_on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["text","evidence"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/claims/{id}/approve":{"post":{"tags":["Guardrails"],"summary":"Approve a claim's evidence (a person other than the one who added it; an organization's only member may approve their own, marked as approved alone)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/claims/{id}/retire":{"post":{"tags":["Guardrails"],"summary":"Retire a claim (copy can't use it any more)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/audit-export":{"get":{"tags":["Guardrails"],"summary":"Export who approved what (bound to which change), what agents changed and the spend decisions, for a date range (JSON or CSV)","x-required-scope":"audit:read","description":"Requires scope `audit:read`.","security":[{"apiKey":[]},{"oauth2":["audit:read"]},{"session":[]}],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"format","in":"query","required":true,"schema":{"default":"json","type":"string","enum":["json","csv"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/spend-accounts":{"get":{"tags":["Guardrails"],"summary":"This month's media spend per connected account against its ceilings, who connected each account, and connections by provider","x-required-scope":"audit:read","description":"Requires scope `audit:read`.","security":[{"apiKey":[]},{"oauth2":["audit:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/governance/data-handling":{"get":{"tags":["Guardrails"],"summary":"What each model receives from your organization and on whose terms, and the commitment that your data never trains a model","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/design/figma/files/{key}/frames":{"get":{"tags":["Content"],"summary":"A Figma file's pages and top-level frames","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9]{10,64}$"}},{"name":"channel_account_id","in":"query","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/design/figma/files/{key}/tokens":{"get":{"tags":["Content"],"summary":"A Figma file's design tokens (variables; Figma Enterprise)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9]{10,64}$"}},{"name":"channel_account_id","in":"query","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/design/figma/files/{key}/kit-proposal":{"get":{"tags":["Content"],"summary":"Colours and fonts for the brand kit from a Figma file's design tokens (a proposal: nothing is saved until you save it as a kit version)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9]{10,64}$"}},{"name":"channel_account_id","in":"query","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/design/canva/brand-templates":{"get":{"tags":["Content"],"summary":"Your Canva brand templates (Canva Enterprise), a page at a time","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"channel_account_id","in":"query","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}},{"name":"continuation","in":"query","required":false,"schema":{"type":"string","maxLength":500}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/design/canva/brand-templates/{id}/fields":{"get":{"tags":["Content"],"summary":"A Canva brand template's fields, to fill one by one","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{3,100}$"}},{"name":"channel_account_id","in":"query","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/design/figma/imports":{"post":{"tags":["Content"],"summary":"Import Figma frames you choose into the asset library as drafts (at most 50; already imported ones are skipped)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"workspace_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ws_.*"},"brand_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^brd_.*"},"file_key":{"type":"string","pattern":"^[A-Za-z0-9]{10,64}$"},"frame_ids":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","pattern":"^[0-9]+[:-][0-9]+([;:-][0-9]+)*$"}}},"required":["channel_account_id","workspace_id","file_key","frame_ids"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/design/canva/designs":{"get":{"tags":["Content"],"summary":"Your Canva designs, a page at a time","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"channel_account_id","in":"query","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}},{"name":"continuation","in":"query","required":false,"schema":{"type":"string","maxLength":500}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/design/canva/imports":{"post":{"tags":["Content"],"summary":"Export a Canva design and import its pages into the asset library as drafts","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"workspace_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ws_.*"},"brand_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^brd_.*"},"design_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{3,100}$"},"title":{"type":"string","maxLength":200}},"required":["channel_account_id","workspace_id","design_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/design/canva/autofills":{"post":{"tags":["Content"],"summary":"Make a new design in your Canva from a brand template and the text you give (Canva Enterprise)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"brand_template_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{3,100}$"},"title":{"type":"string","minLength":1,"maxLength":255},"fields":{"type":"object","propertyNames":{"type":"string","pattern":"^[A-Za-z0-9_ -]{1,60}$"},"additionalProperties":{"type":"string","maxLength":2000}},"brand_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^brd_.*"},"approval_id":{"type":"string","minLength":3,"maxLength":60}},"required":["channel_account_id","brand_template_id","title","fields"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/design/bynder/media":{"get":{"tags":["Content"],"summary":"Images in your Bynder asset bank, a page of up to 100 at a time (newest first)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"channel_account_id","in":"query","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}},{"name":"page","in":"query","required":true,"schema":{"default":1,"type":"integer","minimum":1,"maximum":100}},{"name":"keyword","in":"query","required":false,"schema":{"type":"string","maxLength":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/design/bynder/{id}/daily-import":{"get":{"tags":["Content"],"summary":"Whether new Bynder images come into the library once a day","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Content"],"summary":"Turn the daily import of new Bynder images on (images added or changed from now on, at most 20 a day, as drafts) or off (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean"},"workspace_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ws_.*"},"brand_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^brd_.*"}},"required":["enabled"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/design/bynder/imports":{"post":{"tags":["Content"],"summary":"Import Bynder images you choose into the asset library as drafts (at most 50; limited-use, watermarked and archived assets stay in Bynder)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"workspace_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ws_.*"},"brand_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^brd_.*"},"ids":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9-]{8,64}$"}}},"required":["channel_account_id","workspace_id","ids"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/design/cloudinary/resources":{"get":{"tags":["Content"],"summary":"Images in your Cloudinary account, a page of up to 100 at a time","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"channel_account_id","in":"query","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/design/cloudinary/imports":{"post":{"tags":["Content"],"summary":"Import Cloudinary images you choose into the asset library as drafts (at most 50; already imported ones are skipped)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"workspace_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ws_.*"},"brand_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^brd_.*"},"public_ids":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_\\-/.]{1,200}$"}}},"required":["channel_account_id","workspace_id","public_ids"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/design/pushes":{"post":{"tags":["Content"],"summary":"Upload an approved asset to your Canva or Cloudinary account (checked first; recorded where it's used)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"asset_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ast_.*"},"approval_id":{"type":"string","minLength":3,"maxLength":60}},"required":["channel_account_id","asset_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/design/figma/templates":{"post":{"tags":["Content"],"summary":"Import a Figma frame as a layout template: its top-level text layers become the fields to fill, every other layer is locked","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"},"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"file_key":{"type":"string","pattern":"^[A-Za-z0-9]{10,64}$"},"frame_id":{"type":"string","pattern":"^[0-9]+[:-][0-9]+([;:-][0-9]+)*$"},"name":{"type":"string","minLength":1,"maxLength":120}},"required":["channel_account_id","workspace_id","file_key","frame_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/layout-templates":{"get":{"tags":["Content"],"summary":"Layout templates imported from design files, with their fields and locked layers","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ws_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/layout-templates/{id}/fill":{"post":{"tags":["Content"],"summary":"Fill a layout template's fields (brand-checked, each fitted to its box) and get a layered SVG to download; nothing is stored or sent","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"values":{"default":{},"type":"object","propertyNames":{"type":"string","pattern":"^[a-z0-9_]{1,40}$"},"additionalProperties":{"type":"string","maxLength":500}},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"}},"required":["values"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/layout-templates/{id}":{"delete":{"tags":["Content"],"summary":"Archive a layout template","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/assets/{id}/captions":{"get":{"tags":["Content"],"summary":"An asset's caption tracks (one per language)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ast_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Content"],"summary":"Add or replace a caption track (WebVTT or SubRip text; checked against the file's length; its words are checked against the brand in the file's checks)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ast_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"language":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z]{2})?$"},"format":{"type":"string","enum":["vtt","srt"]},"body":{"type":"string","minLength":1,"maxLength":500000}},"required":["language","format","body"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/assets/{id}/captions/{language}":{"get":{"tags":["Content"],"summary":"One caption track's text","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ast_.*"}},{"name":"language","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z]{2})?$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Content"],"summary":"Remove a caption track","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ast_.*"}},{"name":"language","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z]{2})?$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/assets/{id}/alt-text":{"get":{"tags":["Content"],"summary":"An image's alt text (one per language)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ast_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Content"],"summary":"Add or replace an image's alt text for one language (checked against the brand and for screen readers; the findings come back)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ast_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"language":{"default":"en","type":"string","pattern":"^[a-z]{2,3}(-[A-Z]{2})?$"},"text":{"type":"string","minLength":1,"maxLength":1000}},"required":["language","text"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/assets/{id}/alt-text/{language}":{"delete":{"tags":["Content"],"summary":"Remove an image's alt text for one language","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ast_.*"}},{"name":"language","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z]{2,3}(-[A-Z]{2})?$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/assets/{id}/preflight":{"get":{"tags":["Content"],"summary":"Everything checked about an asset's file: its header (type, size, length), the upload checks, captions and whether it can be used outside","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ast_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/assets/{id}/review":{"post":{"tags":["Content"],"summary":"Send an image, video, audio file or document for the same ordered review as copy (its checks must pass first)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ast_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/assets/{id}/preview":{"get":{"tags":["Content"],"summary":"A preview of an asset's current file for reviewers (images up to 3 MB; video, audio and PDFs up to 8 MB)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ast_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces/{id}/cms-changes/check":{"post":{"tags":["Content"],"summary":"Read back this piece's drafts in each CMS and keep edits made there for review (reads only; nothing is changed in the CMS)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^ct_pc_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/cms-changes":{"get":{"tags":["Content"],"summary":"Edits made in a CMS to drafts sent from here, waiting for a person","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"piece_id","in":"query","required":false,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^ct_pc_.*"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","accepted","dismissed"]}},{"name":"limit","in":"query","required":true,"schema":{"default":20,"type":"integer","minimum":1,"maximum":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/cms-changes/{id}/accept":{"post":{"tags":["Content"],"summary":"Accept an edit made in the CMS: it becomes the piece's next draft version and needs review again (a signed-in person)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^ct_cc_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/cms-changes/{id}/dismiss":{"post":{"tags":["Content"],"summary":"Dismiss an edit made in the CMS (the piece stays as it is here; a signed-in person)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^ct_cc_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/wordpress/media":{"post":{"tags":["Content"],"summary":"Upload an approved asset to a WordPress site's media library (checked first; not placed on any page, but the file gets a public address; recorded where it's used)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"asset_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ast_.*"},"alt_text":{"type":"string","maxLength":300},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"alt":{"type":"string","pattern":"^(none|[0-9a-f]{16})$"},"container":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,64}(\\/[A-Za-z0-9_.-]{1,64})?$"},"approval_id":{"type":"string","minLength":3,"maxLength":60}},"required":["channel_account_id","asset_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/cms/media":{"post":{"tags":["Content"],"summary":"Upload an approved asset to a CMS's media library or assets: WordPress, Webflow (site id) and Sanity (the file gets a public address) or Contentful (space/environment, unpublished)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"asset_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ast_.*"},"alt_text":{"type":"string","maxLength":300},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"alt":{"type":"string","pattern":"^(none|[0-9a-f]{16})$"},"container":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,64}(\\/[A-Za-z0-9_.-]{1,64})?$"},"approval_id":{"type":"string","minLength":3,"maxLength":60}},"required":["channel_account_id","asset_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/contentful/entries":{"get":{"tags":["Content"],"summary":"Entries in a Contentful space (newest first, 100 at a time)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"channel_account_id","in":"query","required":true,"schema":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"}},{"name":"container","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}\\/[A-Za-z0-9_.-]{1,64}$"}},{"name":"content_type","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,64}$"}},{"name":"skip","in":"query","required":true,"schema":{"default":0,"type":"integer","minimum":0,"maximum":10000}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/contentful/entries/import":{"post":{"tags":["Content"],"summary":"Bring a Contentful entry's text in as a draft piece (the entry isn't changed)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"},"container":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}\\/[A-Za-z0-9_.-]{1,64}$"},"entry_id":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,64}$"},"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"kind":{"default":"blog","type":"string","enum":["blog","landing_page","email","social","product_description","ad","press_release","other"]}},"required":["channel_account_id","container","entry_id","workspace_id","kind"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/contentful/assets":{"get":{"tags":["Content"],"summary":"Image assets in a Contentful space (newest first, 100 at a time)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"channel_account_id","in":"query","required":true,"schema":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"}},{"name":"container","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}\\/[A-Za-z0-9_.-]{1,64}$"}},{"name":"content_type","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,64}$"}},{"name":"skip","in":"query","required":true,"schema":{"default":0,"type":"integer","minimum":0,"maximum":10000}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/contentful/assets/import":{"post":{"tags":["Content"],"summary":"Import Contentful images you choose into the asset library as drafts (at most 50; already imported ones are skipped)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"},"container":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}\\/[A-Za-z0-9_.-]{1,64}$"},"asset_ids":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,64}$"}},"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"}},"required":["channel_account_id","container","asset_ids","workspace_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/shopify/collections":{"get":{"tags":["Content"],"summary":"A connected Shopify store's collections (up to 100 at a time)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"channel_account_id","in":"query","required":true,"schema":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/shopify/discounts":{"post":{"tags":["Content"],"summary":"Create a Shopify discount code (brand-checked; a key or agent needs a person's approval; read back)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"title":{"type":"string","minLength":3,"maxLength":100},"code":{"type":"string","pattern":"^[A-Z0-9_-]{3,30}$"},"percent":{"type":"integer","minimum":1,"maximum":90},"amount":{"type":"number","exclusiveMinimum":0,"maximum":10000},"starts_at":{"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))$"},"ends_at":{"default":null,"anyOf":[{"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))$"},{"type":"null"}]},"usage_limit":{"type":"integer","minimum":1,"maximum":100000},"approval_id":{"type":"string","minLength":3,"maxLength":60}},"required":["channel_account_id","title","code","starts_at","ends_at","usage_limit"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/merchant/promotions":{"get":{"tags":["Content"],"summary":"Merchant Center promotions with their state per destination","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"channel_account_id","in":"query","required":true,"schema":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"}},{"name":"page_token","in":"query","required":false,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Content"],"summary":"Add or update a Merchant Center promotion (brand-checked; a key or agent needs a person's approval; Google reviews it before it runs)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"},"data_source":{"type":"string","pattern":"^[0-9]{1,20}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"promotion_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,50}$"},"long_title":{"type":"string","minLength":3,"maxLength":60},"content_language":{"default":"en","type":"string","pattern":"^[a-z]{2}$"},"target_country":{"type":"string","pattern":"^[A-Z]{2}$"},"redemption_channel":{"default":["ONLINE"],"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["ONLINE","IN_STORE"]}},"offer_type":{"type":"string","enum":["NO_CODE","GENERIC_CODE"]},"generic_code":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,20}$"},"coupon_value_type":{"type":"string","enum":["PERCENT_OFF","MONEY_OFF","FREE_SHIPPING_STANDARD"]},"percent_off":{"type":"integer","minimum":1,"maximum":99},"money_off":{"type":"object","properties":{"amount":{"type":"number","exclusiveMinimum":0,"maximum":100000},"currency":{"type":"string","pattern":"^[A-Z]{3}$"}},"required":["amount","currency"],"additionalProperties":false},"starts_at":{"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))$"},"ends_at":{"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))$"},"destinations":{"default":["FREE_LISTINGS"],"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","enum":["SHOPPING_ADS","FREE_LISTINGS","FREE_LOCAL_LISTINGS","LOCAL_INVENTORY_ADS"]}},"approval_id":{"type":"string","minLength":3,"maxLength":60}},"required":["channel_account_id","data_source","promotion_id","long_title","content_language","target_country","redemption_channel","offer_type","coupon_value_type","starts_at","ends_at","destinations"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/merchant/products":{"post":{"tags":["Content"],"summary":"Add or update a product in a Merchant Center data source (brand-checked; through the approval rules)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"},"data_source":{"type":"string","pattern":"^[0-9]{1,20}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"offer_id":{"type":"string","pattern":"^[A-Za-z0-9_.-]{1,50}$"},"content_language":{"type":"string","pattern":"^[a-z]{2}$"},"feed_label":{"type":"string","pattern":"^[A-Z0-9_-]{1,20}$"},"title":{"type":"string","minLength":1,"maxLength":150},"link":{"type":"string","maxLength":2000,"format":"uri"},"price":{"type":"number","exclusiveMinimum":0,"maximum":1000000},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"approval_id":{"type":"string","minLength":3,"maxLength":60}},"required":["channel_account_id","data_source","offer_id","content_language","feed_label"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/webflow/pages":{"get":{"tags":["Content"],"summary":"A connected Webflow site's pages (up to 100 at a time)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"channel_account_id","in":"query","required":true,"schema":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"}},{"name":"site_id","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9]{1,64}$"}},{"name":"offset","in":"query","required":true,"schema":{"default":0,"type":"integer","minimum":0,"maximum":10000}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/webflow/pages/import":{"post":{"tags":["Content"],"summary":"Bring a Webflow page's text in as a draft landing page to work on here (the page in Webflow isn't changed)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"},"page_id":{"type":"string","pattern":"^[A-Za-z0-9]{1,64}$"},"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"}},"required":["channel_account_id","page_id","workspace_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/webflow/pages/settings":{"put":{"tags":["Content"],"summary":"Change a Webflow page's title, address and search settings (brand-checked; a key or agent needs a person's approval; shown once the site is published in Webflow)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"},"page_id":{"type":"string","pattern":"^[A-Za-z0-9]{1,64}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"title":{"type":"string","minLength":1,"maxLength":200},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,99}$"},"seo":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":500}},"additionalProperties":false},"open_graph":{"type":"object","properties":{"title":{"type":"string","maxLength":200},"description":{"type":"string","maxLength":500}},"additionalProperties":false},"approval_id":{"type":"string","minLength":3,"maxLength":60}},"required":["channel_account_id","page_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/activation/batches":{"post":{"tags":["Content"],"summary":"Send up to 25 approved items from Ready to go out, each to the place you chose (one at a time, each checked; results per item)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"items":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["piece","asset"]},"id":{"type":"string","pattern":"^(ct_pc|ast)_[0-9a-z]{26}$"},"channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"container":{"type":"string","maxLength":300}},"required":["type","id","channel_account_id"],"additionalProperties":false}},"approval_id":{"type":"string","minLength":3,"maxLength":60}},"required":["items"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/activation-queue":{"get":{"tags":["Content"],"summary":"Approved pieces and media waiting to go out, by channel, with what each still needs","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ws_.*"}},{"name":"channel","in":"query","required":false,"schema":{"type":"string","enum":["web","email","social","ads","library","other"]}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/brands/{id}/personas":{"get":{"tags":["Content"],"summary":"A brand's personas from its current kit version, with that version","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Content"],"summary":"Save a brand's personas (added, edited, reordered or removed) as a new kit version; refused if the kit changed since base_version","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"base_version":{"type":"integer","minimum":0,"maximum":9007199254740991},"personas":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":2000},"pains":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"language":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"objections":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}}},"required":["name"],"additionalProperties":false}},"note":{"type":"string","maxLength":500}},"required":["base_version","personas"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/brand/from-materials":{"post":{"tags":["Content"],"summary":"Propose a brand kit from your own materials: past emails, documents, PDFs and slide decks, about 700 KB at a time (nothing is saved until you save it as a kit version)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"files":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"base64":{"type":"string","maxLength":11184819},"text":{"type":"string","maxLength":400000}},"required":["name"],"additionalProperties":false}}},"required":["files"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/brand/from-website":{"post":{"tags":["Content"],"summary":"Propose a brand kit from a website (nothing is saved until you save it as a kit version)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"}},"required":["url"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/brands/{id}/voice":{"post":{"tags":["Content"],"summary":"Learn voice and style rules from writing samples (the brand's, or a named person's kept separately)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"samples":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":20,"maxLength":20000}},"person_name":{"type":"string","minLength":1,"maxLength":120}},"required":["samples"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/brands/{id}/context":{"get":{"tags":["Content"],"summary":"What agents know about a brand: kit, voice and products, with sources","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/brands/{id}/check":{"post":{"tags":["Content"],"summary":"Check text against a brand: banned phrases, claims needing proof, legal lines and tone","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":50000},"market_id":{"type":"string","maxLength":40},"person_name":{"type":"string","maxLength":120}},"required":["text"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/brands/{id}/markets/{market}":{"get":{"tags":["Content"],"summary":"A brand's kit as it applies in one market","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40}},{"name":"market","in":"path","required":true,"schema":{"type":"string","maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/brands/{id}/settings":{"get":{"tags":["Content"],"summary":"A brand's parent brand (whose rules it inherits), regulated-claim packs and accessibility colours","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Content"],"summary":"Set a brand's parent brand, regulated-claim packs (matches block approval) and accessibility colours","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"parent_brand_id":{"anyOf":[{"type":"string","maxLength":40,"format":"starts_with","pattern":"^brd_.*"},{"type":"null"}]},"regulated_packs":{"maxItems":4,"type":"array","items":{"type":"string","enum":["finance","health","pharma","alcohol"]}},"text_color":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]},"background_color":{"anyOf":[{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"},{"type":"null"}]},"require_alt_text":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces":{"get":{"tags":["Content"],"summary":"List content pieces, newest first, with their latest check","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"campaign_id","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["brief","outline","draft","in_review","changes_requested","approved","published_draft","archived"]}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["blog","landing_page","email","social","product_description","ad","press_release","other"]}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Content"],"summary":"Start a content piece from a brief, with its first text if you have it","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"market_id":{"type":"string","pattern":"^mkt_[0-9a-z]{26}$"},"campaign_id":{"type":"string","pattern":"^cmp_[0-9a-z]{26}$"},"product_id":{"type":"string","pattern":"^prd_[0-9a-z]{26}$"},"kind":{"type":"string","enum":["blog","landing_page","email","social","product_description","ad","press_release","other"]},"title":{"type":"string","minLength":1,"maxLength":200},"channel":{"type":"string","maxLength":40},"brief":{"type":"object","properties":{"goal":{"type":"string","maxLength":2000},"audience":{"type":"string","maxLength":1000},"offer":{"type":"string","maxLength":1000},"key_messages":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}},"mandatories":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}},"kpis":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":200}},"tone":{"type":"string","maxLength":200},"length":{"type":"integer","minimum":10,"maximum":5000},"keywords":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":100}}},"additionalProperties":false},"seo":{"type":"object","properties":{"title":{"type":"string","maxLength":70},"meta_description":{"type":"string","maxLength":170},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,99}$"},"keywords":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":100}},"canonical_url":{"type":"string","maxLength":2000,"format":"uri"}},"additionalProperties":false},"sources":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"title":{"type":"string","maxLength":300},"note":{"type":"string","maxLength":1000}},"required":["title"],"additionalProperties":false}},"scheduled_for":{"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))$"},"owner_id":{"type":"string","maxLength":60},"text":{"description":"The piece's first text, as Markdown. It's checked like any draft.","type":"string","minLength":1,"maxLength":50000}},"required":["workspace_id","kind","title"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/campaigns/{id}/workspace":{"get":{"tags":["Content"],"summary":"A campaign's workspace: its content pieces by where they stand (who started each) and its files","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^cmp_[0-9a-z]{26}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/campaigns/{id}/pieces":{"post":{"tags":["Content"],"summary":"Attach existing pieces to a campaign of their workspace (up to 50; a piece in another campaign moves to this one)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"piece_ids":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","minLength":3,"maxLength":60}}},"required":["piece_ids"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces/{id}":{"get":{"tags":["Content"],"summary":"A piece with its versions, checks, reviews, comments and CMS drafts","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Content"],"summary":"Change a piece's brief, outline, search fields, sources, schedule or owner. A brief or search fields you send replace the whole of what's there, so include what should stay","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"brief":{"type":"object","properties":{"goal":{"type":"string","maxLength":2000},"audience":{"type":"string","maxLength":1000},"offer":{"type":"string","maxLength":1000},"key_messages":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}},"mandatories":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}},"kpis":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":200}},"tone":{"type":"string","maxLength":200},"length":{"type":"integer","minimum":10,"maximum":5000},"keywords":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":100}}},"additionalProperties":false},"outline":{"maxItems":40,"type":"array","items":{"type":"string","maxLength":500}},"seo":{"type":"object","properties":{"title":{"type":"string","maxLength":70},"meta_description":{"type":"string","maxLength":170},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,99}$"},"keywords":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":100}},"canonical_url":{"type":"string","maxLength":2000,"format":"uri"}},"additionalProperties":false},"sources":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"title":{"type":"string","maxLength":300},"note":{"type":"string","maxLength":1000}},"required":["title"],"additionalProperties":false}},"scheduled_for":{"anyOf":[{"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))$"},{"type":"null"}]},"owner_id":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"channel":{"type":"string","maxLength":40},"archived":{"type":"boolean"},"product_id":{"anyOf":[{"type":"string","pattern":"^prd_[0-9a-z]{26}$"},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces/{id}/outline":{"post":{"tags":["Content"],"summary":"Propose an outline from the brief","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces/{id}/drafts":{"post":{"tags":["Content"],"summary":"Add a draft version: your own text, or generated from the brief (uses credits); every version is checked","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":100000},"instructions":{"type":"string","maxLength":2000},"base_version":{"description":"The version you wrote this from (0 when there's none yet). It's refused if someone saved a newer one.","type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces/{id}/check":{"post":{"tags":["Content"],"summary":"Check the current version again (brand rules and guardrails)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces/{id}/review":{"post":{"tags":["Content"],"summary":"Send the current version for review to its ordered approvers","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces/{id}/review/withdraw":{"post":{"tags":["Content"],"summary":"Take a piece back out of review","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/reviews/{id}/decision":{"post":{"tags":["Content"],"summary":"Approve the current review step or ask for changes (signed-in people only, in order)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"decision":{"type":"string","enum":["approve","request_changes"]},"note":{"type":"string","maxLength":2000}},"required":["decision"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces/bulk-edit":{"post":{"tags":["Content"],"summary":"Set the same campaign, owner, schedule or channel on up to 100 pieces (pieces in review or archived are skipped)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"piece_ids":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","pattern":"^ct_pc_[0-9a-z]{26}$"}},"set":{"type":"object","properties":{"campaign_id":{"anyOf":[{"type":"string","pattern":"^cmp_[0-9a-z]{26}$"},{"type":"null"}]},"owner_id":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"scheduled_for":{"anyOf":[{"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))$"},{"type":"null"}]},"channel":{"type":"string","maxLength":40}},"additionalProperties":false}},"required":["piece_ids","set"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces/{id}/compare":{"get":{"tags":["Content"],"summary":"What changed between two versions of a piece's text, paragraph by paragraph and word by word","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}},{"name":"from","in":"query","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"to","in":"query","required":true,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces/{id}/comments":{"post":{"tags":["Content"],"summary":"Comment on a version (a text range, an image region or a video frame)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"body":{"type":"string","minLength":1,"maxLength":4000},"anchor":{"type":"object","properties":{"quote":{"type":"string","maxLength":500},"start":{"type":"integer","minimum":0,"maximum":9007199254740991},"end":{"type":"integer","minimum":0,"maximum":9007199254740991},"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"w":{"type":"number","minimum":0,"maximum":1},"h":{"type":"number","minimum":0,"maximum":1},"frame_ms":{"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false}},"required":["version","body"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/assets/{id}/comments":{"post":{"tags":["Content"],"summary":"Comment on an asset version (an image region or a video frame)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"body":{"type":"string","minLength":1,"maxLength":4000},"anchor":{"type":"object","properties":{"quote":{"type":"string","maxLength":500},"start":{"type":"integer","minimum":0,"maximum":9007199254740991},"end":{"type":"integer","minimum":0,"maximum":9007199254740991},"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1},"w":{"type":"number","minimum":0,"maximum":1},"h":{"type":"number","minimum":0,"maximum":1},"frame_ms":{"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false}},"required":["version","body"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Content"],"summary":"An asset's review comments, oldest first","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/comments/{id}/resolve":{"post":{"tags":["Content"],"summary":"Resolve or reopen a comment","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"resolved":{"default":true,"type":"boolean"}},"required":["resolved"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces/{id}/repurpose":{"post":{"tags":["Content"],"summary":"Turn a piece into other formats (each a new draft; uses credits)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kinds":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","enum":["blog","landing_page","email","social","product_description","ad","press_release","other"]}}},"required":["kinds"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces/{id}/localize":{"post":{"tags":["Content"],"summary":"Make a market version with its glossary, locked terms and legal lines; a native speaker reviews it","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"market_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^mkt_.*"}},"required":["market_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces/{id}/publish":{"post":{"tags":["Content"],"summary":"Send an approved piece to a CMS as a draft (it isn't published there)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"},"container":{"type":"string","pattern":"^[A-Za-z0-9_.:\\/-]{1,120}$"},"replace_cms_edits":{"type":"boolean"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"state":{"type":"string","pattern":"^[0-9a-f]{16}$"}},"required":["channel_account_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/calendar":{"get":{"tags":["Content"],"summary":"Scheduled pieces in a window of up to three months","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"from","in":"query","required":true,"schema":{"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))$"}},{"name":"to","in":"query","required":true,"schema":{"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))$"}},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"string","maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/campaign-kits":{"post":{"tags":["Content"],"summary":"Turn a brief into a set of drafts across channels; without confirm it only shows the cost","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"campaign_id":{"type":"string","pattern":"^cmp_[0-9a-z]{26}$"},"title":{"type":"string","minLength":1,"maxLength":160},"brief":{"type":"object","properties":{"goal":{"type":"string","maxLength":2000},"audience":{"type":"string","maxLength":1000},"offer":{"type":"string","maxLength":1000},"key_messages":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}},"mandatories":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}},"kpis":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":200}},"tone":{"type":"string","maxLength":200},"length":{"type":"integer","minimum":10,"maximum":5000},"keywords":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":100}}},"additionalProperties":false},"kinds":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","enum":["blog","landing_page","email","social","product_description","ad","press_release","other"]}},"segments":{"maxItems":5,"type":"array","items":{"type":"string","maxLength":120}},"prompt":{"type":"string","maxLength":8000},"items":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["blog","landing_page","email","social","product_description","ad","press_release","other"]},"segment":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["kind","segment"],"additionalProperties":false}},"confirm":{"type":"boolean"}},"required":["workspace_id","title","brief","kinds"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Content"],"summary":"Campaign kits, newest first, with how many drafts each has made","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"limit","in":"query","required":true,"schema":{"default":20,"type":"integer","minimum":1,"maximum":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/campaign-kits/{id}":{"get":{"tags":["Content"],"summary":"A campaign kit and the drafts it made","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/library":{"get":{"tags":["Content"],"summary":"The asset library with each asset's current version, rights, live uses and whether it can be used outside","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["image","video","audio","copy","document","other"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","in_review","approved","archived"]}},{"name":"tag","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"name":"folder","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"expiring_within_days","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":365}},{"name":"limit","in":"query","required":true,"schema":{"default":48,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/assets/{id}/upload":{"post":{"tags":["Content"],"summary":"Upload a file as an asset's next version; files that fail the checks are quarantined with the reasons","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"base64":{"type":"string","minLength":4,"maxLength":19500000},"mime":{"type":"string","maxLength":100},"stock":{"type":"boolean"}},"required":["base64"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/assets/{id}/release":{"post":{"tags":["Content"],"summary":"Release a quarantined version after looking at it (signed-in people only)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["version"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/assets/{id}/usable":{"get":{"tags":["Content"],"summary":"Whether an asset can be used outside now, and why not","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/rights/expiring":{"get":{"tags":["Content"],"summary":"Rights that expire soon or have expired, with where each asset is live (the takedown list)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"within_days","in":"query","required":true,"schema":{"default":14,"type":"integer","minimum":0,"maximum":365}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/rights/digest":{"post":{"tags":["Content"],"summary":"Send owners one notice about rights expiring in the next two weeks (at most once a day)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/rendition-presets":{"get":{"tags":["Content"],"summary":"The standard sizes renditions can be made in","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/asset-versions/{id}/renditions":{"post":{"tags":["Content"],"summary":"Add a rendition of a version in another size","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"spec":{"type":"string","maxLength":20},"base64":{"type":"string","maxLength":1000000},"fit":{"type":"string","enum":["cover","contain"]}},"required":["spec"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/catalog/sync":{"post":{"tags":["Content"],"summary":"Read new and changed products from a connected Shopify, Merchant Center, WooCommerce or BigCommerce account into the catalog","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}},"required":["channel_account_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/assets/{id}/ctv-check":{"get":{"tags":["Content"],"summary":"Check a video against common connected-TV specs (length, frame size, format, file size); loudness and safe areas are listed to check yourself","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/quick-actions":{"post":{"tags":["Content"],"summary":"One-click actions: thumbnails from an image (free), remove an object from an image, or a product ad (both priced first; confirm the job to run it)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","enum":["thumbnails","remove_object","product_ad","ugc_ad"]},"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"source_asset_id":{"type":"string","pattern":"^ast_[0-9a-z]{26}$"},"product_id":{"type":"string","pattern":"^prd_[0-9a-z]{26}$"},"object":{"type":"string","minLength":2,"maxLength":120},"headline_room":{"default":true,"type":"boolean"},"avatar":{"type":"string","pattern":"^[a-zA-Z0-9_.-]{3,80}$"},"hook":{"type":"string","maxLength":200},"provider":{"type":"string","pattern":"^[a-z0-9_]{2,40}$"},"model":{"type":"string","maxLength":80},"prefer":{"type":"string","enum":["cost","indemnified"]}},"required":["action","workspace_id","headline_room"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/commerce/order-totals":{"post":{"tags":["Content"],"summary":"Read a WooCommerce or BigCommerce store's daily order totals for the last days (1 to 90) into its results; no customer details are kept","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"days":{"default":30,"type":"integer","minimum":1,"maximum":90}},"required":["channel_account_id","days"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces/{id}/score":{"post":{"tags":["Content"],"summary":"Estimate how the current draft will do, with what drives the estimate (advisory; it never blocks anything)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/assets/{id}/score":{"get":{"tags":["Content"],"summary":"Estimate how an image, video or copy asset fits its placements (advisory)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/performance":{"get":{"tags":["Content"],"summary":"How pieces performed (impressions, clicks, conversions, sessions), best click-through first","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"days","in":"query","required":true,"schema":{"default":90,"type":"integer","minimum":1,"maximum":365}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/library/search":{"get":{"tags":["Content"],"summary":"Search the asset library by words (names, tags, descriptions, text) or by meaning when that's set up","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["image","video","audio","copy","document","other"]}},{"name":"mode","in":"query","required":true,"schema":{"default":"auto","type":"string","enum":["auto","text","semantic"]}},{"name":"limit","in":"query","required":true,"schema":{"default":24,"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces/{id}/experiment-plan":{"post":{"tags":["Content"],"summary":"Plan a copy experiment from a piece and its variants: a hypothesis each, the metric, the people each variant needs and how long that takes; ready once every variant is approved","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"lift":{"default":0.15,"type":"number","minimum":0.05,"maximum":1},"daily_reach":{"type":"integer","minimum":10,"maximum":100000000}},"required":["lift"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces/{id}/experiment-plans":{"get":{"tags":["Content"],"summary":"A piece's copy experiment plans","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/experiment-plans/{id}/experiment":{"post":{"tags":["Content"],"summary":"Run a ready copy experiment plan as an experiment: it's handed to the experiments area, which decides when the test runs (signed-in people only)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/layered-export":{"post":{"tags":["Content"],"summary":"Make a layered SVG (Background, Product and Text layers, text editable) from library images and your words, to import into Figma or Canva; nothing is stored or sent","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"background_asset_id":{"type":"string","pattern":"^ast_[0-9a-z]{26}$"},"product_asset_id":{"type":"string","pattern":"^ast_[0-9a-z]{26}$"},"headline":{"type":"string","minLength":1,"maxLength":120},"subline":{"type":"string","maxLength":200},"cta":{"type":"string","maxLength":40},"size":{"default":"1080x1080","type":"string","pattern":"^\\d{2,4}x\\d{2,4}$"}},"required":["background_asset_id","headline","size"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/brands/{id}/knowledge":{"get":{"tags":["Content"],"summary":"The knowledge pages chosen as this brand's context, and when each was last read","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Content"],"summary":"Choose the Notion pages that are this brand's context (owners; only these are ever read)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"},"pages":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[0-9a-f]{32}$|^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$"}}},"required":["channel_account_id","pages"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/brands/{id}/knowledge/read":{"post":{"tags":["Content"],"summary":"Read the chosen knowledge pages now (read only)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/prototypes":{"post":{"tags":["Content"],"summary":"Make a clickable prototype from a description: screens linked to each other, in the brand's colours (the cost first when AI writes it; a signed-in person confirms)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"title":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","minLength":10,"maxLength":4000},"screens":{"default":4,"type":"integer","minimum":2,"maximum":8},"confirm":{"type":"boolean"}},"required":["workspace_id","title","description","screens"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Content"],"summary":"Recent prototypes","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/prototypes/{id}":{"get":{"tags":["Content"],"summary":"A prototype with its screens and its page (shown in a sandboxed frame)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces/{id}/task":{"post":{"tags":["Content"],"summary":"Add a task for this piece to an Asana project (its brief, a link back, its date as the due date); approval marks it done","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"}},"required":["channel_account_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces/{id}/tasks":{"get":{"tags":["Content"],"summary":"The planning-tool tasks linked to a piece, as last synced","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/tasks/read-changes":{"post":{"tags":["Content"],"summary":"Read tasks changed in an Asana project since the last sync: new due dates move pieces' schedules; done or reopened is noted","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"}},"required":["channel_account_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/site-audits":{"post":{"tags":["Content"],"summary":"Check one of your own public sites against a brand (banned phrases, unapproved and withdrawn claims, regulated rules): up to 50 pages read in the background, nothing changed; five a day","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"url":{"type":"string","maxLength":500,"format":"uri"},"max_pages":{"default":25,"type":"integer","minimum":1,"maximum":50}},"required":["brand_id","url","max_pages"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Content"],"summary":"Recent site checks","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/site-audits/{id}":{"get":{"tags":["Content"],"summary":"A site check's pages, the riskiest first, with what each says that the brand doesn't allow","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/variant-sizing":{"post":{"tags":["Content"],"summary":"How many variants a campaign needs: the segments large enough to measure their own variant, from the audience size and attribute shares","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"kind":{"default":"email","type":"string","enum":["email","ad","social","landing_page"]},"audience_size":{"type":"integer","minimum":100,"maximum":500000000},"attributes":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":60},"values":{"minItems":2,"maxItems":12,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":60},"share":{"type":"number","exclusiveMinimum":0,"maximum":1}},"required":["label","share"],"additionalProperties":false}}},"required":["name","values"],"additionalProperties":false}},"lift":{"default":0.2,"type":"number","minimum":0.05,"maximum":1}},"required":["kind","audience_size","attributes","lift"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/fatigue":{"get":{"tags":["Content"],"summary":"Approved pieces whose click-through fell 30% or more in the last week against the three weeks before","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/fatigue/{id}/variant":{"post":{"tags":["Content"],"summary":"Make a fresh variant of a fatigued piece on the angle that has done best for the brand (the cost first; a signed-in person confirms)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"confirm":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/plans/read":{"post":{"tags":["Content"],"summary":"Read a marketing plan (document, PDF, slides or text) into recommended visual styles, tactics and a draft asset list; confirmed, each asset becomes a piece with its brief (no credits)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"campaign_id":{"type":"string","pattern":"^cmp_[0-9a-z]{26}$"},"file":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"text":{"type":"string","maxLength":400000},"base64":{"type":"string","maxLength":11184819}},"required":["name"],"additionalProperties":false},"confirm":{"type":"boolean"},"pick":{"maxItems":30,"type":"array","items":{"type":"integer","minimum":0,"maximum":59}}},"required":["workspace_id","file"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/brands/{id}/design-spec":{"get":{"tags":["Content"],"summary":"The brand's design-language spec in Markdown (drafted from the kit until someone saves it)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Content"],"summary":"Save the brand's design-language spec (agents read the saved one; banned phrases refused)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"markdown":{"type":"string","minLength":20,"maxLength":20000}},"required":["markdown"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces/{id}/grounding":{"get":{"tags":["Content"],"summary":"The brand facts each generated draft of a piece was grounded in (kit version, claims, products, personas, measured winners), with their sources","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/elements":{"get":{"tags":["Content"],"summary":"Reusable message elements (hooks, benefits, calls to action, proof points, disclaimers) with their measured results, best first","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"brand_id","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["hook","benefit","cta","proof","disclaimer"]}},{"name":"status","in":"query","required":true,"schema":{"default":"active","type":"string","enum":["active","retired"]}},{"name":"days","in":"query","required":true,"schema":{"default":90,"type":"integer","minimum":7,"maximum":365}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Content"],"summary":"Add a message element (checked against the brand; a proof point must be an approved claim)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"kind":{"type":"string","enum":["hook","benefit","cta","proof","disclaimer"]},"text":{"type":"string","minLength":3,"maxLength":500},"tags":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"source_piece_id":{"type":"string","pattern":"^ct_pc_[0-9a-z]{26}$"}},"required":["kind","text"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/elements/{id}":{"patch":{"tags":["Content"],"summary":"Retire or retag a message element","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["active","retired"]},"tags":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces/{id}/next-batch":{"get":{"tags":["Content"],"summary":"What the variants' results say: the measured angles, the leader and whether its lead is clear, the best elements, and the proposed next batch","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Content"],"summary":"Make the proposed next batch of variants (the cost first; a signed-in person confirms)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"confirm":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces/from-source":{"post":{"tags":["Content"],"summary":"Start pieces from a meeting transcript, a chat thread export or a document: a preview first (nothing saved or charged), then confirmed, a draft per kind (one credit each)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"campaign_id":{"type":"string","pattern":"^cmp_[0-9a-z]{26}$"},"source":{"type":"object","properties":{"kind":{"type":"string","enum":["transcript","chat","document"]},"name":{"type":"string","minLength":1,"maxLength":200},"text":{"type":"string","maxLength":400000},"base64":{"type":"string","maxLength":11184819}},"required":["kind","name"],"additionalProperties":false},"kinds":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","enum":["blog","landing_page","email","social","product_description","ad","press_release","other"]}},"goal":{"type":"string","maxLength":500},"confirm":{"type":"boolean"}},"required":["workspace_id","source","kinds"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/auto-publish":{"get":{"tags":["Content"],"summary":"Rules that send approved pieces of a campaign or kind to a CMS on their own, with today's count","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Content"],"summary":"Send approved pieces of a campaign or kind on their own (owners; a daily limit applies)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"campaign_id":{"type":"string","pattern":"^cmp_[0-9a-z]{26}$"},"kind":{"type":"string","enum":["blog","landing_page","email","social","product_description","ad","press_release","other"]},"channel_account_id":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"},"container":{"type":"string","maxLength":300},"daily_limit":{"default":20,"type":"integer","minimum":1,"maximum":200}},"required":["channel_account_id","daily_limit"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/auto-publish/{id}/sends":{"get":{"tags":["Content"],"summary":"A rule's approved pieces that weren't sent on their own (held or refused), with the reason","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/auto-publish/{id}":{"patch":{"tags":["Content"],"summary":"Turn a rule on or off, or change its daily limit (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean"},"daily_limit":{"type":"integer","minimum":1,"maximum":200}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Content"],"summary":"Remove a rule (approved pieces wait for a person again)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/brands/{id}/preferences":{"get":{"tags":["Content"],"summary":"A brand's creative preferences (formats, colours, characters, products, notes) that steer drafting and generation","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Content"],"summary":"Set a brand's creative preferences (a preference can't use a phrase the brand bans)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"formats":{"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"colors":{"maxItems":12,"type":"array","items":{"type":"string","minLength":1,"maxLength":40}},"characters":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"products":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":120}},"notes":{"type":"string","maxLength":2000}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/me/memory":{"get":{"tags":["Content"],"summary":"Your own working memory: how you like work done, used in the drafts and generations you start (only you see it)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`. Web sessions only.","security":[{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Content"],"summary":"Change your own working memory (only you see it)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"likes":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"avoid":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"notes":{"type":"string","maxLength":2000}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Content"],"summary":"Forget your working memory","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`. Web sessions only.","security":[{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/scoring/model":{"get":{"tags":["Content"],"summary":"The scoring model trained on your own results: when, on how many files, how well it holds up and what moves it most","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Content"],"summary":"Train the scoring model on your own spend and results (free; nothing leaves the app)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/assets/{id}/sizes":{"get":{"tags":["Content"],"summary":"An image's sizes made for channels, each with what it still needs before it can go outside, and the sizes each channel takes","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Content"],"summary":"Make an approved image in the sizes chosen channels take (up to 12), each a draft for review","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channels":{"maxItems":9,"type":"array","items":{"type":"string","enum":["instagram","facebook","linkedin","x","pinterest","display","youtube","email","web"]}},"sizes":{"maxItems":12,"type":"array","items":{"type":"string","pattern":"^\\d{2,4}x\\d{2,4}$"}},"fit":{"default":"cover","type":"string","enum":["cover","contain"]}},"required":["fit"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/microsites":{"post":{"tags":["Content"],"summary":"Lay out two to six linked landing pages from one brief as draft pieces (the cost first; a signed-in person confirms)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"product_id":{"type":"string","pattern":"^prd_[0-9a-z]{26}$"},"title":{"type":"string","minLength":1,"maxLength":120},"brief":{"type":"object","properties":{"goal":{"type":"string","maxLength":2000},"audience":{"type":"string","maxLength":1000},"offer":{"type":"string","maxLength":1000},"key_messages":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}},"mandatories":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":500}},"kpis":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":200}},"tone":{"type":"string","maxLength":200},"length":{"type":"integer","minimum":10,"maximum":5000},"keywords":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":100}}},"additionalProperties":false},"pages":{"minItems":2,"maxItems":6,"type":"array","items":{"type":"object","properties":{"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,59}$"},"title":{"type":"string","minLength":1,"maxLength":120},"purpose":{"type":"string","maxLength":500}},"required":["slug","title"],"additionalProperties":false}},"confirm":{"type":"boolean"},"max_credits":{"type":"integer","minimum":0,"maximum":1000}},"required":["workspace_id","title","brief","pages"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/brands/{id}/change-impact":{"get":{"tags":["Content"],"summary":"What a change to the brand kit touches: copy that carries a removed claim or old legal line or now uses a banned phrase, and files made under an earlier visual identity, live ones first (nothing is changed)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}},{"name":"from","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},{"name":"to","in":"query","required":false,"schema":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/products/{id}/rules":{"get":{"tags":["Content"],"summary":"A product's own rules over its brand's kit: banned phrases, required lines and the claims approved for it","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Content"],"summary":"Set a product's own rules (they add to the brand's; pieces about the product are checked against both)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"banned_phrases":{"maxItems":100,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"legal_lines":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"claims":{"maxItems":100,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":500},"approved":{"type":"boolean"},"substantiation":{"type":"string","maxLength":2000}},"required":["text"],"additionalProperties":false}}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/shopify/tags":{"get":{"tags":["Content"],"summary":"Customer tags this product manages in your Shopify store (synced from segments), with how many customers it tagged and the latest sync","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/settings":{"get":{"tags":["Content"],"summary":"The content area's settings: tagging new uploads from the image (on or off, its monthly credit limit and this month's use)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Content"],"summary":"Turn tagging new uploads from the image on or off and set its monthly credit limit (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"auto_tag_uploads":{"type":"boolean"},"auto_tag_monthly_credits":{"type":"integer","minimum":0,"maximum":100000}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/library/index":{"post":{"tags":["Content"],"summary":"Suggest tags for assets so they can be found: from rules (free) or from the model (one credit each; a signed-in person confirms)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"asset_ids":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ast_.*"}},"workspace_id":{"type":"string","maxLength":40},"model":{"default":false,"type":"boolean"},"confirm":{"type":"boolean"},"max_credits":{"type":"integer","minimum":0,"maximum":1000}},"required":["model"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/library/folders":{"get":{"tags":["Content"],"summary":"The library's folders and how many assets each holds","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/assets/{id}/folder":{"put":{"tags":["Content"],"summary":"File an asset in a folder (an empty folder takes it out)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"folder":{"type":"string","maxLength":200,"pattern":"^$|^[^/\\s][^/]{0,59}(\\/[^/\\s][^/]{0,59}){0,4}$"}},"required":["folder"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/briefs":{"post":{"tags":["Content"],"summary":"Turn a goal or a plan in your own words into a structured brief, segments and formats (a proposal; nothing is saved; when AI writes it the cost is shown first)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"prompt":{"type":"string","minLength":10,"maxLength":8000},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"confirm":{"type":"boolean"}},"required":["prompt"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/pieces/{id}/variants":{"post":{"tags":["Content"],"summary":"Make variants of a piece, one per angle, each with its rationale (new drafts; when AI writes them the cost is shown first)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"angles":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","enum":["benefit","urgency","curiosity","proof","simplicity"]}},"confirm":{"type":"boolean"}},"required":["angles"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Content"],"summary":"A piece's variants side by side with their checks and estimates","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/content/performance/tags":{"get":{"tags":["Content"],"summary":"Results per tag across assets with results: which subjects, formats and hooks do best","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":true,"schema":{"default":90,"type":"integer","minimum":1,"maximum":365}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creative/providers":{"get":{"tags":["Creative studio"],"summary":"Generation providers and models: whether each is ready, its cost per unit and whether outputs are indemnified","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creative/models/pick":{"get":{"tags":["Creative studio"],"summary":"The model the studio would choose for a kind of output (lowest cost, or indemnified first), with the reason","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"kind","in":"query","required":true,"schema":{"type":"string","enum":["image","image_edit","video","voiceover","dub","avatar","video_translate"]}},{"name":"prefer","in":"query","required":true,"schema":{"default":"cost","type":"string","enum":["cost","indemnified"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creative/settings":{"get":{"tags":["Creative studio"],"summary":"The creative studio's settings","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Creative studio"],"summary":"Turn on avatar providers, IP-safe mode or a monthly media limit (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"flagged_providers":{"maxItems":10,"type":"array","items":{"type":"string","pattern":"^[a-z0-9_]{2,40}$"}},"ip_safe":{"type":"boolean"},"monthly_media_credits":{"anyOf":[{"type":"number","minimum":0,"maximum":1000000000},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creative/jobs":{"post":{"tags":["Creative studio"],"summary":"Price an image, video or voice generation; nothing runs or is charged until you confirm it","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"provider":{"type":"string","pattern":"^[a-z0-9_]{2,40}$"},"model":{"type":"string","maxLength":80},"prefer":{"type":"string","enum":["cost","indemnified"]},"kind":{"type":"string","enum":["image","image_edit","video","voiceover","dub","avatar","video_translate"]},"prompt":{"type":"string","minLength":1,"maxLength":4000},"negative":{"type":"string","maxLength":1000},"size":{"type":"string","maxLength":20},"seconds":{"type":"integer","minimum":1,"maximum":120},"variants":{"default":1,"type":"integer","minimum":1,"maximum":8},"source_asset_id":{"type":"string","pattern":"^ast_[0-9a-z]{26}$"},"voice":{"type":"string","maxLength":60},"language":{"type":"string","pattern":"^([a-z]{2,3}(-[A-Z]{2})?|[A-Z][A-Za-z ()-]{1,49})$"},"avatar":{"type":"string","maxLength":80},"person_ref":{"type":"string","maxLength":200},"template_id":{"type":"string","pattern":"^cr_tpl_[0-9a-z]{26}$"},"market_id":{"type":"string","pattern":"^mkt_[0-9a-z]{26}$"},"product_id":{"type":"string","pattern":"^prd_[0-9a-z]{26}$"},"fields":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z_]{1,30}$"},"additionalProperties":{"type":"string","maxLength":500}},"scenes":{"minItems":2,"maxItems":10,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":1500},"background":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"required":["text"],"additionalProperties":false}}},"required":["workspace_id","provider","model","kind","prompt","variants"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Creative studio"],"summary":"Generations, newest first, with their outputs","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":20}},{"name":"limit","in":"query","required":true,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creative/video-scripts":{"post":{"tags":["Creative studio"],"summary":"Write a short presenter script in scenes from a brief, with the organization's model (a draft to edit; nothing is made or charged as video)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"brief":{"type":"string","minLength":10,"maxLength":2000},"scenes":{"default":4,"type":"integer","minimum":2,"maximum":6},"seconds":{"default":60,"type":"integer","minimum":15,"maximum":120},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"}},"required":["brief","scenes","seconds"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creative/jobs/{id}":{"get":{"tags":["Creative studio"],"summary":"A generation and its outputs","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creative/jobs/{id}/confirm":{"post":{"tags":["Creative studio"],"summary":"Confirm a priced generation: credits are charged and it runs (signed-in people only)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creative/jobs/{id}/cancel":{"post":{"tags":["Creative studio"],"summary":"Cancel a generation that hasn't started","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creative/templates":{"get":{"tags":["Creative studio"],"summary":"Generation templates with their fields and locked elements","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Creative studio"],"summary":"Save a generation template (prompt with {{fields}}, sizes and locked elements)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"name":{"type":"string","minLength":1,"maxLength":120},"kind":{"type":"string","enum":["image","video","audio"]},"prompt":{"type":"string","minLength":1,"maxLength":4000},"sizes":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":20}},"locked":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":200}}},"required":["workspace_id","name","kind","prompt"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creative/assets/{id}/indemnity":{"get":{"tags":["Creative studio"],"summary":"How an asset's generated versions were made: model, license terms and whether indemnity applies","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creative/voices":{"get":{"tags":["Creative studio"],"summary":"Voices kept for your brands: library voices and cloned voices (with whose voice it is and their consent reference)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"brand_id","in":"query","required":false,"schema":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Creative studio"],"summary":"Keep a library voice for a brand (optionally its default for voiceovers)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"voice_id":{"type":"string","pattern":"^[A-Za-z0-9]{8,40}$"},"name":{"type":"string","minLength":1,"maxLength":100},"is_default":{"type":"boolean"}},"required":["brand_id","voice_id","name"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creative/voices/clones":{"post":{"tags":["Creative studio"],"summary":"Make a cloned voice from a recording in the library, in your own ElevenLabs account: only with that person's recorded consent for a voice clone (a signed-in person)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"name":{"type":"string","minLength":1,"maxLength":100},"person_ref":{"type":"string","minLength":1,"maxLength":200},"source_asset_id":{"type":"string","pattern":"^ast_[0-9a-z]{26}$"},"is_default":{"type":"boolean"}},"required":["name","person_ref","source_asset_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creative/voices/{id}/default":{"put":{"tags":["Creative studio"],"summary":"Make a voice its brand's default for voiceovers","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creative/voices/{id}":{"delete":{"tags":["Creative studio"],"summary":"Stop using a voice here","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creative/products/from-url":{"post":{"tags":["Creative studio"],"summary":"Read a product page (public pages only) and file the product, with its photo as a draft image to start a generation from","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"url":{"type":"string","maxLength":2000,"format":"uri"},"with_photo":{"default":true,"type":"boolean"}},"required":["workspace_id","url","with_photo"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creative/adaptations":{"post":{"tags":["Creative studio"],"summary":"Price an existing image adapted for each market you choose (text translated in place, local prices, room left for the legal line); each runs only when a signed-in person confirms it","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"source_asset_id":{"type":"string","pattern":"^ast_[0-9a-z]{26}$"},"market_ids":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","pattern":"^mkt_[0-9a-z]{26}$"}},"provider":{"default":"openai_images","type":"string","pattern":"^[a-z0-9_]{2,40}$"},"model":{"default":"gpt-image-1","type":"string","maxLength":80},"note":{"type":"string","maxLength":500}},"required":["workspace_id","source_asset_id","market_ids","provider","model"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/overview":{"get":{"tags":["Paid media"],"summary":"Ad accounts with their ceilings, live budgets and spend today and this month, plus what waits for you","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/accounts/{id}/refresh":{"post":{"tags":["Paid media"],"summary":"Read an ad account's campaigns and daily results now (filed only; nothing is changed)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/campaigns":{"get":{"tags":["Paid media"],"summary":"Ad campaigns with their budget, status and results over a period","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"channel_account_id","in":"query","required":false,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["live","paused","draft","ended","removed"]}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/changes":{"get":{"tags":["Paid media"],"summary":"The change log: proposals waiting for you, and every change made, with before and after","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z,]{1,80}$"}},{"name":"channel_account_id","in":"query","required":false,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Paid media"],"summary":"Propose a budget, bid, status, negative keyword or new paused campaign change (it waits for approval unless allowed)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"change":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"create_campaign"},"channel_account_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^cha_.*"},"campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^cmp_.*"},"name":{"type":"string","minLength":1,"maxLength":250},"daily_budget_minor":{"type":"integer","minimum":1,"maximum":10000000000},"objective":{"type":"string","enum":["leads","sales","traffic","awareness","shopping","display","catalog"]},"children":{"maxItems":20,"type":"array","items":{"$ref":"#/$defs/__schema0"}},"merchant_id":{"type":"string","pattern":"^\\d{1,20}$"},"catalog_id":{"type":"string","pattern":"^\\d{1,20}$"}},"required":["kind","channel_account_id","campaign_id","name","daily_budget_minor","objective"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"budget"},"channel_campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^chc_.*"},"daily_budget_minor":{"type":"integer","minimum":1,"maximum":10000000000},"target":{"type":"object","properties":{"kind":{"type":"string","const":"insertion_order"},"external_id":{"type":"string","pattern":"^\\d{1,20}$"}},"required":["kind","external_id"],"additionalProperties":false}},"required":["kind","channel_campaign_id","daily_budget_minor"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"bid"},"channel_campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^chc_.*"},"bid_minor":{"type":"integer","minimum":1,"maximum":10000000000},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["ad_group","keyword"]},"external_id":{"type":"string","pattern":"^\\d{1,20}$"}},"required":["kind","external_id"],"additionalProperties":false}},"required":["kind","channel_campaign_id","bid_minor"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"experiment"},"channel_campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^chc_.*"},"action":{"type":"string","enum":["start","end","promote"]},"type":{"default":"ai_max","type":"string","enum":["ai_max","split"]},"compare_channel_campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^chc_.*"},"days":{"default":28,"type":"integer","minimum":14,"maximum":84}},"required":["kind","channel_campaign_id","action","type","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"guidelines"},"channel_campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^chc_.*"},"term_exclusions":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1,"maxLength":30}},"messaging_restrictions":{"maxItems":40,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}},"brand_inclusion_list":{"anyOf":[{"type":"string","pattern":"^\\d{1,20}$"},{"type":"null"}]},"brand_exclusion_list":{"anyOf":[{"type":"string","pattern":"^\\d{1,20}$"},{"type":"null"}]}},"required":["kind","channel_campaign_id","term_exclusions","messaging_restrictions","brand_inclusion_list","brand_exclusion_list"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"media_buy"},"channel_account_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^cha_.*"},"campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^cmp_.*"},"name":{"type":"string","minLength":1,"maxLength":200},"start":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"end":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"packages":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"object","properties":{"product_id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,100}$"},"pricing_option_id":{"type":"string","pattern":"^[A-Za-z0-9_.:-]{1,100}$"},"budget_minor":{"type":"integer","minimum":1,"maximum":10000000000}},"required":["product_id","pricing_option_id","budget_minor"],"additionalProperties":false}},"audience":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}]}},"required":["kind","channel_account_id","campaign_id","name","start","end","packages"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"asset_group_text"},"channel_campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^chc_.*"},"asset_group_id":{"type":"string","pattern":"^\\d{1,20}$"},"headlines":{"minItems":3,"maxItems":15,"type":"array","items":{"type":"string","minLength":1,"maxLength":30}},"long_headlines":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"string","minLength":1,"maxLength":90}},"descriptions":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"string","minLength":1,"maxLength":90}}},"required":["kind","channel_campaign_id","asset_group_id","headlines","long_headlines","descriptions"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"audience_signals"},"channel_campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^chc_.*"},"asset_group_id":{"type":"string","pattern":"^\\d{1,20}$"},"search_themes":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"audience":{"anyOf":[{"type":"string","pattern":"^\\d{1,20}$"},{"type":"null"}]}},"required":["kind","channel_campaign_id","asset_group_id","search_themes","audience"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"view_through"},"channel_account_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^cha_.*"},"days":{"type":"integer","minimum":1,"maximum":30}},"required":["kind","channel_account_id","days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"conversion_goals"},"channel_campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^chc_.*"},"new_customers":{"type":"string","enum":["account_default","bid_higher","only_new"]},"new_customer_value":{"anyOf":[{"type":"number","exclusiveMinimum":0,"maximum":100000},{"type":"null"}]},"device_multipliers":{"type":"object","properties":{"MOBILE":{"type":"number","minimum":0.5,"maximum":10},"DESKTOP":{"type":"number","minimum":0.5,"maximum":10},"TABLET":{"type":"number","minimum":0.5,"maximum":10}},"additionalProperties":false}},"required":["kind","channel_campaign_id","new_customers","new_customer_value","device_multipliers"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"pause_ads"},"channel_campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^chc_.*"},"ads":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^che_.*"}}},"required":["kind","channel_campaign_id","ads"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"go_live"},"channel_campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^chc_.*"},"children":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^che_.*"}}},"required":["kind","channel_campaign_id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","enum":["pause","remove"]},"channel_campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^chc_.*"}},"required":["kind","channel_campaign_id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"pause_all"},"channel_account_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^cha_.*"}},"required":["kind","channel_account_id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"negatives"},"channel_campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^chc_.*"},"terms":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}}},"required":["kind","channel_campaign_id","terms"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"keywords"},"channel_campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^chc_.*"},"ad_group_external_id":{"type":"string","pattern":"^[0-9A-Za-z_-]{1,40}$"},"keywords":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":80},"match":{"type":"string","enum":["exact","phrase","broad"]}},"required":["text","match"],"additionalProperties":false}}},"required":["kind","channel_campaign_id","ad_group_external_id","keywords"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"schedule"},"channel_campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^chc_.*"},"slots":{"maxItems":42,"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]},"start_hour":{"type":"integer","minimum":0,"maximum":23},"end_hour":{"type":"integer","minimum":1,"maximum":24}},"required":["day","start_hour","end_hour"],"additionalProperties":false}}},"required":["kind","channel_campaign_id","slots"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"automation"},"channel_campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^chc_.*"},"ai_max":{"type":"boolean"},"text_customization":{"type":"boolean"},"final_url_expansion":{"type":"boolean"},"url_exclusions":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200,"pattern":"^\\S+$"}}},"required":["kind","channel_campaign_id","text_customization","final_url_expansion","url_exclusions"],"additionalProperties":false}]},"reason":{"type":"string","maxLength":2000}},"required":["change"],"additionalProperties":false,"$defs":{"__schema0":{"type":"object","properties":{"kind":{"type":"string","enum":["ad_set","ad"]},"name":{"type":"string","minLength":1,"maxLength":200},"data":{"type":"object","propertyNames":{"type":"string","maxLength":80},"additionalProperties":{}},"children":{"maxItems":20,"type":"array","items":{"$ref":"#/$defs/__schema0"}}},"required":["kind","name","data"],"additionalProperties":false}}}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/lower":{"post":{"tags":["Paid media"],"summary":"Stop or lower spend right away: pause a campaign, some of its ads or a whole ad account, or lower a budget or bid (signed in; it needs no approval, is checked against the ad platform as it is now, and never raises anything)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"pause"},"channel_campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^chc_.*"}},"required":["kind","channel_campaign_id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"pause_all"},"channel_account_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^cha_.*"}},"required":["kind","channel_account_id"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"pause_ads"},"channel_campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^chc_.*"},"ads":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^che_.*"}}},"required":["kind","channel_campaign_id","ads"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"budget"},"channel_campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^chc_.*"},"daily_budget_minor":{"type":"integer","minimum":1,"maximum":10000000000},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["insertion_order"]},"external_id":{"type":"string","pattern":"^\\d{1,20}$"}},"required":["kind","external_id"],"additionalProperties":false}},"required":["kind","channel_campaign_id","daily_budget_minor"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"bid"},"channel_campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^chc_.*"},"bid_minor":{"type":"integer","minimum":1,"maximum":10000000000},"target":{"type":"object","properties":{"kind":{"type":"string","enum":["ad_group","keyword"]},"external_id":{"type":"string","pattern":"^\\d{1,20}$"}},"required":["kind","external_id"],"additionalProperties":false}},"required":["kind","channel_campaign_id","bid_minor"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/changes/{id}/approve":{"post":{"tags":["Paid media"],"summary":"Approve a proposed change and apply it on the ad platform (within the ceilings)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/changes/{id}/reject":{"post":{"tags":["Paid media"],"summary":"Turn a proposed change down","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"note":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/changes/{id}/revert":{"post":{"tags":["Paid media"],"summary":"Undo an applied change in one step (restores its before state on the ad platform)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/briefs/held":{"post":{"tags":["Paid media"],"summary":"Hold a brief for an ad platform with no account connected yet; nothing is filed or sent until a person files it against an account","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^cmp_.*"},"objective":{"type":"string","enum":["leads","sales","traffic","awareness"]},"daily_budget_minor":{"type":"integer","minimum":1,"maximum":10000000000},"brand":{"type":"string","minLength":1,"maxLength":80},"market":{"type":"string","minLength":1,"maxLength":40},"audience":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":200},"keywords":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"communities":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_]{2,21}$"}},"interests":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"job_functions":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"countries":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^[A-Za-z]{2}$"}},"age_min":{"type":"integer","minimum":13,"maximum":65},"age_max":{"type":"integer","minimum":13,"maximum":65},"exclude_customers_list_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"exclude_customers_list":{"type":"string","minLength":1,"maxLength":120},"lookalike_list":{"type":"string","minLength":1,"maxLength":200}},"additionalProperties":false},"product_ids":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^prd_.*"}},"creative":{"type":"object","properties":{"headlines":{"minItems":1,"maxItems":15,"type":"array","items":{"type":"string","minLength":1,"maxLength":90}},"descriptions":{"default":[],"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":180}},"final_url":{"type":"string","maxLength":2000,"format":"uri"},"creative_ids":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":120}},"page_id":{"type":"string","pattern":"^[0-9A-Za-z_-]{1,40}$"},"asset_ids":{"type":"object","propertyNames":{"type":"string","enum":["snap_ads","meta_ads","reddit_ads"]},"additionalProperties":{"type":"string","pattern":"^ast_[0-9a-z]{26}$"}},"partnership_ad_codes":{"type":"object","propertyNames":{"type":"string","enum":["meta_ads"]},"additionalProperties":{"type":"string","pattern":"^[A-Za-z0-9_-]{6,200}$"},"required":["meta_ads"]},"instagram_account_ids":{"type":"object","propertyNames":{"type":"string","enum":["meta_ads"]},"additionalProperties":{"type":"string","pattern":"^\\d{1,20}$"},"required":["meta_ads"]}},"required":["headlines","descriptions","final_url"],"additionalProperties":false},"provider":{"type":"string","pattern":"^[a-z_]{2,40}$","description":"The ad platform's key: reddit_ads, linkedin_ads, meta_ads, google_ads…"}},"required":["campaign_id","objective","daily_budget_minor","audience","creative","provider"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Paid media"],"summary":"Briefs held for a platform with no account yet, each with the accounts it can be filed to now","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/briefs/held/{id}/file":{"post":{"tags":["Paid media"],"summary":"File a held brief against an ad account on its platform: its campaigns become paused proposals waiting for approval","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^cha_.*"}},"required":["channel_account_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/briefs/held/{id}/withdraw":{"post":{"tags":["Paid media"],"summary":"Withdraw a held brief; nothing was filed from it","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/briefs":{"post":{"tags":["Paid media"],"summary":"Turn a goal, budget, audience and ad copy into a paused campaign per ad account, as proposals","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^cmp_.*"},"channel_account_ids":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^cha_.*"}},"objective":{"type":"string","enum":["leads","sales","traffic","awareness"]},"daily_budget_minor":{"type":"integer","minimum":1,"maximum":10000000000},"brand":{"type":"string","minLength":1,"maxLength":80},"market":{"type":"string","minLength":1,"maxLength":40},"audience":{"type":"object","properties":{"description":{"type":"string","minLength":1,"maxLength":200},"keywords":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"communities":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_]{2,21}$"}},"interests":{"maxItems":25,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"job_functions":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":80}},"countries":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^[A-Za-z]{2}$"}},"age_min":{"type":"integer","minimum":13,"maximum":65},"age_max":{"type":"integer","minimum":13,"maximum":65},"exclude_customers_list_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"exclude_customers_list":{"type":"string","minLength":1,"maxLength":120},"lookalike_list":{"type":"string","minLength":1,"maxLength":200}},"additionalProperties":false},"product_ids":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^prd_.*"}},"creative":{"type":"object","properties":{"headlines":{"minItems":1,"maxItems":15,"type":"array","items":{"type":"string","minLength":1,"maxLength":90}},"descriptions":{"default":[],"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":180}},"final_url":{"type":"string","maxLength":2000,"format":"uri"},"creative_ids":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":120}},"page_id":{"type":"string","pattern":"^[0-9A-Za-z_-]{1,40}$"},"asset_ids":{"type":"object","propertyNames":{"type":"string","enum":["snap_ads","meta_ads","reddit_ads"]},"additionalProperties":{"type":"string","pattern":"^ast_[0-9a-z]{26}$"}},"partnership_ad_codes":{"type":"object","propertyNames":{"type":"string","enum":["meta_ads"]},"additionalProperties":{"type":"string","pattern":"^[A-Za-z0-9_-]{6,200}$"},"required":["meta_ads"]},"instagram_account_ids":{"type":"object","propertyNames":{"type":"string","enum":["meta_ads"]},"additionalProperties":{"type":"string","pattern":"^\\d{1,20}$"},"required":["meta_ads"]}},"required":["headlines","descriptions","final_url"],"additionalProperties":false}},"required":["campaign_id","channel_account_ids","objective","daily_budget_minor","audience","creative"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/briefs/from-creator-content":{"post":{"tags":["Paid media"],"summary":"Turn creator content marked ready for partnership ads into a paused Meta campaign proposal with the creator's ad code","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"handoff_id":{"type":"string","minLength":3,"maxLength":80},"campaign_id":{"type":"string","pattern":"^cmp_[0-9a-z]{26}$"},"channel_account_id":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"},"objective":{"type":"string","enum":["leads","sales","traffic","awareness"]},"daily_budget_minor":{"type":"integer","exclusiveMinimum":0,"maximum":100000000},"page_id":{"type":"string","pattern":"^[0-9A-Za-z_-]{1,40}$"},"instagram_account_id":{"type":"string","pattern":"^\\d{1,20}$"},"headline":{"type":"string","minLength":1,"maxLength":90},"final_url":{"type":"string","maxLength":2000,"format":"uri"},"countries":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"}}},"required":["handoff_id","campaign_id","channel_account_id","objective","daily_budget_minor","page_id","instagram_account_id","headline","final_url"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/reallocations":{"post":{"tags":["Paid media"],"summary":"Propose moving budget to the campaign with the cheapest results in an ad account, keeping daily spend the same","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"max_shift_pct":{"type":"integer","minimum":1,"maximum":50},"target_cpa_minor":{"type":"integer","minimum":1,"maximum":10000000}},"required":["channel_account_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/reallocations/across-accounts":{"post":{"tags":["Paid media"],"summary":"Propose moving budget between ad accounts in one currency toward the cheapest results, keeping the organization's daily spend the same (an estimate; inside each account's ceiling)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"max_shift_pct":{"type":"integer","minimum":1,"maximum":50},"days":{"type":"integer","minimum":3,"maximum":30}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/list-uploads":{"post":{"tags":["Paid media"],"summary":"Prepare a customer-list upload: consented people only, suppressions left out, hashed; it waits for approval","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^cha_.*"},"list_name":{"type":"string","minLength":1,"maxLength":120},"segment_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^seg_.*"},"profile_ids":{"maxItems":20000,"type":"array","items":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^prf_.*"}},"list_external_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["channel_account_id","list_name"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/company-lists":{"post":{"tags":["Paid media"],"summary":"Propose sending a company (account) list to an ad platform that takes one: names and website domains of businesses, no people; it waits for approval and adds no daily spend","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^cha_.*"},"list_name":{"type":"string","minLength":1,"maxLength":120},"list_external_id":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"companies":{"minItems":1,"maxItems":10000,"type":"array","items":{"type":"object","properties":{"name":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"domain":{"anyOf":[{"type":"string","maxLength":253},{"type":"null"}]}},"additionalProperties":false}},"sales_list_id":{"type":"string","minLength":1,"maxLength":200}},"required":["channel_account_id","list_name"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/company-lists/from-sales":{"get":{"tags":["Paid media"],"summary":"The target account lists the sales product sent (company domains only), to send as company lists","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/suppressions":{"post":{"tags":["Paid media"],"summary":"Never upload these people to an ad platform list (kept as hashes)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"emails":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"}}},"required":["emails"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"added":{"type":"number"}},"required":["added"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/alerts":{"get":{"tags":["Paid media"],"summary":"Paid media alerts: ceilings reached, pacing, spend spikes, cost jumps, tracking gaps and tiring creative","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"status","in":"query","required":true,"schema":{"default":"open","type":"string","enum":["open","resolved"]}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/alerts/{id}/resolve":{"post":{"tags":["Paid media"],"summary":"Mark an alert as handled","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/audit":{"get":{"tags":["Paid media"],"summary":"Today's account audit: issues ranked, each fixed one at a time","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/audit/fix":{"post":{"tags":["Paid media"],"summary":"Turn one audit item into its fix, proposed for approval","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["budget_limited","no_results","no_clicks"]},"channel_campaign_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^chc_.*"}},"required":["kind","channel_campaign_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/recap":{"get":{"tags":["Paid media"],"summary":"A recap of spend and results per campaign over a period, with totals and where the numbers came from: as data, a spreadsheet (CSV) or slides (PowerPoint)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"format","in":"query","required":true,"schema":{"default":"json","type":"string","enum":["json","csv","pptx"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/summary":{"get":{"tags":["Paid media"],"summary":"A plain-language summary of spend and results over a period","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/rules":{"get":{"tags":["Paid media"],"summary":"If/then rules over campaign results and search terms","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Paid media"],"summary":"Add an if/then rule; each match becomes a proposed change checked like any other","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"channel_account_id":{"anyOf":[{"type":"string","maxLength":60,"format":"starts_with","pattern":"^cha_.*"},{"type":"null"}]},"condition":{"anyOf":[{"type":"object","properties":{"metric":{"type":"string","enum":["spend","conversions","cpa","ctr","roas"]},"op":{"type":"string","enum":[">","<",">=","<="]},"value":{"type":"number"},"window_days":{"type":"integer","minimum":1,"maximum":30},"level":{"default":"channel_campaign","type":"string","const":"channel_campaign"}},"required":["metric","op","value","window_days","level"],"additionalProperties":false},{"type":"object","properties":{"metric":{"type":"string","enum":["cost","clicks","conversions","cpa"]},"op":{"type":"string","enum":[">","<",">=","<="]},"value":{"type":"number"},"window_days":{"type":"integer","minimum":1,"maximum":30},"level":{"type":"string","const":"search_term"},"and":{"maxItems":4,"type":"array","items":{"type":"object","properties":{"metric":{"type":"string","enum":["cost","clicks","conversions","cpa"]},"op":{"type":"string","enum":[">","<",">=","<="]},"value":{"type":"number"}},"required":["metric","op","value"],"additionalProperties":false}}},"required":["metric","op","value","window_days","level"],"additionalProperties":false}]},"action":{"type":"object","properties":{"kind":{"type":"string","enum":["pause","budget_pct","bid_pct","negatives","keywords"]},"pct":{"type":"integer","minimum":-50,"maximum":50}},"required":["kind"],"additionalProperties":false}},"required":["name","condition","action"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/keyword-ideas":{"post":{"tags":["Paid media"],"summary":"Propose search terms that brought results at or under the target cost per result as new keywords (exact, and phrase for three results or more); they wait for approval","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"channel_campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^chc_.*"},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"target_cpa_minor":{"type":"integer","minimum":1,"maximum":10000000}},"required":["channel_account_id","from","to"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/forecasts":{"post":{"tags":["Paid media"],"summary":"Estimate results a day for daily budgets per ad platform, with a low-to-high range (an estimate, not a promise; nothing changes)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"budgets":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","maxLength":40},"daily_budget_minor":{"type":"integer","minimum":0,"maximum":10000000000}},"required":["provider","daily_budget_minor"],"additionalProperties":false}}},"required":["budgets"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/plans":{"post":{"tags":["Paid media"],"summary":"A media plan: budget by ad platform and month, each month's results estimated with a range (nothing changes)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"months":{"minItems":1,"maxItems":12,"type":"array","items":{"type":"object","properties":{"month":{"type":"string","pattern":"^\\d{4}-(0[1-9]|1[0-2])$"},"budgets":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"provider":{"type":"string","maxLength":40},"budget_minor":{"type":"integer","minimum":0,"maximum":1000000000000}},"required":["provider","budget_minor"],"additionalProperties":false}}},"required":["month","budgets"],"additionalProperties":false}}},"required":["months"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/campaigns/{id}/diagnosis":{"get":{"tags":["Paid media"],"summary":"Why a campaign's results stopped or delivery fell: what was checked and the likely causes","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/refreshes":{"get":{"tags":["Paid media"],"summary":"Creative refresh briefs for the content studio, and the paused ads proposed from them","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Paid media"],"summary":"Ask the content studio for fresh creative for a campaign (a brief; paused ads are proposed once its assets are approved)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^chc_.*"},"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["channel_campaign_id","reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/refreshes/{id}/assets":{"put":{"tags":["Paid media"],"summary":"Link approved assets to a refresh brief (paused ads are proposed from them)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"asset_ids":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","maxLength":60}}},"required":["asset_ids"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/settings":{"put":{"tags":["Paid media"],"summary":"Set the organization's paid media limits: spend ceilings, step size, changes per day and the automatic pause (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"org_daily_ceiling_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":1000000000000},{"type":"null"}]},"org_monthly_ceiling_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":10000000000000},{"type":"null"}]},"max_step_pct":{"type":"integer","minimum":1,"maximum":100},"changes_per_entity_day":{"type":"integer","minimum":1,"maximum":20},"auto_pause_on_ceiling":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/stop":{"post":{"tags":["Paid media"],"summary":"Stop all paid media changes now (anyone who can make changes); queued changes are held","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/stop-switch/off":{"post":{"tags":["Paid media"],"summary":"Resume paid media changes (owners); held changes wait for approval again","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/conversions":{"get":{"tags":["Paid media"],"summary":"Server-side conversions per ad account: on or off, the event mapping, and what was sent, matched, refused and why","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/conversions/accounts/{id}":{"put":{"tags":["Paid media"],"summary":"Turn server-side conversions on or off for an ad account, and set its destination and daily ceiling (a person; only events from now on are sent)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean"},"destination_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_:.-]{1,120}$"},{"type":"null"}]},"daily_cap":{"type":"integer","minimum":1,"maximum":100000}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/conversions/mappings/{id}/predicted-value":{"put":{"tags":["Paid media"],"summary":"Choose whether this conversion action sends a predicted future value as its value (Google, Microsoft, TikTok; an owner; off by default). The real value is kept here, and the prediction is labelled wherever it is shown","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"on":{"type":"boolean"}},"required":["on"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/conversions/mappings":{"put":{"tags":["Paid media"],"summary":"Map one of your events (a profile event or a deal stage) to an ad platform's standard event, with its value rule (a person)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^cha_.*"},"source_kind":{"type":"string","enum":["profile_event","deal_stage"]},"source_name":{"type":"string","minLength":1,"maxLength":120},"platform_event":{"type":"string","minLength":1,"maxLength":60},"destination_id":{"anyOf":[{"type":"string","pattern":"^[A-Za-z0-9_:.-]{1,120}$"},{"type":"null"}]},"value_mode":{"default":"none","type":"string","enum":["none","fixed","from_event","margin"]},"value_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":1000000000000},{"type":"null"}]},"currency":{"anyOf":[{"type":"string","pattern":"^[A-Z]{3}$"},{"type":"null"}]},"enabled":{"type":"boolean"},"margin_pct":{"description":"Margin mode: the percent of revenue counted for order lines whose product cost isn't known","anyOf":[{"type":"number","minimum":0,"maximum":100},{"type":"null"}]}},"required":["channel_account_id","source_kind","source_name","platform_event","value_mode"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/conversions/mappings/{id}":{"delete":{"tags":["Paid media"],"summary":"Remove an event mapping (nothing more is sent for that event)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/conversions/accounts/{id}/flush":{"post":{"tags":["Paid media"],"summary":"Send the conversions waiting for an ad account now, as you (owners; consent and suppressions are checked again; within the daily ceiling)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/competitors":{"get":{"tags":["Paid media"],"summary":"Competitors you follow in the public ad libraries, with how many of their ads were found and are running","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Paid media"],"summary":"Follow a competitor's ads in the public ad library (its Facebook page ids or words to search, and the countries); only reads, once a day","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"name":{"type":"string","minLength":1,"maxLength":120},"page_ids":{"maxItems":10,"type":"array","items":{"type":"string","pattern":"^[0-9]{1,30}$"}},"search_terms":{"type":"string","minLength":2,"maxLength":100},"countries":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"}}},"required":["workspace_id","name","countries"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/competitors/{id}":{"delete":{"tags":["Paid media"],"summary":"Stop following a competitor","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/competitors/{id}/scan":{"post":{"tags":["Paid media"],"summary":"Search the ad library for a competitor's running ads now (reads only; at most 500 ads)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/competitors/{id}/ads":{"get":{"tags":["Paid media"],"summary":"A competitor's ads found in the ad library, newest first (the swipe file)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"running","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/competitors/ads/{id}/saved":{"put":{"tags":["Paid media"],"summary":"Keep a competitor's ad in your swipe file, or let it go","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"saved":{"type":"boolean"}},"required":["saved"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/competitors/{id}/brief":{"get":{"tags":["Paid media"],"summary":"A brief from a competitor's ads: what runs longest, the phrases and angles they lead with, and angles they leave open","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/competitors/{id}/brief/studio":{"post":{"tags":["Paid media"],"summary":"Send the competitor brief to the content studio as an ad piece to write","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/precheck":{"post":{"tags":["Paid media"],"summary":"Check an ad's text and landing page before proposing it: what the platform would refuse, and what it is likely to disapprove","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"provider":{"type":"string","pattern":"^[a-z_]{2,40}$"},"ad":{"type":"object","properties":{"headlines":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":300}},"descriptions":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":1000}},"text":{"type":"string","maxLength":5000},"final_url":{"type":"string","maxLength":2000},"path1":{"type":"string","maxLength":100},"path2":{"type":"string","maxLength":100}},"additionalProperties":false}},"required":["provider","ad"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/apple/connect":{"post":{"tags":["Paid media"],"summary":"Connect Apple Ads with your own Apple Ads API credentials: they're checked against your Apple organization, then saved sealed with the connection","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"apple_org_id":{"type":"string","pattern":"^[0-9]{1,20}$"},"client_id":{"type":"string","minLength":8,"maxLength":200},"team_id":{"type":"string","minLength":8,"maxLength":200},"key_id":{"type":"string","minLength":6,"maxLength":200},"private_key":{"type":"string","minLength":64,"maxLength":2000}},"required":["workspace_id","apple_org_id","client_id","team_id","key_id","private_key"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/campaigns/{id}/automation/read":{"post":{"tags":["Paid media"],"summary":"Read a campaign's automatic text and landing-page settings from the ad platform (before proposing a change to them)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/campaigns/{id}/ai-surfaces":{"get":{"tags":["Paid media"],"summary":"Check whether a Google Ads campaign can show in AI Overviews and AI Mode: its type, keyword matching, ad copy, landing pages and markets","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/visibility-targeting":{"get":{"tags":["Paid media"],"summary":"Targeting for an ad test from AI answers (the AI-visibility account): questions where competitors are named and you aren't, as keywords, and the Reddit communities those answers cite","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","minimum":7,"maximum":90}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/campaigns/{id}/ai-answer-keywords":{"post":{"tags":["Paid media"],"summary":"Propose broad-match keywords on a Google Search campaign for tracked questions where the brand is missing from AI answers and a competitor is named (no change to the daily budget)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"days":{"default":30,"type":"integer","minimum":7,"maximum":90},"max_mention_rate":{"default":0.34,"type":"number","minimum":0,"maximum":0.9},"min_answers":{"default":2,"type":"integer","minimum":1,"maximum":20},"max_keywords":{"default":20,"type":"integer","minimum":1,"maximum":50},"ad_group_external_id":{"type":"string","pattern":"^[0-9A-Za-z_-]{1,40}$"}},"required":["days","max_mention_rate","min_answers","max_keywords"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/campaigns/from-catalog":{"post":{"tags":["Paid media"],"summary":"Build a paused campaign from the product catalog and a goal in plain words: Search (keywords, headlines, descriptions, landing page), Shopping (Google Ads, from the linked Merchant Center account) or catalog ads (Meta, from the business's own catalog, one template ad per message); it waits for approval","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"campaign_id":{"type":"string","pattern":"^cmp_[0-9a-z]{26}$"},"channel_account_id":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"},"goal":{"type":"string","minLength":3,"maxLength":300},"daily_budget_minor":{"type":"integer","exclusiveMinimum":0,"maximum":100000000},"product_ids":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^prd_[0-9a-z]{26}$"}},"countries":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"}},"type":{"default":"search","type":"string","enum":["search","shopping","catalog"]},"merchant_id":{"type":"string","pattern":"^\\d{1,20}$"},"cpc_bid_minor":{"type":"integer","exclusiveMinimum":0,"maximum":100000},"catalog_id":{"type":"string","pattern":"^\\d{1,20}$"},"page_id":{"type":"string","pattern":"^[A-Za-z0-9_]{1,40}$"},"messages":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","minLength":3,"maxLength":500}}},"required":["campaign_id","channel_account_id","goal","daily_budget_minor","type"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/campaigns/from-url":{"post":{"tags":["Paid media"],"summary":"Build paused campaigns from a crawled page's URL and a goal: ad copy written by the organization's model from the page, keywords from its words; each waits for approval","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"campaign_id":{"type":"string","pattern":"^cmp_[0-9a-z]{26}$"},"channel_account_ids":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"}},"url":{"type":"string","maxLength":2000,"format":"uri"},"goal":{"type":"string","minLength":3,"maxLength":300},"daily_budget_minor":{"type":"integer","exclusiveMinimum":0,"maximum":100000000},"countries":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"}},"page_id":{"type":"string","pattern":"^[0-9A-Za-z_-]{1,40}$"},"creative_ids":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":120}}},"required":["campaign_id","channel_account_ids","url","goal","daily_budget_minor"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/audiences/interpret":{"post":{"tags":["Paid media"],"summary":"Turn a plain-language audience description into targeting per network (a suggestion from the organization's model; nothing is sent)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"description":{"type":"string","minLength":5,"maxLength":500},"providers":{"default":["google_ads","meta_ads","linkedin_ads"],"maxItems":14,"type":"array","items":{"type":"string","maxLength":40}},"brand_id":{"type":"string","minLength":3,"maxLength":80},"persona":{"type":"string","minLength":1,"maxLength":100}},"required":["description","providers"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/audiences/lookalike":{"post":{"tags":["Paid media"],"summary":"Make a lookalike audience on the ad platform from a customer list already uploaded there (Meta)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"},"source_list_name":{"type":"string","minLength":1,"maxLength":200},"ratio":{"type":"number","minimum":0.01,"maximum":0.2},"country":{"type":"string","pattern":"^[A-Z]{2}$"}},"required":["channel_account_id","source_list_name","ratio","country"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/campaigns/{id}/sitelinks":{"post":{"tags":["Paid media"],"summary":"Add sitelinks (links to pages of your own sites) under a campaign's ads (Google Ads)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sitelinks":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":25},"description1":{"type":"string","maxLength":35},"description2":{"type":"string","maxLength":35},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["text","url"],"additionalProperties":false}}},"required":["sitelinks"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/audiences/visitors":{"post":{"tags":["Paid media"],"summary":"Make a list of your site's visitors (pages whose address contains the text), built by Google from its own tag","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"},"name":{"type":"string","minLength":1,"maxLength":200},"url_contains":{"type":"string","minLength":1,"maxLength":200},"lookback_days":{"default":30,"type":"integer","minimum":1,"maximum":540}},"required":["channel_account_id","name","url_contains","lookback_days"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/accounts/{id}/catalog":{"post":{"tags":["Paid media"],"summary":"Send the workspace's product catalog to the ad platform's catalog (Pinterest), in batches of 1,000","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"country":{"type":"string","pattern":"^[A-Z]{2}$"},"language":{"type":"string","pattern":"^[a-z]{2}$"},"catalog_id":{"type":"string","pattern":"^\\d{1,20}$"}},"required":["country","language"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/accounts/{id}/companies-reached":{"get":{"tags":["Paid media"],"summary":"Results per company reached over a period (LinkedIn), each marked when it's on a company list sent to this account","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}},{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/accounts/{id}/missed-value":{"get":{"tags":["Paid media"],"summary":"Estimate the conversion value Search campaigns lost to bids (rank) and to budget over a period, from the platform's impression share","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}},{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/campaigns/{id}/bid-fix":{"post":{"tags":["Paid media"],"summary":"Propose a 15% higher target cost per result for a campaign losing impressions to rank (waits for approval)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/accounts/{id}/view-through/read":{"post":{"tags":["Paid media"],"summary":"Read the ad account's website conversion actions and how long a seen (not clicked) ad still counts for each (the whole account's setting)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/lists":{"get":{"tags":["Paid media"],"summary":"Customer lists sent to ad platforms (counts only, never who): whether each is ours and kept current, its open runs, and what its last run and any erasure said","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/lists/{id}/keep-current":{"post":{"tags":["Paid media"],"summary":"Keep a customer list made from a segment current on its ad platform: once a day people who left the segment are taken off and new ones added (at most 5,000 a day); or stop. People who may no longer be on any list are taken off either way","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"on":{"type":"boolean"}},"required":["on"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/lists/{id}/confirm-removal":{"post":{"tags":["Paid media"],"summary":"Confirm a held check that takes many people off a kept list because they left its segment (that check, within 7 days)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"run_id":{"type":"string","minLength":1,"maxLength":64}},"required":["run_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/lists/{id}/dismiss-erasure-note":{"post":{"tags":["Paid media"],"summary":"Dismiss a list's erasure notice once the person was removed from it on the ad platform","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/campaigns/{id}/account-rotation":{"post":{"tags":["Paid media"],"summary":"Compare a LinkedIn campaign's ads, and the LinkedIn campaigns beside it, on how many of the companies they reached engaged; propose pausing the ads clearly behind and moving budget to the audience that engages more (each waits for approval)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"days":{"default":28,"type":"integer","minimum":7,"maximum":90},"min_accounts":{"default":50,"type":"integer","minimum":20,"maximum":10000}},"required":["days","min_accounts"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/campaigns/{id}/conversion-goals/read":{"post":{"tags":["Paid media"],"summary":"Read how a campaign values its conversions on the ad platform: new customers and device value multipliers","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/campaigns/{id}/guidelines/read":{"post":{"tags":["Paid media"],"summary":"Read a campaign's text guidelines (words to leave out, messaging restrictions) and brand lists, and the account's brand lists, from the ad platform","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/sellers":{"get":{"tags":["Paid media"],"summary":"The ad sellers linked here (outside MCP servers that sell media over AdCP), and the outside MCP servers that could be","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Paid media"],"summary":"Link an outside MCP server as an ad seller (its media-buy tools must be there and classified)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"mcp_server_id":{"type":"string","pattern":"^msv_[0-9a-z]{26}$"},"name":{"type":"string","minLength":1,"maxLength":120},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"daily_ceiling":{"type":"number","exclusiveMinimum":0,"maximum":1000000}},"required":["mcp_server_id","name","currency"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/sellers/{id}/products/read":{"post":{"tags":["Paid media"],"summary":"Read an ad seller's products for a brief: each publisher checked against its adagents.json, each product scored, filed for a buy within the hour","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"brief":{"type":"string","minLength":10,"maxLength":2000},"budget_minor":{"type":"integer","exclusiveMinimum":0,"maximum":10000000000},"audience":{"type":"string","maxLength":500}},"required":["brief"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/sellers/{id}/products":{"get":{"tags":["Paid media"],"summary":"An ad seller's products as last read (within the hour), or none","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/media-buys/{id}/creatives":{"post":{"tags":["Paid media"],"summary":"Send creatives (by https address) to an applied media buy's packages on its seller","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"creatives":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"format_id":{"type":"string","minLength":1,"maxLength":100,"pattern":"^[A-Za-z0-9_.:-]+$"},"url":{"type":"string","maxLength":2000,"format":"uri"},"click_url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["name","format_id","url","click_url"],"additionalProperties":false}}},"required":["creatives"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/campaigns/{id}/insertion-orders/read":{"post":{"tags":["Paid media"],"summary":"Read a campaign's insertion orders (each one's pacing and daily or flight budget) from the ad platform, where budgets sit below the campaign","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/campaigns/{id}/asset-groups/read":{"post":{"tags":["Paid media"],"summary":"Read a Performance Max campaign's asset groups (headlines, descriptions, other assets, search themes, audience signal) and the account's audiences from the ad platform","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/campaigns/{id}/experiment/read":{"post":{"tags":["Paid media"],"summary":"Read a campaign's experiment results from the ad platform (its own comparison and p-values) and file them","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/creative-tests":{"get":{"tags":["Paid media"],"summary":"List creative tests (at most 100), for one campaign or all","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"channel_campaign_id","in":"query","required":false,"schema":{"type":"string","pattern":"^chc_[0-9a-z]{26}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Paid media"],"summary":"Start a creative test: new ads against the campaign's best ad on click-through or conversion rate (reads results only; nothing is launched or spent)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_campaign_id":{"type":"string","pattern":"^chc_[0-9a-z]{26}$"},"challenger_ad_ids":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","pattern":"^che_[0-9a-z]{26}$"}},"champion_ad_id":{"type":"string","pattern":"^che_[0-9a-z]{26}$"},"metric":{"default":"ctr","type":"string","enum":["ctr","cvr"]},"min_sample":{"default":2000,"type":"integer","minimum":100,"maximum":1000000},"days":{"default":28,"type":"integer","minimum":7,"maximum":60}},"required":["channel_campaign_id","challenger_ad_ids","metric","min_sample","days"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/creative-tests/{id}/read":{"post":{"tags":["Paid media"],"summary":"Read a creative test's results now and decide it if it can (a winner proposes pausing the ads that lost)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^pd_ctst_[0-9a-z]{26}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/creative-tests/{id}/stop":{"post":{"tags":["Paid media"],"summary":"Stop a running creative test (nothing changes on the platform)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^pd_ctst_[0-9a-z]{26}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/paid/campaigns/{id}/copy":{"post":{"tags":["Paid media"],"summary":"Copy a campaign's structure (keywords, targeting, ad copy, landing page, budget) to another ad account as a new paused campaign that waits for approval","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"to_channel_account_id":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"},"daily_budget_minor":{"type":"integer","exclusiveMinimum":0,"maximum":100000000},"page_id":{"type":"string","pattern":"^[0-9A-Za-z_-]{1,40}$"},"creative_id":{"type":"string","maxLength":120}},"required":["to_channel_account_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/work":{"get":{"tags":["Search and AI visibility"],"summary":"Work opened from approved recommendations, its status and its measured effect (observed before and after, not proven)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","done","rolled_back"]}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{1,4}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/work/{id}/done":{"post":{"tags":["Search and AI visibility"],"summary":"Mark open work done (you applied the draft in your CMS, or finished the hand-over); its effect is measured four weeks later","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_work_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/ai-orders":{"get":{"tags":["Search and AI visibility"],"summary":"Purchases and revenue from visits AI assistants sent to the site (Google Analytics, last click, observed), per assistant","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}},{"name":"days","in":"query","required":true,"schema":{"default":28,"type":"integer","minimum":1,"maximum":90}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/jira/connections":{"get":{"tags":["Search and AI visibility"],"summary":"Your Jira connections (site and name) to send work to","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/jira/projects":{"get":{"tags":["Search and AI visibility"],"summary":"The projects of a connected Jira site (up to 50), to choose where work goes","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"connection_id","in":"query","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^con_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/work/{id}/jira":{"post":{"tags":["Search and AI visibility"],"summary":"Send a piece of work to a Jira project as an issue (once per piece of work; a signed-in person)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_work_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connection_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^con_.*"},"project_key":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,19}$"},"issue_type":{"type":"string","minLength":1,"maxLength":60}},"required":["connection_id","project_key"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/edge-fixes":{"post":{"tags":["Search and AI visibility"],"summary":"Propose fixes the edge worker serves from your site: response headers and canonical, title, description or robots tags on pages (applied only once a person approves; one step to undo)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":3,"maxLength":200},"headers":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"path_prefix":{"type":"string","pattern":"^\\/[^\\s]{0,300}$"},"name":{"type":"string","maxLength":60},"value":{"type":"string","maxLength":500}},"required":["path_prefix","name","value"],"additionalProperties":false}},"page_tags":{"maxItems":500,"type":"array","items":{"type":"object","properties":{"path":{"type":"string","pattern":"^\\/[^\\s]{0,300}$"},"canonical":{"type":"string","maxLength":2000},"title":{"type":"string","maxLength":200},"meta_description":{"type":"string","maxLength":400},"robots":{"type":"string","maxLength":100}},"required":["path"],"additionalProperties":false}}},"required":["title"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/sitemaps":{"post":{"tags":["Search and AI visibility"],"summary":"Propose submitting a sitemap to Google Search Console (sent only once a person approves)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sitemap_url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["sitemap_url"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Search and AI visibility"],"summary":"The sitemaps submitted for the site in Search Console, with their errors and warnings","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/serp":{"get":{"tags":["Search and AI visibility"],"summary":"Tracked keywords with their search volume and difficulty, the latest results page (position, AI Overview and whether it cited the site, AI Mode), where competitors rank and the site doesn't, and this month's lookups against the limit","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/keyword-metrics":{"post":{"tags":["Search and AI visibility"],"summary":"Look up search volume, competition, cost per click and difficulty for the tracked keywords (two lookups, charged to your DataForSEO account; a person, within the monthly limit an owner set)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"location_code":{"type":"integer","minimum":1,"maximum":99999999},"language_code":{"type":"string","pattern":"^[a-z]{2,3}(-[a-z]{2,4})?$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/serp-checks":{"post":{"tags":["Search and AI visibility"],"summary":"Look up the results page for up to 25 tracked keywords (and Google's AI Mode answer when asked): one lookup a keyword each, charged to your DataForSEO account; a person, within the monthly limit an owner set","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"keyword_ids":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_kw_.*"}},"ai_mode":{"type":"boolean"},"location_code":{"type":"integer","minimum":1,"maximum":99999999},"language_code":{"type":"string","pattern":"^[a-z]{2,3}(-[a-z]{2,4})?$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/llm-mentions":{"get":{"tags":["Search and AI visibility"],"summary":"The questions whose AI answers (Google's AI Overviews, ChatGPT) cited the site in the latest lookup, most asked first, with the pages cited and competitors cited alongside (no answer text)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Search and AI visibility"],"summary":"Look up the AI answers that cite the site (one lookup, charged to your DataForSEO account; ChatGPT's data covers the United States in English only; a person, within the monthly limit an owner set)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"platform":{"type":"string","enum":["google","chat_gpt"]},"location_code":{"type":"integer","minimum":1,"maximum":99999999},"language_code":{"type":"string","pattern":"^[a-z]{2,3}(-[a-z]{2,4})?$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/rankings":{"get":{"tags":["Search and AI visibility"],"summary":"Tracked keywords with their weekly average position from Search Console and Bing","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}},{"name":"weeks","in":"query","required":true,"schema":{"default":12,"type":"integer","minimum":1,"maximum":26}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Search and AI visibility"],"summary":"Track keywords for a site (their position comes from Search Console and Bing; no cost)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"queries":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":300}}},"required":["queries"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/rankings/{keyword}":{"delete":{"tags":["Search and AI visibility"],"summary":"Stop tracking a keyword","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}},{"name":"keyword","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_kw_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/prompt-discovery":{"get":{"tags":["Search and AI visibility"],"summary":"Questions people already search for (from Search Console), as prompts worth tracking in answer engines (not saved; no cost)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/vitals":{"get":{"tags":["Search and AI visibility"],"summary":"Core Web Vitals per page and device (largest paint, interaction delay, layout shift), slowest first","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Search and AI visibility"],"summary":"Read Core Web Vitals for up to 20 pages of a verified site from the public page-speed service (no cost)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"urls":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","maxLength":2000,"format":"uri"}},"strategy":{"default":"mobile","type":"string","enum":["mobile","desktop"]}},"required":["urls","strategy"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/crawlers/cloudflare":{"post":{"tags":["Search and AI visibility"],"summary":"Count AI crawler visits from a connected Cloudflare zone's analytics (per day, crawler and path; no visitor addresses)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"account_id":{"type":"string","maxLength":60,"pattern":"^(cha|con)_[A-Za-z0-9]+$","description":"A Cloudflare channel account, or a Cloudflare connection from Settings → Integrations"},"days":{"type":"integer","minimum":1,"maximum":30}},"required":["account_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/programmatic-pages":{"post":{"tags":["Search and AI visibility"],"summary":"Propose pages from a template and rows of data, after quality checks against thin and near-duplicate pages (each becomes a CMS draft once a person approves)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title_template":{"type":"string","minLength":3,"maxLength":200},"path_template":{"type":"string","minLength":2,"maxLength":200},"body_template":{"type":"string","minLength":20,"maxLength":50000},"rows":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","maxLength":2000}}}},"required":["title_template","path_template","body_template","rows"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/recommendations/{id}/social-handover":{"post":{"tags":["Search and AI visibility"],"summary":"Propose handing a source answer engines cite to Social for outreach (a person approves the hand-over; nothing is sent from here)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_rec_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"note":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/bulk-metadata":{"post":{"tags":["Search and AI visibility"],"summary":"Propose titles and descriptions from a template for the crawled pages under a path, after length and duplicate checks (served by the edge worker once a person approves)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"path_prefix":{"type":"string","pattern":"^\\/[^\\s]{0,300}$"},"title_template":{"type":"string","minLength":3,"maxLength":200},"description_template":{"type":"string","minLength":3,"maxLength":400},"holdout_percent":{"description":"Hold back this share of the pages unchanged, to compare citation rates and search clicks against (a split test with a control group)","type":"integer","minimum":0,"maximum":50},"schema_type":{"description":"Also add this schema.org structured data to each page, built from its new title","type":"string","enum":["WebPage","Article","CollectionPage"]}},"required":["path_prefix","title_template"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/refresh-holdout":{"post":{"tags":["Search and AI visibility"],"summary":"Hold back a share of the site's waiting refresh proposals unchanged, as the group the refreshed pages are compared with (citations and search clicks)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"percent":{"type":"integer","minimum":10,"maximum":50}},"required":["percent"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/index-status":{"get":{"tags":["Search and AI visibility"],"summary":"How Google indexed one page of the site (Search Console URL inspection)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}},{"name":"url","in":"query","required":true,"schema":{"type":"string","maxLength":2000,"format":"uri"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/cloudflare-accounts":{"get":{"tags":["Search and AI visibility"],"summary":"Your connected Cloudflare accounts (zones), for counting AI crawler visits","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/content-score":{"post":{"tags":["Search and AI visibility"],"summary":"Grade a page's text: topic coverage against your keywords and the matching search topic, readability, and how easily answer engines can quote it (each with its formula; nothing stored, no cost)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"html":{"type":"string","maxLength":150000},"text":{"type":"string","maxLength":150000},"keywords":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":100}},"site_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}},"required":["keywords"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/recommendations/{id}/lift":{"get":{"tags":["Search and AI visibility"],"summary":"Citation lift of an applied page change against the pages held back from it: citations four weeks before and after, for both groups (observed, not proven; from stored answers, no cost)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_rec_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/listings/accounts":{"get":{"tags":["Search and AI visibility"],"summary":"Your connected Business Profile accounts","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/listings/accounts/{id}/locations":{"get":{"tags":["Search and AI visibility"],"summary":"One page of an account's Business Profile locations (name, address, website, phone)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^cha_[0-9A-Za-z]{10,40}$"}},{"name":"page_token","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":1000,"pattern":"^[\\x21-\\x7e]+$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/listings/accounts/{id}/reviews":{"get":{"tags":["Search and AI visibility"],"summary":"One page of a location's reviews, read only (reply from the review queue)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^cha_[0-9A-Za-z]{10,40}$"}},{"name":"location","in":"query","required":true,"schema":{"type":"string","pattern":"^locations\\/[A-Za-z0-9_-]{1,80}$"}},{"name":"page_token","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":1000,"pattern":"^[\\x21-\\x7e]+$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/listings/accounts/{id}/performance":{"get":{"tags":["Search and AI visibility"],"summary":"A location's search and maps impressions, calls, website clicks and direction requests over a window (read only)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^cha_[0-9A-Za-z]{10,40}$"}},{"name":"location","in":"query","required":true,"schema":{"type":"string","pattern":"^locations\\/[A-Za-z0-9_-]{1,80}$"}},{"name":"days","in":"query","required":true,"schema":{"default":28,"type":"integer","minimum":1,"maximum":90}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/listings/accounts/{id}/gaps":{"get":{"tags":["Search and AI visibility"],"summary":"What's missing on a page of locations (phone, website, hours, description, category), with what to do; nothing is changed","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^cha_[0-9A-Za-z]{10,40}$"}},{"name":"page_token","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":1000,"pattern":"^[\\x21-\\x7e]+$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/listings/changes":{"post":{"tags":["Search and AI visibility"],"summary":"Propose a change to a location's name, phone, website, hours, attributes or description (it goes out only once a person approves it)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"account_id":{"type":"string","pattern":"^cha_[0-9A-Za-z]{10,40}$"},"location":{"type":"string","pattern":"^locations\\/[A-Za-z0-9_-]{1,80}$"},"location_title":{"type":"string","maxLength":100},"changes":{"type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":100},"phone":{"type":"string","minLength":5,"maxLength":30},"website":{"type":"string","maxLength":2000,"format":"uri"},"hours":{"maxItems":21,"type":"array","items":{"type":"object","properties":{"day":{"type":"string","enum":["MONDAY","TUESDAY","WEDNESDAY","THURSDAY","FRIDAY","SATURDAY","SUNDAY"]},"open":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"close":{"anyOf":[{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},{"type":"string","const":"24:00"}]}},"required":["day","open","close"],"additionalProperties":false}},"attributes":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,79}$"},"additionalProperties":{"anyOf":[{"type":"boolean"},{"type":"string","minLength":1,"maxLength":200}]}},"description":{"type":"string","maxLength":750}},"additionalProperties":false}},"required":["account_id","location","changes"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/listings/posts":{"post":{"tags":["Search and AI visibility"],"summary":"Propose an update to post on a location (it's published only once a person approves it)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"account_id":{"type":"string","pattern":"^cha_[0-9A-Za-z]{10,40}$"},"location":{"type":"string","pattern":"^locations\\/[A-Za-z0-9_-]{1,80}$"},"location_title":{"type":"string","maxLength":100},"summary":{"type":"string","minLength":1,"maxLength":1500},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["account_id","location","summary"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/feeds/audits":{"get":{"tags":["Search and AI visibility"],"summary":"Product feed checks for AI shopping, newest first: score, issue counts and the products with the most to fix","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":10,"type":"integer","minimum":1,"maximum":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Search and AI visibility"],"summary":"Check your synced product catalog for AI shopping (titles, identifiers, availability, prices, images, descriptions) and propose title fixes for you to approve","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^ws_.*"},"provider":{"type":"string","enum":["shopify","merchant_center"]},"limit":{"type":"integer","minimum":1,"maximum":2000}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/feeds/export":{"get":{"tags":["Search and AI visibility"],"summary":"Your product feed in the ChatGPT product feed spec's fields (JSON, JSONL, CSV or TSV, up to 5,000 products), checked against the spec's rules with rejected rows listed, to download and submit yourself","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"format","in":"query","required":true,"schema":{"default":"json","type":"string","enum":["json","jsonl","csv","tsv"]}},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^ws_.*"}},{"name":"seller_name","in":"query","required":false,"schema":{"description":"The seller named on every row (default: your organization's name)","type":"string","minLength":1,"maxLength":70}},{"name":"store_country","in":"query","required":false,"schema":{"type":"string","pattern":"^[A-Za-z]{2}$"}},{"name":"target_countries","in":"query","required":false,"schema":{"description":"Comma-separated country codes (default US)","type":"string","pattern":"^[A-Za-z]{2}(,[A-Za-z]{2}){0,19}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/feeds/shopping-visibility":{"get":{"tags":["Search and AI visibility"],"summary":"Which of your products answer engines name for shopping-style prompts (best, buy, price, compare), per engine","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":true,"schema":{"default":28,"type":"integer","minimum":1,"maximum":365}},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^ws_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/product-schema":{"post":{"tags":["Search and AI visibility"],"summary":"Propose product structured data for crawled product pages that don't have it (approving one makes a draft in your CMS)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/overview":{"get":{"tags":["Search and AI visibility"],"summary":"Your sites with their search clicks, open issues and recommendations, and your AI visibility over the last four weeks","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites":{"get":{"tags":["Search and AI visibility"],"summary":"Your sites, whether each is verified, and the accounts connected to each","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Search and AI visibility"],"summary":"Add a site; it is crawled only once it's verified as yours","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"origin":{"type":"string","minLength":4,"maxLength":300},"brand_id":{"type":"string","maxLength":40},"workspace_id":{"type":"string","maxLength":40},"search_console_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"analytics_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"cms_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"crawl_budget":{"type":"integer","minimum":1,"maximum":5000},"crawl_rate_per_sec":{"type":"number","minimum":0.1,"maximum":5}},"required":["origin"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}":{"patch":{"tags":["Search and AI visibility"],"summary":"Change a site's connected accounts, crawl budget or crawl rate","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"brand_id":{"type":"string","maxLength":40},"workspace_id":{"type":"string","maxLength":40},"search_console_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"analytics_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"cms_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"crawl_budget":{"type":"integer","minimum":1,"maximum":5000},"crawl_rate_per_sec":{"type":"number","minimum":0.1,"maximum":5}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/verify":{"post":{"tags":["Search and AI visibility"],"summary":"Check the verification tag on the site's home page (or its Search Console property) and mark the site verified","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/crawl":{"post":{"tags":["Search and AI visibility"],"summary":"Start a technical audit crawl of a verified site (obeys robots.txt, within its page budget and rate)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"budget":{"type":"integer","minimum":1,"maximum":5000}},"additionalProperties":false}}}},"responses":{"202":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/refresh":{"post":{"tags":["Search and AI visibility"],"summary":"Read the site's Search Console, Analytics and Bing data now (filed only; nothing is changed)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/analysis":{"post":{"tags":["Search and AI visibility"],"summary":"Look over the site's search data and last crawl and file recommendations (proposals only)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/queries":{"get":{"tags":["Search and AI visibility"],"summary":"Search queries for a site with clicks, impressions and average position over a period","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}},{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"limit","in":"query","required":true,"schema":{"default":100,"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/topics":{"get":{"tags":["Search and AI visibility"],"summary":"Search queries grouped into topics, with the best page for each","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/pages":{"get":{"tags":["Search and AI visibility"],"summary":"Crawled pages with their title, status, structured data, search clicks, sessions, AI-assistant visits, citations in AI answers and how recently each changed","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/issues":{"get":{"tags":["Search and AI visibility"],"summary":"Open technical issues the last crawls found, most serious first","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}},{"name":"severity","in":"query","required":false,"schema":{"type":"string","enum":["error","warning","info"]}},{"name":"status","in":"query","required":true,"schema":{"default":"open","type":"string","enum":["open","resolved"]}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/edge-config":{"get":{"tags":["Search and AI visibility"],"summary":"What the edge worker serves for this site: the approved robots.txt, llms.txt and redirects","x-required-scope":"edge:write","description":"Requires scope `edge:write`.","security":[{"apiKey":[]},{"oauth2":["edge:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/bot-visits":{"post":{"tags":["Search and AI visibility"],"summary":"Record AI crawler visits counted at the edge (per day, crawler and path; no addresses)","x-required-scope":"edge:write","description":"Requires scope `edge:write`.","security":[{"apiKey":[]},{"oauth2":["edge:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"visits":{"maxItems":5000,"type":"array","items":{"type":"object","properties":{"day":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"user_agent":{"type":"string","maxLength":500},"path":{"type":"string","maxLength":500},"hits":{"type":"integer","minimum":1,"maximum":1000000}},"required":["day","user_agent","path"],"additionalProperties":false}}},"required":["visits"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/server-logs":{"post":{"tags":["Search and AI visibility"],"summary":"Upload a server access log; only AI crawler visits are kept (per day, crawler and path), never addresses","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"log":{"type":"string","maxLength":5000000}},"required":["log"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/crawlers":{"get":{"tags":["Search and AI visibility"],"summary":"AI crawler visits per company and purpose (training, search, user fetches) and the most visited pages","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}},{"name":"days","in":"query","required":true,"schema":{"default":28,"type":"integer","minimum":1,"maximum":180}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/crawler-rules":{"post":{"tags":["Search and AI visibility"],"summary":"Propose crawler rules: allow or block AI training, search and user fetches separately (applied only once a person approves)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"training":{"type":"string","enum":["allow","block"]},"search":{"type":"string","enum":["allow","block"]},"user":{"type":"string","enum":["allow","block"]},"disallow_paths":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^\\/[^\\s]{0,200}$"}},"cloudflare_account_id":{"description":"Also block the chosen crawlers with a rule in this Cloudflare zone (once a person approves)","type":"string","maxLength":60,"pattern":"^(cha|con)_[A-Za-z0-9]+$"}},"required":["training","search","user"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/sites/{id}/llms-txt":{"post":{"tags":["Search and AI visibility"],"summary":"Propose an llms.txt for the site from its crawled pages (applied only once a person approves)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"summary":{"type":"string","minLength":10,"maxLength":1000}},"required":["name","summary"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/recommendations":{"get":{"tags":["Search and AI visibility"],"summary":"The opportunity queue: recommendations for your sites and AI visibility, highest impact first","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"status","in":"query","required":true,"schema":{"default":"open","type":"string","enum":["open","applying","applied","rejected","failed","dismissed"]}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"site_id","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/recommendations/{id}/approve":{"post":{"tags":["Search and AI visibility"],"summary":"Approve a recommendation: a page fix becomes a draft in your CMS, a brief a content piece, a redirect or crawler rule is served from your site","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/recommendations/{id}/reject":{"post":{"tags":["Search and AI visibility"],"summary":"Turn a recommendation down","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"note":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/recommendations/{id}/rollback":{"post":{"tags":["Search and AI visibility"],"summary":"Undo an applied change your site serves (a redirect, crawler rule, llms.txt, page tags or headers): the site serves the version before it again","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/recommendations/{id}/cloudflare-cleanup":{"post":{"tags":["Search and AI visibility"],"summary":"Remove again a Cloudflare crawler rule that couldn't be removed when its crawler rules were rolled back or replaced","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/prompts":{"get":{"tags":["Search and AI visibility"],"summary":"Tracked prompts with their topic, buyer stage, engines and the last answer's result","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Search and AI visibility"],"summary":"Add prompts to track across answer engines (asking them is priced and confirmed separately)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"prompts":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","minLength":3,"maxLength":500},"topic":{"type":"string","maxLength":100},"stage":{"type":"string","enum":["awareness","consideration","decision"]},"market":{"type":"string","maxLength":20},"engines":{"maxItems":4,"type":"array","items":{"type":"string","enum":["openai_search","perplexity","gemini_search","anthropic_search"]}},"panel":{"type":"boolean"},"brand_id":{"type":"string","maxLength":40}},"required":["text"],"additionalProperties":false}}},"required":["prompts"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/prompts/{id}":{"patch":{"tags":["Search and AI visibility"],"summary":"Pause, resume or move a tracked prompt in or out of the weekly panel","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"active":{"type":"boolean"},"panel":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/prompt-ideas":{"get":{"tags":["Search and AI visibility"],"summary":"Prompt ideas from your site's search topics, by buyer stage and for the buyer types you name (not saved; no cost)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"site_id","in":"query","required":true,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^sr_site_.*"}},{"name":"brand","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"personas","in":"query","required":false,"schema":{"type":"string","maxLength":300}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/runs/estimate":{"post":{"tags":["Search and AI visibility"],"summary":"Price a run of your tracked prompts across answer engines: calls and credits, before anything is asked","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"prompt_ids":{"maxItems":400,"type":"array","items":{"type":"string","maxLength":60}},"engines":{"maxItems":4,"type":"array","items":{"type":"string","enum":["openai_search","perplexity","gemini_search","anthropic_search"]}},"panel_only":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/runs/{id}/confirm":{"post":{"tags":["Search and AI visibility"],"summary":"Confirm a priced prompt run: credits are checked and used per call, on your own provider keys","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/runs/{id}/resume":{"post":{"tags":["Search and AI visibility"],"summary":"Finish a confirmed prompt run that was cut off: pairs already asked are skipped, never asked or paid twice, never past the confirmed price","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/runs":{"get":{"tags":["Search and AI visibility"],"summary":"Recent prompt runs with their estimated and used credits","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}},{"name":"status","in":"query","required":false,"schema":{"description":"Only these statuses, separated by commas (estimated, confirmed, done, failed, expired)","type":"string","pattern":"^[a-z]+(,[a-z]+){0,5}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/visibility/ask":{"post":{"tags":["Search and AI visibility"],"summary":"Ask a question in plain words about your AI visibility numbers (answered from your stored answers and crawler counts; one credit, at most 50 a day)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"question":{"type":"string","minLength":5,"maxLength":500},"days":{"type":"integer","minimum":1,"maximum":180},"topic":{"type":"string","maxLength":100}},"required":["question"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/visibility":{"get":{"tags":["Search and AI visibility"],"summary":"Share of voice, mention rate, citation share and tone per answer engine and week, against your competitors","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":true,"schema":{"default":28,"type":"integer","minimum":1,"maximum":365}},{"name":"topic","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"name":"market","in":"query","required":false,"schema":{"type":"string","maxLength":20}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/answers":{"get":{"tags":["Search and AI visibility"],"summary":"Stored answers to your tracked prompts with who was named, the tone, the cited pages and any wrong facts","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"prompt_id","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"engine","in":"query","required":false,"schema":{"type":"string","enum":["openai_search","perplexity","gemini_search","anthropic_search"]}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/search/settings":{"get":{"tags":["Search and AI visibility"],"summary":"Brand terms, competitors, the facts answers are checked against, and weekly tracking with its monthly credit limit","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Search and AI visibility"],"summary":"Change brand terms, competitors, facts, weekly tracking with its monthly credit limit, and the monthly limit of paid keyword lookups (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"brand_terms":{"maxItems":20,"type":"array","items":{"type":"string","minLength":2,"maxLength":80}},"competitors":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":2,"maxLength":80},"terms":{"maxItems":10,"type":"array","items":{"type":"string","minLength":2,"maxLength":80}},"domains":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":200}}},"required":["name","terms"],"additionalProperties":false}},"facts":{"type":"object","propertyNames":{"type":"string","minLength":2,"maxLength":80},"additionalProperties":{"type":"string","minLength":1,"maxLength":300}},"weekly_tracking":{"type":"boolean"},"monthly_credit_ceiling":{"type":"integer","minimum":0,"maximum":100000},"serp_monthly_limit":{"type":"integer","minimum":0,"maximum":10000},"merchant_data_source":{"anyOf":[{"type":"string","pattern":"^(accounts\\/\\d{1,20}\\/dataSources\\/)?\\d{1,20}$"},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/sms/registration":{"get":{"tags":["Journeys"],"summary":"Where your US texting registration stands: the brand's and the campaign's status, and whether texts to US numbers can go","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/messages/held-for-approval":{"get":{"tags":["Journeys"],"summary":"Messages the policy held for a person's approval, grouped by template, journey and broadcast (at most 50 groups)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/messages/approvals":{"post":{"tags":["Journeys"],"summary":"Approve or decline messages held for approval: approved ones go back in the queue once and are checked again when they leave","x-required-scope":"messages:send","description":"Requires scope `messages:send`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"decision":{"type":"string","enum":["approve","decline"]},"template_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^lc_tpl_.*"},"journey_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^lc_jrn_.*"},"broadcast_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^lc_bc_.*"},"message_ids":{"maxItems":1000,"type":"array","items":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^lc_msg_.*"}}},"required":["decision"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/decisioning":{"get":{"tags":["Journeys"],"summary":"Decisioning against its comparison group (people, conversions and a 95% interval) and the latest choices with their reasons","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":true,"schema":{"default":30,"type":"integer","minimum":1,"maximum":92}},{"name":"profile_id","in":"query","required":false,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^prf_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/journeys/{id}/versions":{"get":{"tags":["Journeys"],"summary":"A journey's saved versions, newest first (at most 50)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/journeys/{id}/versions/diff":{"get":{"tags":["Journeys"],"summary":"What changed between two versions of a journey: steps added, removed and changed, and the trigger, goal and exits","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}},{"name":"from","in":"query","required":true,"schema":{"type":"integer","minimum":1,"maximum":100000}},{"name":"to","in":"query","required":true,"schema":{"type":"integer","minimum":1,"maximum":100000}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/journeys/{id}/simulation":{"get":{"tags":["Journeys"],"summary":"Walk synthetic people through a journey before turning it on: messages per person, how long it takes and what would trip the limits (nothing is written or sent)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}},{"name":"people","in":"query","required":true,"schema":{"default":1000,"type":"integer","minimum":10,"maximum":10000}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/audit":{"get":{"tags":["Journeys"],"summary":"The program audit: live journeys competing for the same people, journeys and broadcasts converting below average, and recorded events no journey follows up (read only)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":true,"schema":{"default":30,"type":"integer","minimum":7,"maximum":90}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/journeys/drafts/ai-estimate":{"get":{"tags":["Journeys"],"summary":"What rewriting a goal's journey copy with AI would cost (shown before anything is called)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"goal","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":500}},{"name":"channel","in":"query","required":true,"schema":{"default":"email","type":"string","enum":["email","sms"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/journeys/drafts/ai":{"post":{"tags":["Journeys"],"summary":"Draft a journey for a goal with its copy rewritten by AI, after confirming the shown cost (the library's copy when the model is off)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"goal":{"type":"string","minLength":3,"maxLength":500},"channel":{"default":"email","type":"string","enum":["email","sms"]},"brand_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^brd_.*"},"segment_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^seg_.*"},"confirm_usd":{"type":"number","minimum":0,"maximum":5}},"required":["goal","channel","confirm_usd"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/broadcasts/{id}/results":{"get":{"tags":["Journeys"],"summary":"A broadcast's results per variant: people messaged, conversions after them, and each variant against the first with a 95% interval","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/journeys/{id}/results":{"get":{"tags":["Journeys"],"summary":"A journey's results per variant: people messaged, conversions after them, and each variant against the first with a 95% interval","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/platforms/accounts":{"get":{"tags":["Journeys"],"summary":"Connected email platforms we can read and stage drafts in, and what each one supports","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/platforms/objects":{"get":{"tags":["Journeys"],"summary":"Lists, segments, flows, campaigns, templates and event types read from your email platform (counts only)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"channel_account_id","in":"query","required":false,"schema":{"type":"string","minLength":3,"maxLength":80}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["list","segment","flow","campaign","template","metric","form","catalog"]}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/platforms/accounts/{id}/refresh":{"post":{"tags":["Journeys"],"summary":"Read the account's lists, segments, flows and campaigns again (only what changed; nothing is sent or drafted)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/platforms/drafts":{"get":{"tags":["Journeys"],"summary":"What we staged in your email platform: draft campaigns and flows and list pushes (counts only)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Journeys"],"summary":"Create a campaign or flow as a draft in your email platform (it isn't sent, scheduled or turned on)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","minLength":3,"maxLength":80},"kind":{"type":"string","enum":["campaign","flow"]},"name":{"type":"string","minLength":1,"maxLength":200},"list_id":{"type":"string","minLength":1,"maxLength":200},"subject":{"type":"string","minLength":1,"maxLength":200},"preview_text":{"type":"string","maxLength":200},"from_email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"from_name":{"type":"string","minLength":1,"maxLength":100},"template_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^lc_tpl_.*"}},"required":["channel_account_id","kind","name","list_id","subject","from_email","from_name"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/platforms/segment-pushes":{"post":{"tags":["Journeys"],"summary":"Add a segment's consented, unsuppressed people to a list in your email platform; its own automations on that list may email them, so a person does it (counts only)","x-required-scope":"messages:send","description":"Requires scope `messages:send`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","minLength":3,"maxLength":80},"segment_id":{"type":"string","minLength":3,"maxLength":80},"list_id":{"type":"string","minLength":1,"maxLength":200},"confirm_count":{"type":"integer","minimum":0,"maximum":1000000},"preview":{"type":"boolean"}},"required":["channel_account_id","segment_id","list_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/platforms/accounts/{id}/people-imports":{"post":{"tags":["Journeys"],"summary":"Bring the account's people and their events in as history (a person; bounded pages a time, only what changed after the first time; nothing is sent and no journey starts)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/platforms/accounts/{id}/profile-source":{"put":{"tags":["Journeys"],"summary":"Make this account where your profiles come from (owners): its people are read once a day as history; nothing is sent because of them","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"on":{"type":"boolean"}},"required":["on"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/platforms/accounts/{id}/stop-sync":{"put":{"tags":["Journeys"],"summary":"Pass on to this Attentive or Postscript account everyone who stops texts with you from now on (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"on":{"type":"boolean"}},"required":["on"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/whatsapp/templates/{id}/status":{"get":{"tags":["Journeys"],"summary":"Whether WhatsApp approved this WhatsApp template (approved, pending, rejected, paused or disabled), by language; read from WhatsApp and kept for 10 minutes","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/push/devices":{"post":{"tags":["Journeys"],"summary":"Register a push device token for a person (at most 10 a person; the oldest is dropped). The token is never returned. Registering a device grants no consent: push marketing still needs the person's consent recorded","x-required-scope":"app-inbox:write","description":"Requires scope `app-inbox:write`.","security":[{"apiKey":[]},{"oauth2":["app-inbox:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"profile_id":{"type":"string","minLength":3,"maxLength":80},"token":{"type":"string","minLength":20,"maxLength":4096},"platform":{"type":"string","enum":["ios","android","web"]}},"required":["profile_id","token","platform"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Journeys"],"summary":"Remove a push device token from a person (for example when they sign out of your app)","x-required-scope":"app-inbox:write","description":"Requires scope `app-inbox:write`.","security":[{"apiKey":[]},{"oauth2":["app-inbox:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"profile_id":{"type":"string","minLength":3,"maxLength":80},"token":{"type":"string","minLength":20,"maxLength":4096}},"required":["profile_id","token"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/webhooks/whatsapp_cloud/{connectionId}":{"get":{"tags":[""],"summary":"WhatsApp's webhook subscription check: answers the challenge when the verify token matches the one on the connection","security":[],"parameters":[{"name":"connectionId","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/in-app/messages":{"get":{"tags":["Journeys"],"summary":"A person's in-app inbox for your app: newest first, at most 20, unexpired and not dismissed","x-required-scope":"app-inbox:write","description":"Requires scope `app-inbox:write`.","security":[{"apiKey":[]},{"oauth2":["app-inbox:write"]},{"session":[]}],"parameters":[{"name":"profile_id","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":20}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/in-app/messages/{id}/seen":{"post":{"tags":["Journeys"],"summary":"Mark an in-app message seen by the person it was for","x-required-scope":"app-inbox:write","description":"Requires scope `app-inbox:write`.","security":[{"apiKey":[]},{"oauth2":["app-inbox:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"profile_id":{"type":"string","minLength":3,"maxLength":80}},"required":["profile_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/in-app/messages/{id}/dismissals":{"post":{"tags":["Journeys"],"summary":"The person dismissed an in-app message: it leaves their inbox","x-required-scope":"app-inbox:write","description":"Requires scope `app-inbox:write`.","security":[{"apiKey":[]},{"oauth2":["app-inbox:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"profile_id":{"type":"string","minLength":3,"maxLength":80}},"required":["profile_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/templates/{id}/preview":{"get":{"tags":["Journeys"],"summary":"A rendered preview of a template with a sample person's merge fields, as HTML for a sandboxed frame (no remote content, no script) and as plain text","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}},{"name":"profile_id","in":"query","required":false,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/platforms/staged-journeys":{"post":{"tags":["Journeys"],"summary":"Build one of your journeys in Klaviyo as a flow whose emails are all drafts, or as drafts in Braze, Customer.io or Iterable: its approved messages as templates (or draft newsletters for an empty segment) and its outline. Nothing there is sent or turned on","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","minLength":3,"maxLength":80},"journey_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^lc_jrn_.*"},"from_email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"from_name":{"type":"string","maxLength":100},"klaviyo_trigger":{"type":"object","properties":{"type":{"type":"string","enum":["list","segment","metric"]},"id":{"type":"string","minLength":1,"maxLength":200}},"required":["type","id"],"additionalProperties":false}},"required":["channel_account_id","journey_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/templates/{id}/parts-readout":{"get":{"tags":["Journeys"],"summary":"How each alternative of a template's parts did (sends, conversions, an interval), and which are clearly ahead","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/deliverability/postmaster":{"get":{"tags":["Journeys"],"summary":"What Gmail's Postmaster Tools reports for your sending domains, a row a day (spam rate, SPF, DKIM, DMARC, delivery errors)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/deliverability/postmaster/{id}/reads":{"post":{"tags":["Journeys"],"summary":"Read a sending domain's last 14 days from Postmaster Tools now (a person; otherwise read once a day)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/settings/reply-drafts":{"put":{"tags":["Journeys"],"summary":"Draft answers (and proposed actions) for replies, for a person to approve (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"on":{"type":"boolean"},"daily":{"type":"integer","minimum":0,"maximum":1000},"per_person":{"type":"integer","minimum":0,"maximum":20},"chat_daily":{"type":"integer","minimum":0,"maximum":5000}},"required":["on"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Journeys"],"summary":"Reply drafts: whether they're on, the daily numbers of automatic answers, what's connected and today's use","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/reply-drafts":{"get":{"tags":["Journeys"],"summary":"Replies waiting for a person: the question, the drafted answer or proposed action, its sources","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`. Web sessions only.","security":[{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/reply-drafts/{id}/decision":{"post":{"tags":["Journeys"],"summary":"Approve (send the answer, or do the action) or dismiss a reply draft","x-required-scope":"messages:send","description":"Requires scope `messages:send`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"decision":{"type":"string","enum":["approve","dismiss"]},"answer":{"type":"string","maxLength":1000}},"required":["decision"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/segments/{id}/shopify-tag":{"post":{"tags":["Journeys"],"summary":"Tag this segment's customers in Shopify (for Markets, discounts and banners there)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^seg_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tag":{"type":"string","minLength":2,"maxLength":40}},"required":["tag"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/chat":{"get":{"tags":["Journeys"],"summary":"The website chat: each verified site, whether it's on, its daily number of answers and today's counts","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/chat/sites/{id}":{"put":{"tags":["Journeys"],"summary":"Turn the website chat on or off for one of your verified sites, and set its daily number of answers (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^sr_site_[0-9a-z]{26}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean"},"daily_limit":{"type":"integer","minimum":0,"maximum":5000}},"required":["enabled"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/chat/handovers":{"get":{"tags":["Journeys"],"summary":"Website chat questions waiting for a person (kept until answered or closed, 7 days at most)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`. Web sessions only.","security":[{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/chat/handovers/{id}/decision":{"post":{"tags":["Journeys"],"summary":"Answer a visitor's question (they see it in the chat when they come back) or close it","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reply":{"type":"string","maxLength":1000},"close":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/overview":{"get":{"tags":["Journeys"],"summary":"Journeys, broadcasts and messages at a glance: what's live, what was sent, held or dropped this week, open alerts and whether sending is paused","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/settings":{"get":{"tags":["Journeys"],"summary":"Messaging settings: quiet hours, limits per person and per day, double opt-in channels, the holdout, the postal address and sending accounts","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Journeys"],"summary":"Change messaging settings (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"quiet_start":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"quiet_end":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"per_person_day":{"type":"integer","minimum":1,"maximum":20},"per_person_week":{"type":"integer","minimum":1,"maximum":50},"org_day":{"type":"integer","minimum":1,"maximum":10000000},"burst_per_hour":{"type":"integer","minimum":1,"maximum":10000000},"double_opt_in":{"maxItems":4,"type":"array","items":{"type":"string","enum":["email","sms","push","whatsapp"]}},"holdout_pct":{"type":"integer","minimum":0,"maximum":50},"postal_address":{"type":"string","maxLength":400},"sender":{"type":"object","properties":{"from_email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"from_name":{"type":"string","maxLength":120},"reply_to":{"type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"sms_from":{"type":"string","pattern":"^(\\+\\d{6,15}|MG[0-9a-f]{32})$"},"rcs_from":{"anyOf":[{"type":"string","pattern":"^MG[0-9a-f]{32}$"},{"type":"null"}]},"confirm_email_template":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^lc_tpl_.*"},"confirm_sms_template":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^lc_tpl_.*"},"confirm_whatsapp_template":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^lc_tpl_.*"},"help_line":{"type":"string","maxLength":300}},"additionalProperties":false},"decisioning":{"type":"boolean"},"decisioning_holdout_pct":{"type":"integer","minimum":5,"maximum":50},"decisioning_explore_pct":{"type":"integer","minimum":0,"maximum":30},"conversion_event":{"type":"string","pattern":"^[a-z][a-z0-9_.:-]{0,79}$"},"accounts":{"type":"object","properties":{"email":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"sms":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"push":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"whatsapp":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}},"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/sending/pause":{"post":{"tags":["Journeys"],"summary":"Pause all sending at once: queued messages wait until an owner resumes","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reason":{"type":"string","maxLength":300}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/sending/resume":{"post":{"tags":["Journeys"],"summary":"Resume sending (owners): messages held by the pause go back to the queue; ones held over three days are dropped","x-required-scope":"messages:send","description":"Requires scope `messages:send`. Web sessions only.","security":[{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/templates":{"get":{"tags":["Journeys"],"summary":"Message templates by channel and purpose, with their status","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"channel","in":"query","required":false,"schema":{"type":"string","enum":["email","sms","push","whatsapp"]}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","approved","archived"]}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Journeys"],"summary":"Create a draft template with merge fields and fallbacks (a person approves it before it's used)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"channel":{"type":"string","enum":["email","sms","push","whatsapp"]},"purpose":{"default":"marketing","type":"string","enum":["marketing","transactional"]},"brand_id":{"anyOf":[{"type":"string","maxLength":40,"format":"starts_with","pattern":"^brd_.*"},{"type":"null"}]},"subject":{"default":"","type":"string","maxLength":300},"preheader":{"default":"","type":"string","maxLength":300},"body_text":{"default":"","type":"string","maxLength":20000},"body_html":{"default":"","type":"string","maxLength":100000},"provider_template":{"anyOf":[{"type":"string","pattern":"^[a-z0-9_]{1,120}$"},{"type":"null"}]},"fallbacks":{"default":{},"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_.]{0,60}$"},"additionalProperties":{"type":"string","maxLength":200}},"media_urls":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":500,"pattern":"^https:\\/\\/[^\\s\"'<>]+$"}},"blocks":{"maxItems":40,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"header"},"brand":{"type":"boolean"},"text":{"type":"string","maxLength":120}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"heading"},"text":{"type":"string","maxLength":200}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text"},"text":{"type":"string","maxLength":5000}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"button"},"label":{"type":"string","maxLength":60},"url":{"type":"string","maxLength":500}},"required":["kind","label","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"image"},"url":{"type":"string","maxLength":500},"alt":{"type":"string","maxLength":200},"link":{"type":"string","maxLength":500}},"required":["kind","url","alt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"divider"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"spacer"},"size":{"type":"string","enum":["s","m","l"]}},"required":["kind"],"additionalProperties":false}]}},"parts":{"type":"object","properties":{"subject":{"maxItems":4,"type":"array","items":{"type":"string","maxLength":300}},"preheader":{"maxItems":4,"type":"array","items":{"type":"string","maxLength":300}},"offer":{"maxItems":4,"type":"array","items":{"type":"string","maxLength":200}},"cta":{"maxItems":4,"type":"array","items":{"type":"string","maxLength":80}}},"additionalProperties":false}},"required":["name","channel","purpose","subject","preheader","body_text","body_html","fallbacks"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/templates/{id}":{"get":{"tags":["Journeys"],"summary":"One template with its pre-launch checks","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Journeys"],"summary":"Edit a template (an approved one goes back to draft until approved again)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"channel":{"type":"string","enum":["email","sms","push","whatsapp"]},"purpose":{"default":"marketing","type":"string","enum":["marketing","transactional"]},"brand_id":{"anyOf":[{"type":"string","maxLength":40,"format":"starts_with","pattern":"^brd_.*"},{"type":"null"}]},"subject":{"default":"","type":"string","maxLength":300},"preheader":{"default":"","type":"string","maxLength":300},"body_text":{"default":"","type":"string","maxLength":20000},"body_html":{"default":"","type":"string","maxLength":100000},"provider_template":{"anyOf":[{"type":"string","pattern":"^[a-z0-9_]{1,120}$"},{"type":"null"}]},"fallbacks":{"default":{},"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_.]{0,60}$"},"additionalProperties":{"type":"string","maxLength":200}},"media_urls":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":500,"pattern":"^https:\\/\\/[^\\s\"'<>]+$"}},"blocks":{"maxItems":40,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"header"},"brand":{"type":"boolean"},"text":{"type":"string","maxLength":120}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"heading"},"text":{"type":"string","maxLength":200}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"text"},"text":{"type":"string","maxLength":5000}},"required":["kind","text"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"button"},"label":{"type":"string","maxLength":60},"url":{"type":"string","maxLength":500}},"required":["kind","label","url"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"image"},"url":{"type":"string","maxLength":500},"alt":{"type":"string","maxLength":200},"link":{"type":"string","maxLength":500}},"required":["kind","url","alt"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"divider"}},"required":["kind"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"spacer"},"size":{"type":"string","enum":["s","m","l"]}},"required":["kind"],"additionalProperties":false}]}},"parts":{"type":"object","properties":{"subject":{"maxItems":4,"type":"array","items":{"type":"string","maxLength":300}},"preheader":{"maxItems":4,"type":"array","items":{"type":"string","maxLength":300}},"offer":{"maxItems":4,"type":"array","items":{"type":"string","maxLength":200}},"cta":{"maxItems":4,"type":"array","items":{"type":"string","maxLength":80}}},"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/templates/{id}/approve":{"post":{"tags":["Journeys"],"summary":"Approve the version of a template you looked at, after its checks pass (a person, from the web app)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["version"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/templates/{id}/test":{"post":{"tags":["Journeys"],"summary":"Send a test of an email template to your own address only","x-required-scope":"messages:send","description":"Requires scope `messages:send`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/journeys":{"get":{"tags":["Journeys"],"summary":"Journeys with their status, trigger, expected volume and people in them","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","live","paused","archived"]}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Journeys"],"summary":"Create a draft journey: trigger, waits, branches, splits, sends, goal and exits (nothing is sent until a person turns it on)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"purpose":{"default":"marketing","type":"string","enum":["marketing","transactional"]},"brand_id":{"anyOf":[{"type":"string","maxLength":40,"format":"starts_with","pattern":"^brd_.*"},{"type":"null"}]},"trigger":{"type":"object","properties":{"kind":{"type":"string","enum":["event","segment_entry","date","form"]},"event":{"type":"string","pattern":"^[a-z][a-z0-9_.]{0,79}$"},"segment_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^seg_.*"},"trait":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"form_id":{"type":"string","pattern":"^[a-z0-9_-]{1,60}$"},"where":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}}},"required":["kind"],"additionalProperties":false},"steps":{"minItems":1,"maxItems":30,"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9_]{1,40}$"},"kind":{"type":"string","const":"send"},"template_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^lc_tpl_.*"},"variants":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"template_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^lc_tpl_.*"},"share":{"type":"integer","minimum":1,"maximum":100}},"required":["template_id","share"],"additionalProperties":false}},"options":{"maxItems":4,"type":"array","items":{"type":"object","properties":{"template_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^lc_tpl_.*"}},"required":["template_id"],"additionalProperties":false}},"send_time":{"type":"string","enum":["now","per_person"]},"send_window":{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":23},"end":{"type":"integer","minimum":1,"maximum":24}},"required":["start","end"],"additionalProperties":false}},"required":["id","kind","template_id"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9_]{1,40}$"},"kind":{"type":"string","const":"wait"},"hours":{"type":"number","minimum":0.25,"maximum":2160}},"required":["id","kind","hours"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9_]{1,40}$"},"kind":{"type":"string","const":"branch"},"if":{"type":"object","properties":{"event":{"type":"string","pattern":"^[a-z][a-z0-9_.]{0,79}$"},"within_hours":{"type":"integer","minimum":1,"maximum":2160},"trait":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"equals":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"additionalProperties":false},"then":{"type":"integer","minimum":0,"maximum":29},"else":{"type":"integer","minimum":0,"maximum":29}},"required":["id","kind","if","then","else"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9_]{1,40}$"},"kind":{"type":"string","const":"split"},"shares":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"integer","minimum":1,"maximum":100}},"go":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"integer","minimum":0,"maximum":29}}},"required":["id","kind","shares","go"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9_]{1,40}$"},"kind":{"type":"string","const":"exit"}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9_]{1,40}$"},"kind":{"type":"string","const":"agent"},"agent_id":{"type":"string","pattern":"^agt_[0-9a-z]{26}$"},"routes":{"default":[],"maxItems":5,"type":"array","items":{"type":"object","properties":{"equals":{"type":"string","minLength":1,"maxLength":60},"go":{"type":"integer","minimum":0,"maximum":29}},"required":["equals","go"],"additionalProperties":false}},"else":{"type":"integer","minimum":0,"maximum":29},"trait":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"timeout_hours":{"default":24,"type":"number","minimum":1,"maximum":168}},"required":["id","kind","agent_id","routes","else","timeout_hours"],"additionalProperties":false}]}},"goal":{"anyOf":[{"type":"object","properties":{"event":{"type":"string","pattern":"^[a-z][a-z0-9_.]{0,79}$"},"within_days":{"type":"integer","minimum":1,"maximum":365}},"required":["event"],"additionalProperties":false},{"type":"null"}]},"exit":{"default":{},"type":"object","properties":{"events":{"maxItems":10,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_.]{0,79}$"}}},"additionalProperties":false},"reentry":{"default":"never","type":"string","enum":["never","after_exit"]},"holdout_pct":{"type":"integer","minimum":0,"maximum":50},"priority":{"type":"integer","minimum":1,"maximum":100}},"required":["name","purpose","trigger","steps","exit","reentry"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/journeys/drafts":{"post":{"tags":["Journeys"],"summary":"Describe a goal (welcome, abandoned cart, win-back…) and get a draft journey with its draft messages","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"goal":{"type":"string","minLength":3,"maxLength":500},"channel":{"default":"email","type":"string","enum":["email","sms"]},"brand_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^brd_.*"},"segment_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^seg_.*"}},"required":["goal","channel"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/journeys/{id}":{"get":{"tags":["Journeys"],"summary":"One journey with its steps and expected volume","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Journeys"],"summary":"Change a draft or paused journey (its expected volume is worked out again)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"purpose":{"default":"marketing","type":"string","enum":["marketing","transactional"]},"brand_id":{"anyOf":[{"type":"string","maxLength":40,"format":"starts_with","pattern":"^brd_.*"},{"type":"null"}]},"trigger":{"type":"object","properties":{"kind":{"type":"string","enum":["event","segment_entry","date","form"]},"event":{"type":"string","pattern":"^[a-z][a-z0-9_.]{0,79}$"},"segment_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^seg_.*"},"trait":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"form_id":{"type":"string","pattern":"^[a-z0-9_-]{1,60}$"},"where":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"additionalProperties":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}}},"required":["kind"],"additionalProperties":false},"steps":{"minItems":1,"maxItems":30,"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9_]{1,40}$"},"kind":{"type":"string","const":"send"},"template_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^lc_tpl_.*"},"variants":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"template_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^lc_tpl_.*"},"share":{"type":"integer","minimum":1,"maximum":100}},"required":["template_id","share"],"additionalProperties":false}},"options":{"maxItems":4,"type":"array","items":{"type":"object","properties":{"template_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^lc_tpl_.*"}},"required":["template_id"],"additionalProperties":false}},"send_time":{"type":"string","enum":["now","per_person"]},"send_window":{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":23},"end":{"type":"integer","minimum":1,"maximum":24}},"required":["start","end"],"additionalProperties":false}},"required":["id","kind","template_id"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9_]{1,40}$"},"kind":{"type":"string","const":"wait"},"hours":{"type":"number","minimum":0.25,"maximum":2160}},"required":["id","kind","hours"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9_]{1,40}$"},"kind":{"type":"string","const":"branch"},"if":{"type":"object","properties":{"event":{"type":"string","pattern":"^[a-z][a-z0-9_.]{0,79}$"},"within_hours":{"type":"integer","minimum":1,"maximum":2160},"trait":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"equals":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]}},"additionalProperties":false},"then":{"type":"integer","minimum":0,"maximum":29},"else":{"type":"integer","minimum":0,"maximum":29}},"required":["id","kind","if","then","else"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9_]{1,40}$"},"kind":{"type":"string","const":"split"},"shares":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"integer","minimum":1,"maximum":100}},"go":{"minItems":2,"maxItems":5,"type":"array","items":{"type":"integer","minimum":0,"maximum":29}}},"required":["id","kind","shares","go"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9_]{1,40}$"},"kind":{"type":"string","const":"exit"}},"required":["id","kind"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","pattern":"^[a-z0-9_]{1,40}$"},"kind":{"type":"string","const":"agent"},"agent_id":{"type":"string","pattern":"^agt_[0-9a-z]{26}$"},"routes":{"default":[],"maxItems":5,"type":"array","items":{"type":"object","properties":{"equals":{"type":"string","minLength":1,"maxLength":60},"go":{"type":"integer","minimum":0,"maximum":29}},"required":["equals","go"],"additionalProperties":false}},"else":{"type":"integer","minimum":0,"maximum":29},"trait":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"},"timeout_hours":{"default":24,"type":"number","minimum":1,"maximum":168}},"required":["id","kind","agent_id","routes","else","timeout_hours"],"additionalProperties":false}]}},"goal":{"anyOf":[{"type":"object","properties":{"event":{"type":"string","pattern":"^[a-z][a-z0-9_.]{0,79}$"},"within_days":{"type":"integer","minimum":1,"maximum":365}},"required":["event"],"additionalProperties":false},{"type":"null"}]},"exit":{"default":{},"type":"object","properties":{"events":{"maxItems":10,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_.]{0,79}$"}}},"additionalProperties":false},"reentry":{"default":"never","type":"string","enum":["never","after_exit"]},"holdout_pct":{"type":"integer","minimum":0,"maximum":50},"priority":{"type":"integer","minimum":1,"maximum":100}},"required":["name","purpose","trigger","steps","exit","reentry"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/journeys/{id}/estimate":{"post":{"tags":["Journeys"],"summary":"Work out a journey's expected volume: people entering a day and messages a day and a week","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/journeys/{id}/activate":{"post":{"tags":["Journeys"],"summary":"Turn a journey on after confirming its expected messages a week; it acts only on what happens from now","x-required-scope":"messages:send","description":"Requires scope `messages:send`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"confirm_sends_per_week":{"type":"integer","minimum":0,"maximum":100000000},"audience":{"type":"object","properties":{"review":{"type":"string","pattern":"^[0-9a-f]{32}$"},"people_per_week":{"type":"integer","minimum":0,"maximum":10000}},"required":["review","people_per_week"],"additionalProperties":false}},"required":["confirm_sends_per_week"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/journeys/{id}/audience":{"get":{"tags":["Journeys"],"summary":"Who can start a journey that starts from a segment: what was approved, what it is now, how many match and wait, and the limits","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Journeys"],"summary":"Confirm who can start a journey that's on and how many new people a week; people who match now don't start unless the people waiting are let in","x-required-scope":"messages:send","description":"Requires scope `messages:send`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"review":{"type":"string","pattern":"^[0-9a-f]{32}$"},"people_per_week":{"type":"integer","minimum":0,"maximum":10000},"start_waiting":{"default":false,"type":"boolean"}},"required":["review","people_per_week","start_waiting"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/journeys/{id}/pause":{"post":{"tags":["Journeys"],"summary":"Pause a journey: nothing more is enrolled or sent from it","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/journeys/{id}/archive":{"post":{"tags":["Journeys"],"summary":"Archive a journey: it stops and its queued messages are dropped when they come due","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/broadcasts":{"get":{"tags":["Journeys"],"summary":"Broadcasts with their segment, variants, holdout, status and counts","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Journeys"],"summary":"Create a draft broadcast to a segment with subject or content variants and a holdout","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"channel":{"type":"string","enum":["email","sms","push","whatsapp"]},"segment_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^seg_.*"},"brand_id":{"anyOf":[{"type":"string","maxLength":40,"format":"starts_with","pattern":"^brd_.*"},{"type":"null"}]},"variants":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"template_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^lc_tpl_.*"},"share":{"type":"integer","minimum":1,"maximum":100}},"required":["template_id","share"],"additionalProperties":false}},"holdout_pct":{"type":"integer","minimum":0,"maximum":50},"send_time":{"default":"now","type":"string","enum":["now","at","per_person"]},"scheduled_at":{"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))$"},"goal_event":{"type":"string","pattern":"^[a-z][a-z0-9_.:-]{0,79}$"},"send_window":{"type":"object","properties":{"start":{"type":"integer","minimum":0,"maximum":23},"end":{"type":"integer","minimum":1,"maximum":24}},"required":["start","end"],"additionalProperties":false}},"required":["name","channel","segment_id","variants","send_time"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/broadcasts/{id}/estimate":{"post":{"tags":["Journeys"],"summary":"Count who a broadcast reaches: the segment, those who said yes to this channel, and the holdout","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/voice":{"get":{"tags":["Journeys"],"summary":"How each channel's messages sound against the brand's voice (learned from its approved email)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"brand_id","in":"query","required":false,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^brd_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/templates/{id}/adapt":{"post":{"tags":["Journeys"],"summary":"Draft text, push and WhatsApp messages from an email template in the brand's voice (drafts to review)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channels":{"minItems":1,"maxItems":3,"type":"array","items":{"type":"string","enum":["sms","push","whatsapp"]}}},"required":["channels"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/broadcasts/{id}/personal-copy":{"put":{"tags":["Journeys"],"summary":"Choose personal copy for a share of a draft email broadcast (or turn it off with null)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"personal_copy":{"anyOf":[{"type":"object","properties":{"share_pct":{"type":"integer","minimum":1,"maximum":50},"parts":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"string","enum":["subject","preheader","cta","body"]}},"traits":{"default":[],"maxItems":10,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,59}$"}},"instruction":{"type":"string","maxLength":300}},"required":["share_pct","parts","traits"],"additionalProperties":false},{"type":"null"}]}},"required":["personal_copy"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/broadcasts/{id}/personal-copy/estimate":{"post":{"tags":["Journeys"],"summary":"What writing the personal copy would cost, before anything is called","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/broadcasts/{id}/personal-copy/confirm":{"post":{"tags":["Journeys"],"summary":"Confirm the personal copy's cost (its ceiling)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"confirm_usd":{"type":"number","minimum":0,"maximum":100000}},"required":["confirm_usd"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/broadcasts/{id}/personal-copy/readout":{"get":{"tags":["Journeys"],"summary":"Conversions of people who got personal copy against the rest of the broadcast","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/broadcasts/{id}/send":{"post":{"tags":["Journeys"],"summary":"Send a broadcast after confirming how many people it reaches (each message is checked again when it leaves)","x-required-scope":"messages:send","description":"Requires scope `messages:send`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"confirm_recipients":{"type":"integer","minimum":0,"maximum":1000000}},"required":["confirm_recipients"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/broadcasts/{id}/pause":{"post":{"tags":["Journeys"],"summary":"Pause a broadcast: its queued messages wait","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/broadcasts/{id}/cancel":{"post":{"tags":["Journeys"],"summary":"Cancel a broadcast: its queued messages are dropped","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/messages":{"get":{"tags":["Journeys"],"summary":"Messages and why each was sent, held or dropped (by person id; no addresses)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["queued","sending","sent","held","dropped","failed","delivered","bounced","complained"]}},{"name":"journey_id","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"broadcast_id","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/deliverability":{"get":{"tags":["Journeys"],"summary":"Delivery, bounce and complaint rates for the last 7 and 30 days, why messages were held or dropped, and open alerts","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/deliverability/domain":{"post":{"tags":["Journeys"],"summary":"Check a sending domain's SPF, DKIM, DMARC and BIMI records","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"domain":{"type":"string","minLength":3,"maxLength":253},"dkim_selector":{"type":"string","pattern":"^[a-z0-9_-]{1,63}$"}},"required":["domain"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/forms":{"post":{"tags":["Journeys"],"summary":"File a sign-up form a visitor submitted on your site: the person, what they agreed to and the text they saw (texts and chosen channels wait for confirmation)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ws_.*"},"form_id":{"type":"string","pattern":"^[a-z0-9_-]{1,60}$"},"event_id":{"type":"string","maxLength":200},"anon_id":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"fields":{"type":"object","properties":{"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","maxLength":40},"name":{"type":"string","maxLength":200},"country":{"type":"string","minLength":2,"maxLength":2},"timezone":{"type":"string","maxLength":64}},"additionalProperties":false},"consents":{"type":"object","properties":{"email":{"type":"boolean"},"sms":{"type":"boolean"},"whatsapp":{"type":"boolean"}},"additionalProperties":false},"text_shown":{"type":"string","maxLength":4000}},"required":["workspace_id","form_id","fields","consents","text_shown"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/unsubscribe/{token}":{"get":{"tags":["Journeys"],"summary":"The unsubscribe link in a message: asks before acting","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","minLength":10,"maxLength":800}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Journeys"],"summary":"One-click unsubscribe: marketing on this channel stops at once for every address of the person","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","minLength":10,"maxLength":800}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/preferences/{token}":{"get":{"tags":["Journeys"],"summary":"The preference page in a message: what the person gets, by channel","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","minLength":10,"maxLength":800}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Journeys"],"summary":"Save the person's choices from the preference page (turning a channel off acts at once)","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","minLength":10,"maxLength":800}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/lifecycle/confirm/{token}":{"get":{"tags":["Journeys"],"summary":"The confirmation link in a double opt-in message: asks before recording","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","minLength":10,"maxLength":800}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Journeys"],"summary":"Confirm a sign-up (double opt-in): the person's consent is recorded now","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","minLength":10,"maxLength":800}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/export/{kind}":{"get":{"tags":["Audiences"],"summary":"Download your audience data, one page at a time (owners, from the web app): people with their addresses, events, consents, traits, suppressions (hashed), segments and scores","x-required-scope":"security:write","description":"Requires scope `security:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["profiles","events","consents","traits","suppressions","segments","scores"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}},{"name":"limit","in":"query","required":true,"schema":{"default":1000,"type":"integer","minimum":1,"maximum":1000}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/warehouse/write-backs":{"post":{"tags":["Audiences"],"summary":"Write computed traits or scores back to a table in your BigQuery, Snowflake or Databricks warehouse (owners): profile ids and values only, up to 10,000 rows a call","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"dataset":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,127}(\\.[A-Za-z_][A-Za-z0-9_]{0,127})?$"},"table":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,200}$"},"kind":{"type":"string","enum":["traits","scores"]},"after":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"required":["channel_account_id","dataset","table","kind"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/warehouse/accounts":{"get":{"tags":["Audiences"],"summary":"Your connected BigQuery, Snowflake and Databricks accounts","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/warehouse/segments":{"get":{"tags":["Audiences"],"summary":"Segments your warehouse evaluates in place, with their last evaluation's counts","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Audiences"],"summary":"Define a segment your warehouse evaluates in place (owners): a table, the column naming the person, rules over its columns, a row bound and a bytes bound","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","minLength":3,"maxLength":80},"workspace_id":{"type":"string","minLength":3,"maxLength":80},"name":{"type":"string","minLength":1,"maxLength":120},"table":{"type":"string","minLength":3,"maxLength":300},"id_column":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,127}$"},"match":{"type":"string","enum":["customer_id","email"]},"rules":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"column":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,127}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","is_set","within_days"]},"value":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"},{"minItems":1,"maxItems":50,"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"}]}}]}},"required":["column","op"],"additionalProperties":false}},"max_rows":{"default":50000,"type":"integer","minimum":1,"maximum":50000},"max_bytes":{"default":1073741824,"type":"integer","minimum":1048576,"maximum":1099511627776}},"required":["channel_account_id","workspace_id","name","table","id_column","match","rules","max_rows","max_bytes"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/warehouse/segments/{id}/estimate":{"post":{"tags":["Audiences"],"summary":"Ask the warehouse how much evaluating this segment would read (BigQuery dry run; nothing is run)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/warehouse/segments/{id}/evaluations":{"post":{"tags":["Audiences"],"summary":"Have the warehouse evaluate this segment now (a person; billed to your warehouse, within the segment's bounds); members are matched to your people","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/warehouse/models":{"get":{"tags":["Audiences"],"summary":"Scoring and decisioning models your warehouse runs in place, with their last run's counts","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Audiences"],"summary":"Define a score or a decision your warehouse computes in place (owners): a table, the column naming the person, rules or options over its columns, and bounds","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"channel_account_id":{"type":"string","minLength":3,"maxLength":80},"name":{"type":"string","minLength":1,"maxLength":120},"table":{"type":"string","minLength":3,"maxLength":300},"id_column":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,127}$"},"match":{"type":"string","enum":["customer_id","email"]},"population":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"column":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,127}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","is_set","within_days"]},"value":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"},{"minItems":1,"maxItems":50,"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"}]}}]}},"required":["column","op"],"additionalProperties":false}},"max_rows":{"default":50000,"type":"integer","minimum":1,"maximum":50000},"max_bytes":{"default":1073741824,"type":"integer","minimum":1048576,"maximum":1099511627776},"kind":{"type":"string","const":"score"},"score_kind":{"default":"lead","type":"string","enum":["lead","churn","purchase","engagement"]},"rules":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"when":{"minItems":1,"maxItems":5,"type":"array","items":{"type":"object","properties":{"column":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,127}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","is_set","within_days"]},"value":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"},{"minItems":1,"maxItems":50,"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"}]}}]}},"required":["column","op"],"additionalProperties":false}},"points":{"type":"integer","minimum":-1000,"maximum":1000},"label":{"type":"string","maxLength":80}},"required":["when","points"],"additionalProperties":false}}},"required":["channel_account_id","name","table","id_column","match","population","max_rows","max_bytes","kind","score_kind","rules"],"additionalProperties":false},{"type":"object","properties":{"channel_account_id":{"type":"string","minLength":3,"maxLength":80},"name":{"type":"string","minLength":1,"maxLength":120},"table":{"type":"string","minLength":3,"maxLength":300},"id_column":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,127}$"},"match":{"type":"string","enum":["customer_id","email"]},"population":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"column":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,127}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","is_set","within_days"]},"value":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"},{"minItems":1,"maxItems":50,"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"}]}}]}},"required":["column","op"],"additionalProperties":false}},"max_rows":{"default":50000,"type":"integer","minimum":1,"maximum":50000},"max_bytes":{"default":1073741824,"type":"integer","minimum":1048576,"maximum":1099511627776},"kind":{"type":"string","const":"decision"},"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"holdout_pct":{"default":5,"type":"integer","minimum":5,"maximum":50},"options":{"minItems":2,"maxItems":6,"type":"array","items":{"type":"object","properties":{"value":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"label":{"type":"string","maxLength":80},"weight":{"type":"number","minimum":0,"maximum":1},"eligible":{"default":[],"maxItems":5,"type":"array","items":{"type":"object","properties":{"column":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,127}$"},"op":{"type":"string","enum":["eq","neq","gt","gte","lt","lte","in","is_set","within_days"]},"value":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"},{"minItems":1,"maxItems":50,"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"}]}}]}},"required":["column","op"],"additionalProperties":false}},"template_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^lc_tpl_.*"}},"required":["value","weight","eligible"],"additionalProperties":false}}},"required":["channel_account_id","name","table","id_column","match","population","max_rows","max_bytes","kind","key","holdout_pct","options"],"additionalProperties":false}]}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/warehouse/models/{id}/estimate":{"post":{"tags":["Audiences"],"summary":"Ask the warehouse how much running this model would read (BigQuery dry run; nothing is run)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/warehouse/models/{id}/runs":{"post":{"tags":["Audiences"],"summary":"Have the warehouse run this model now (a person; billed to your warehouse, within its bounds): scores or choices land for your people","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/warehouse/accounts/{id}/tables":{"get":{"tags":["Audiences"],"summary":"The tables in a Databricks catalog and schema (Unity Catalog), 50 at a time","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}},{"name":"catalog","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,200}$"}},{"name":"schema","in":"query","required":true,"schema":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,200}$"}},{"name":"page_token","in":"query","required":false,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/hightouch/{id}/syncs":{"get":{"tags":["Audiences"],"summary":"Your Hightouch syncs, 100 at a time","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/hightouch/{id}/models":{"get":{"tags":["Audiences"],"summary":"Your Hightouch models, 100 at a time","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":100000}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/hightouch/{id}/syncs/{syncId}/runs":{"post":{"tags":["Audiences"],"summary":"Start a Hightouch sync run (owners): it sends that model's rows where the sync points in Hightouch","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}},{"name":"syncId","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"full_resync":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/segment/{id}/trait-imports":{"post":{"tags":["Audiences"],"summary":"Bring in the traits Segment keeps for people you already have (owners; up to 500 a time, filed as history)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":500}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/warehouse/ga4-imports":{"post":{"tags":["Audiences"],"summary":"Read the last days of your GA4 export in BigQuery for signed-in people you already have (owners; filed as history)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"workspace_id":{"type":"string","minLength":3,"maxLength":80},"dataset":{"type":"string","pattern":"^analytics_\\d{4,20}$"},"days":{"type":"integer","minimum":1,"maximum":30},"max_rows":{"type":"integer","minimum":1,"maximum":50000}},"required":["channel_account_id","workspace_id","dataset"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/warehouse/ads-click-imports":{"post":{"tags":["Audiences"],"summary":"Read Google Ads clicks from your BigQuery export and file them for the people who made them (owners; filed as history)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"workspace_id":{"type":"string","minLength":3,"maxLength":80},"dataset":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,200}$"},"table":{"type":"string","pattern":"^(p_)?(ads_)?ClickStats_\\d{6,12}$"},"days":{"type":"integer","minimum":1,"maximum":90},"max_rows":{"type":"integer","minimum":1,"maximum":50000}},"required":["channel_account_id","workspace_id","dataset","table"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/predictions":{"post":{"tags":["Audiences"],"summary":"Predict each person's chance of doing an event in the next 7 to 90 days (from your own systems' events), stored as a trait segments can use, with a backtest","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"event":{"type":"string","pattern":"^[a-z][a-z0-9_.]{1,60}$"},"days":{"default":30,"type":"integer","minimum":7,"maximum":90},"limit":{"default":5000,"type":"integer","minimum":1,"maximum":20000}},"required":["event","days","limit"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/segments/{id}/alert":{"put":{"tags":["Audiences"],"summary":"Tell me (one notice a day at most) when people enter this segment; turning it off is immediate","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"on":{"type":"boolean"}},"required":["on"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/settings/conversation-insights":{"get":{"tags":["Audiences"],"summary":"Whether replies and passed-on conversations are read for insights on people's profiles","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Audiences"],"summary":"Turn conversation insights on or off (owners): the text is never kept, only the facts read from it","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"on":{"type":"boolean"}},"required":["on"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/conversations":{"post":{"tags":["Audiences"],"summary":"Pass on a conversation with one of your people (a help desk, the sales team): its facts are filed on their profile when insights are on; the text isn't kept","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"profile_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^prf_.*"},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"text":{"type":"string","minLength":1,"maxLength":4000},"channel":{"type":"string","enum":["email","chat","phone","sms","whatsapp","social"]},"source":{"default":"api","type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"occurred_at":{"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))$"}},"required":["text","channel","source"],"additionalProperties":false}}}},"responses":{"202":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/profiles/{id}/conversation-insights":{"get":{"tags":["Audiences"],"summary":"What a person's replies and conversations said (intent, sentiment, topics, preferences), never the text","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^prf_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/clean-room-files":{"post":{"tags":["Audiences"],"summary":"Prepare a segment for a clean room or an identity partner (owners): hashed identifiers of people who agreed to advertising use only, never the do-not-contact list, at least 1,000 people","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"segment_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^seg_.*"},"format":{"type":"string","enum":["aws_clean_rooms","customer_match","identity_partner"]},"min_size":{"default":1000,"type":"integer","minimum":100,"maximum":1000000},"collaboration_key":{"type":"string","minLength":32,"maxLength":200}},"required":["segment_id","format","min_size"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/clean-room-overlaps":{"post":{"tags":["Audiences"],"summary":"Record a partner's overlap report as counts only (owners); a small overlap isn't shown","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"segment_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^seg_.*"},"partner":{"type":"string","minLength":1,"maxLength":60},"matched":{"type":"integer","minimum":0,"maximum":9007199254740991},"submitted":{"type":"integer","minimum":0,"maximum":9007199254740991},"min_size":{"type":"integer","minimum":100,"maximum":1000000}},"required":["segment_id","partner","matched","submitted"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/segments":{"get":{"tags":["Audiences"],"summary":"Segments with their rules and size","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Audiences"],"summary":"Save a segment (rules over traits, events, scores and consent, or a list of people) and count it","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"default":"","type":"string","maxLength":500},"workspace_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ws_.*"},"brand_id":{"anyOf":[{"type":"string","maxLength":40,"format":"starts_with","pattern":"^brd_.*"},{"type":"null"}]},"kind":{"default":"rules","type":"string","enum":["rules","static"]},"definition":{"anyOf":[{"type":"object","properties":{"match":{"default":"all","type":"string","enum":["all","any"]},"rules":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":3,"maxLength":120,"pattern":"^(profile\\.(country|timezone|locale|email_domain|has_email|has_phone)|trait\\.[a-z0-9_]{1,60}|event\\.[a-z0-9_.]{1,80}|score\\.[a-z0-9_]{3,60}|consent\\.[a-z_]{2,20}\\.[a-z_]{2,20}|signal\\.[a-z][a-z0-9_]{1,39}|account\\.target_list)$"},"op":{"type":"string","enum":["eq","neq","in","gte","lte","exists","did","did_not","granted","not_granted"]},"value":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"},{"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"}]}}]},"within_days":{"type":"integer","minimum":1,"maximum":3650},"min_count":{"type":"integer","minimum":1,"maximum":1000},"where":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"value":{"type":"string","minLength":1,"maxLength":200}},"required":["key","value"],"additionalProperties":false}},"required":["field","op"],"additionalProperties":false}}},"required":["match","rules"],"additionalProperties":false},{"type":"object","properties":{"profile_ids":{"maxItems":50000,"type":"array","items":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^prf_.*"}}},"required":["profile_ids"],"additionalProperties":false}]}},"required":["name","description","workspace_id","kind","definition"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/segments/preview":{"post":{"tags":["Audiences"],"summary":"Turn plain words or rules into segment rules and count who matches, without saving","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","maxLength":500},"definition":{"type":"object","properties":{"match":{"default":"all","type":"string","enum":["all","any"]},"rules":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"field":{"type":"string","minLength":3,"maxLength":120,"pattern":"^(profile\\.(country|timezone|locale|email_domain|has_email|has_phone)|trait\\.[a-z0-9_]{1,60}|event\\.[a-z0-9_.]{1,80}|score\\.[a-z0-9_]{3,60}|consent\\.[a-z_]{2,20}\\.[a-z_]{2,20}|signal\\.[a-z][a-z0-9_]{1,39}|account\\.target_list)$"},"op":{"type":"string","enum":["eq","neq","in","gte","lte","exists","did","did_not","granted","not_granted"]},"value":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"},{"maxItems":100,"type":"array","items":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"}]}}]},"within_days":{"type":"integer","minimum":1,"maximum":3650},"min_count":{"type":"integer","minimum":1,"maximum":1000},"where":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,39}$"},"value":{"type":"string","minLength":1,"maxLength":200}},"required":["key","value"],"additionalProperties":false}},"required":["field","op"],"additionalProperties":false}}},"required":["match","rules"],"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/segments/{id}/refresh":{"post":{"tags":["Audiences"],"summary":"Count a segment again now (who entered and left since last time)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/segments/{id}/ad-audiences":{"post":{"tags":["Audiences"],"summary":"Prepare a segment as a customer list for an ad account: consented people only, hashed; it waits for a person's approval in paid media","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"list_name":{"type":"string","minLength":1,"maxLength":120}},"required":["channel_account_id","list_name"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/suppressions":{"get":{"tags":["Audiences"],"summary":"The suppression list: why each address is suppressed and since when (addresses masked)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"reason","in":"query","required":false,"schema":{"type":"string","enum":["unsubscribe","complaint","bounce","manual","do_not_contact","sunset","stop_keyword"]}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Audiences"],"summary":"Suppress addresses now (at most 1,000 at a time); they never get marketing again until they opt back in","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"entries":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["email","phone","domain"]},"value":{"type":"string","minLength":3,"maxLength":320}},"required":["kind","value"],"additionalProperties":false}},"reason":{"default":"manual","type":"string","enum":["manual","do_not_contact"]},"channel":{"anyOf":[{"type":"string","enum":["email","sms","push","whatsapp"]},{"type":"null"}]}},"required":["entries","reason"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/suppressions/{id}":{"delete":{"tags":["Audiences"],"summary":"Remove a manual or sunset suppression (unsubscribes, complaints and bounces stay)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/suppressions/sunset-preview":{"post":{"tags":["Audiences"],"summary":"How many people would be suppressed for not engaging: at least this many marketing emails in the window and no opens, clicks, orders or forms (nothing is changed)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"days":{"default":180,"type":"integer","minimum":30,"maximum":730},"min_sent":{"default":8,"type":"integer","minimum":3,"maximum":100},"limit":{"default":500,"type":"integer","minimum":1,"maximum":1000}},"required":["days","min_sent","limit"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/suppressions/sunset":{"post":{"tags":["Audiences"],"summary":"Stop marketing email to people who haven't engaged (a person, from the web app); nothing is sent to them, and each can be removed again","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"days":{"default":180,"type":"integer","minimum":30,"maximum":730},"min_sent":{"default":8,"type":"integer","minimum":3,"maximum":100},"limit":{"default":500,"type":"integer","minimum":1,"maximum":1000}},"required":["days","min_sent","limit"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/profiles/{id}/context":{"get":{"tags":["Audiences"],"summary":"One person's context for marketing: country, traits, recent events, consents and scores (no addresses)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/events":{"post":{"tags":["Audiences"],"summary":"Send events from your server (at most 500 at a time; each is kept once by its event id; properties never keep addresses)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ws_.*"},"source":{"default":"api","type":"string","pattern":"^[a-z0-9_]{1,40}$"},"events":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"event_id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","pattern":"^[a-z][a-z0-9_.]{0,79}$"},"occurred_at":{"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))$"},"person":{"type":"object","properties":{"profile_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^prf_.*"},"email":{"type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"phone":{"type":"string","maxLength":40},"customer_id":{"type":"string","maxLength":200},"device":{"type":"string","maxLength":200}},"additionalProperties":false},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["event_id","name","person"],"additionalProperties":false}}},"required":["workspace_id","source","events"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/merges":{"get":{"tags":["Audiences"],"summary":"People who look like the same person (a shared email, phone, customer id or device), waiting for a decision","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"status","in":"query","required":true,"schema":{"default":"proposed","type":"string","enum":["proposed","merged","rejected"]}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/merges/scan":{"post":{"tags":["Audiences"],"summary":"Look for people who share an identifier and list them for review","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/merges/{id}":{"post":{"tags":["Audiences"],"summary":"Merge two people into one, or keep them apart (a person, from the web app)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"merge":{"type":"boolean"}},"required":["merge"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/traits/compute":{"post":{"tags":["Audiences"],"summary":"Work out RFM, lifetime value, engagement, churn risk and purchase likelihood now (they're refreshed nightly)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/score-models":{"get":{"tags":["Audiences"],"summary":"Scoring models with their rules, qualified-lead threshold and whether qualified people go to sales","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Audiences"],"summary":"Create a scoring model: points for events and traits, and an optional qualified-lead threshold","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"kind":{"default":"lead","type":"string","enum":["lead","churn","purchase","engagement"]},"rules":{"minItems":1,"maxItems":40,"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["event","trait","profile"]},"key":{"type":"string","pattern":"^[a-z0-9_.]{1,80}$"},"op":{"type":"string","enum":["eq","gte","lte","exists"]},"value":{"anyOf":[{"type":"string","maxLength":200},{"type":"number"},{"type":"boolean"}]},"within_days":{"type":"integer","minimum":1,"maximum":3650},"points":{"type":"integer","minimum":-100,"maximum":100},"max_count":{"type":"integer","minimum":1,"maximum":50},"label":{"type":"string","maxLength":120}},"required":["kind","key","points"],"additionalProperties":false}},"mql_threshold":{"anyOf":[{"type":"integer","minimum":1,"maximum":1000},{"type":"null"}]}},"required":["name","kind","rules"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/score-models/{id}/score":{"post":{"tags":["Audiences"],"summary":"Score people now; those over the threshold are marked qualified (and handed to sales only if an owner turned that on)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/score-models/{id}/handoff":{"put":{"tags":["Audiences"],"summary":"Turn on or off handing qualified people to your sales product (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/score-models/{id}/scores":{"get":{"tags":["Audiences"],"summary":"People ranked by a model's score, with the reasons (by person id)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/scoring/suggestions":{"get":{"tags":["Audiences"],"summary":"Suggested scoring rules: the events that come before a conversion more often for people who converted","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"conversion","in":"query","required":true,"schema":{"default":"deal.won","type":"string","pattern":"^[a-z][a-z0-9_.]{0,79}$"}},{"name":"days","in":"query","required":true,"schema":{"default":180,"type":"integer","minimum":7,"maximum":365}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/imports":{"post":{"tags":["Audiences"],"summary":"Read people and their traits from your warehouse with a read-only query (owners); filed as history, nothing is sent because of it","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"workspace_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ws_.*"},"sql":{"type":"string","minLength":10,"maxLength":4000},"max_rows":{"default":10000,"type":"integer","minimum":1,"maximum":100000}},"required":["channel_account_id","workspace_id","sql","max_rows"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/people-imports":{"post":{"tags":["Audiences"],"summary":"Import people from a CSV file (at most 10,000 and 2 MB): you say where the list came from and that they agreed to hear from you, per channel; filed as history (nothing is sent), the do-not-contact list always wins (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ws_.*"},"csv":{"type":"string","minLength":5,"maxLength":1900000},"file_name":{"type":"string","maxLength":200},"source":{"type":"string","maxLength":500},"channels":{"maxItems":2,"type":"array","items":{"type":"string","enum":["email","sms"]}},"agreed":{"type":"boolean","const":true}},"required":["workspace_id","csv","source","channels","agreed"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Audiences"],"summary":"Your latest imports of people and what each one did (counts and refused lines; never an address)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/audiences/people-imports/{id}":{"get":{"tags":["Audiences"],"summary":"One import of people and its result","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/overview":{"get":{"tags":["Social"],"summary":"Connected social and review accounts, what waits for approval, what's scheduled, held, and open alerts","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/settings":{"put":{"tags":["Social"],"summary":"Set the posts and replies a day per account and per organization, and regions without suggested review replies","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"posts_per_account_day":{"type":"integer","minimum":0,"maximum":500},"posts_per_org_day":{"type":"integer","minimum":0,"maximum":5000},"replies_per_account_day":{"type":"integer","minimum":0,"maximum":2000},"replies_per_org_day":{"type":"integer","minimum":0,"maximum":20000},"no_suggested_review_replies_in":{"maxItems":250,"type":"array","items":{"type":"string","pattern":"^[A-Za-z]{2}$"}},"team_routes":{"type":"object","propertyNames":{"type":"string","maxLength":20},"additionalProperties":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":60}}},"approved_reply_templates":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":500}},"approved_answers":{"maxItems":30,"type":"array","items":{"type":"string","minLength":1,"maxLength":1000}}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/pause":{"post":{"tags":["Social"],"summary":"Pause social publishing (approved posts are held) or, as an owner, lift the pause","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"paused":{"type":"boolean"}},"required":["paused"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"paused":{"type":"boolean"},"held":{"type":"number"},"released":{"type":"number"}},"required":["paused","held","released"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/posts":{"get":{"tags":["Social"],"summary":"The calendar: posts and replies by status and date (proposals, scheduled, held, published, taken down)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","pattern":"^[a-z_,]{1,120}$"}},{"name":"from","in":"query","required":false,"schema":{"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))$"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["post","reply","message","review_reply"]}},{"name":"limit","in":"query","required":true,"schema":{"default":100,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Social"],"summary":"Compose a post for one or more accounts (with per-network wording and media); it waits for approval on the calendar","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_ids":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}},"body":{"type":"string","minLength":1,"maxLength":63206},"variants":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"string","minLength":1,"maxLength":63206}},"media_asset_ids":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":40}},"link":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"scheduled_at":{"anyOf":[{"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))$"},{"type":"null"}]},"brand_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"ai_generated":{"type":"boolean"},"paid_partnership":{"type":"boolean"},"options":{"type":"object","properties":{"instagram_format":{"type":"string","enum":["feed","story"]},"tiktok_privacy":{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]},"tiktok_your_brand":{"description":"TikTok: the video promotes your own business","type":"boolean"},"pinterest_board":{"description":"A pin's board: one of the account's boards (from posting-options)","type":"string","maxLength":40}},"additionalProperties":false},"options_by_account":{"type":"object","propertyNames":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"additionalProperties":{"type":"object","properties":{"instagram_format":{"type":"string","enum":["feed","story"]},"tiktok_privacy":{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]},"tiktok_your_brand":{"type":"boolean"}},"additionalProperties":false}}},"required":["channel_account_ids","body"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/posts/{id}":{"get":{"tags":["Social"],"summary":"One post or reply from the calendar","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Social"],"summary":"Edit a proposal's wording, media or time (approvals given so far no longer count)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":63206},"scheduled_at":{"anyOf":[{"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))$"},{"type":"null"}]},"media_asset_ids":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":40}},"link":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"options":{"type":"object","properties":{"tiktok_privacy":{"type":"string","enum":["PUBLIC_TO_EVERYONE","MUTUAL_FOLLOW_FRIENDS","FOLLOWER_OF_CREATOR","SELF_ONLY"]},"tiktok_your_brand":{"type":"boolean"}},"additionalProperties":false},"paid_partnership":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/review-requests/after-purchase":{"get":{"tags":["Social"],"summary":"Whether review requests go out after purchases, and how (event, wait, message, link, daily limit)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Social"],"summary":"Turn review requests after purchases on or off: an approved message, a few days after each purchase made from now on, within a daily limit","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean"},"event":{"type":"string","maxLength":80},"days_after":{"type":"integer","minimum":1,"maximum":60},"channel":{"type":"string","enum":["email","sms"]},"template_id":{"type":"string","maxLength":80},"review_url":{"type":"string","maxLength":500},"max_per_day":{"type":"integer","minimum":1,"maximum":1000},"site_channel_account_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["enabled"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/accounts/{id}/reply-as":{"put":{"tags":["Social"],"summary":"Choose which of your Trustpilot users replies to reviews on this account are posted as (its 24-character Trustpilot id)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"business_user_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["business_user_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/accounts/{id}/posting-options":{"get":{"tags":["Social"],"summary":"The posting choices a connected account offers (for TikTok, who can see the video), read when you compose","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/posts/{id}/approve":{"post":{"tags":["Social"],"summary":"Approve a post or reply as a person: it is published now, or at its scheduled time","x-required-scope":"messages:send","description":"Requires scope `messages:send`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"content_hash":{"type":"string","pattern":"^[0-9a-f]{64}$"},"written_by_person":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/posts/{id}/reject":{"post":{"tags":["Social"],"summary":"Dismiss a proposed post or reply","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"note":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/posts/{id}/take-down":{"post":{"tags":["Social"],"summary":"Take a published post down from its network now (never waits for approval)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/posts/requeue":{"post":{"tags":["Social"],"summary":"Put approved posts held at a daily limit back in the queue (each is checked again)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"post_ids":{"minItems":1,"maxItems":200,"type":"array","items":{"type":"string","maxLength":60}}},"required":["post_ids"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"requeued":{"type":"number"}},"required":["requeued"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/posts/suggestions":{"post":{"tags":["Social"],"summary":"Suggestions while composing: wording fitted to each network, hashtags that worked before, the best hours (nothing is filed)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":63206},"channel_account_ids":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}}},"required":["body","channel_account_ids"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/posts/{id}/details":{"post":{"tags":["Social"],"summary":"Change a published video's title and description, or add it to a playlist (YouTube), as you","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":100},"description":{"type":"string","maxLength":5000},"playlist_id":{"type":"string","maxLength":64}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/results/explained":{"get":{"tags":["Social"],"summary":"Results by network against the period before, with the reasons they changed (posting, results per post, the posts that drove it)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":true,"schema":{"default":7,"type":"integer","minimum":1,"maximum":90}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/posts/captions":{"post":{"tags":["Social"],"summary":"Captions written with AI for each chosen account, in the brand's voice and each network's limit (nothing is filed)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"brief":{"type":"string","minLength":5,"maxLength":4000},"channel_account_ids":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}},"brand_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["brief","channel_account_ids"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/ideas":{"get":{"tags":["Social"],"summary":"Ideas for what to post next, from rising listening themes, inbox questions and your best posts, each with why","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/best-times":{"get":{"tags":["Social"],"summary":"The hours your posts get the most engagement, per network","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/inbox":{"get":{"tags":["Social"],"summary":"The unified inbox: comments, mentions, messages and reviews with sentiment, category, team and assignee","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","assigned","done","ignored"]}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["comment","mention","message","review","thread"]}},{"name":"team","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"channel_account_id","in":"query","required":false,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}},{"name":"urgency","in":"query","required":false,"schema":{"type":"string","enum":["high"]}},{"name":"include_history","in":"query","required":false,"schema":{}},{"name":"before","in":"query","required":false,"schema":{"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))$"}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/inbox/{id}":{"patch":{"tags":["Social"],"summary":"Assign an inbox item to a person or team, or mark it done or ignored","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"assignee":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"team":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"status":{"type":"string","enum":["open","assigned","done","ignored"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/inbox/{id}/reply-draft":{"post":{"tags":["Social"],"summary":"Draft a reply to an inbox item (suggested when no text is given); it waits for approval","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":10000}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/media-library":{"get":{"tags":["Social"],"summary":"Approved images and videos from the asset library to attach to a post (the composer's picker)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["image","video"]}},{"name":"limit","in":"query","required":true,"schema":{"default":60,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/video-search":{"get":{"tags":["Social"],"summary":"Find videos in the content library by name, tags or what is said in them (caption tracks), with the matching moments","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":2,"maxLength":100}},{"name":"include_unapproved","in":"query","required":false,"schema":{}},{"name":"limit","in":"query","required":true,"schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/inbox/{id}/manual-draft":{"post":{"tags":["Social"],"summary":"Draft a reply a person posts themselves on a community site (Reddit, Hacker News, Stack Exchange): it says who the writer works for, and nothing is posted from here","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"body":{"type":"string","minLength":1,"maxLength":10000}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/inbox/{id}/posted-by-me":{"post":{"tags":["Social"],"summary":"Record that you posted the drafted reply on the community site yourself, with a link to it there (people only)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/accounts/{id}/listing":{"get":{"tags":["Social"],"summary":"Your listing on a review site (Yelp business details: rating, review count, link, categories), read now","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/accounts/{id}/inbox-refresh":{"post":{"tags":["Social"],"summary":"Read new comments, mentions, messages or reviews for one account now (history is filed, never acted on)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/listening":{"get":{"tags":["Social"],"summary":"Mentions, sentiment and share of voice per listening query, and open alerts","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":true,"schema":{"default":7,"type":"integer","minimum":1,"maximum":90}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/listening/queries":{"post":{"tags":["Social"],"summary":"Add a listening query from plain words (quotes for phrases, 'not' or '-' to exclude)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"description":{"type":"string","minLength":1,"maxLength":500},"kind":{"type":"string","enum":["brand","competitor","topic","media"]},"brand_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["name","description"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/listening/mentions":{"post":{"tags":["Social"],"summary":"Import mentions (social, news, blogs, forums) to be matched against your listening queries","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"mentions":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"source":{"type":"string","minLength":1,"maxLength":40},"external_id":{"type":"string","minLength":1,"maxLength":300},"body":{"type":"string","minLength":1,"maxLength":4000},"url":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"outlet":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"reach":{"type":"integer","minimum":0,"maximum":1000000000},"occurred_at":{"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))$"}},"required":["source","external_id","body","occurred_at"],"additionalProperties":false}}},"required":["mentions"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"matched":{"type":"number"}},"required":["matched"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Social"],"summary":"Recent mentions for a listening query (or all), newest first","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"query_id","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/alerts/{id}/resolve":{"post":{"tags":["Social"],"summary":"Mark a social alert as handled","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/review-requests":{"post":{"tags":["Social"],"summary":"Ask a customer for a review after a purchase, through your sending channel (consent and caps apply); a connected review site can make their personal link","x-required-scope":"messages:send","description":"Requires scope `messages:send`.","security":[{"apiKey":[]},{"oauth2":["messages:send"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"profile_id":{"type":"string","maxLength":60},"order_ref":{"type":"string","minLength":1,"maxLength":200},"channel":{"type":"string","enum":["email","sms"]},"review_url":{"type":"string","maxLength":2000,"format":"uri"},"site_channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"template_id":{"type":"string","minLength":3,"maxLength":80}},"required":["profile_id","order_ref","channel","template_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/press/contacts":{"post":{"tags":["Social"],"summary":"Add a journalist or editor to the media list (their address is shown to people only)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"outlet":{"type":"string","maxLength":200},"beats":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":60}},"email":{"anyOf":[{"type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"recent_coverage":{"maxItems":50,"type":"array","items":{"type":"object","properties":{"title":{"type":"string","maxLength":300},"url":{"type":"string","maxLength":2000,"format":"uri"},"at":{"type":"string","maxLength":40}},"required":["title"],"additionalProperties":false}},"bluesky_handle":{"anyOf":[{"type":"string","maxLength":260},{"type":"null"}]}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/press/contacts/{id}/bluesky":{"put":{"tags":["Social"],"summary":"Set or clear a journalist's public Bluesky handle (their recent public posts then rank the media list)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"handle":{"anyOf":[{"type":"string","maxLength":260},{"type":"null"}]}},"required":["handle"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/press/activity/refresh":{"post":{"tags":["Social"],"summary":"Read journalists' recent public Bluesky posts (up to 50 not read this week); only counts, topic words and dates are kept","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/press/media-list":{"get":{"tags":["Social"],"summary":"Journalists ranked for a story by beat and recent coverage, with the reasons","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"goal","in":"query","required":true,"schema":{"type":"string","minLength":3,"maxLength":500}},{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/press/pitches":{"get":{"tags":["Social"],"summary":"Pitch drafts and where each stands (draft, approved, sent)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","approved","sending","sent","rejected"]}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Social"],"summary":"Draft a pitch for one journalist from your angle and their recent coverage; it waits for a person","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contact_id":{"type":"string","maxLength":60},"angle":{"type":"string","minLength":10,"maxLength":4000},"story":{"type":"string","maxLength":500},"subject":{"type":"string","maxLength":200},"body":{"type":"string","maxLength":10000},"brand_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"kind":{"type":"string","enum":["pitch","release"]}},"required":["contact_id","angle"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/press/releases":{"post":{"tags":["Social"],"summary":"Draft a press release with subject lines and the journalists it matches (nothing is created or sent)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"headline":{"type":"string","minLength":5,"maxLength":200},"announcement":{"type":"string","minLength":20,"maxLength":12000},"city":{"type":"string","maxLength":60},"date":{"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))$"},"brand_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"about":{"anyOf":[{"type":"string","maxLength":1500},{"type":"null"}]},"quote":{"anyOf":[{"type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":800},"name":{"type":"string","minLength":1,"maxLength":80},"title":{"type":"string","minLength":1,"maxLength":80}},"required":["text","name","title"],"additionalProperties":false},{"type":"null"}]},"contact":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"email":{"anyOf":[{"type":"string","maxLength":200,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]}},"required":["name"],"additionalProperties":false},{"type":"null"}]}},"required":["headline","announcement"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/press/release-pitches":{"post":{"tags":["Social"],"summary":"Draft the release as one pitch per chosen journalist (up to 25); each waits for a person","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"contact_ids":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"string","maxLength":60}},"subject":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":20,"maxLength":12000},"brand_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]}},"required":["contact_ids","subject","body"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/press/coverage-report":{"get":{"tags":["Social"],"summary":"An executive coverage report: mentions, reach, sentiment, share of voice, outlets and top pieces, with the change on the period before","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":true,"schema":{"default":30,"type":"integer","minimum":1,"maximum":180}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/press/pitches/{id}":{"patch":{"tags":["Social"],"summary":"Edit a pitch (it needs approval again)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"subject":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"maxLength":10000}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/press/pitches/{id}/approve":{"post":{"tags":["Social"],"summary":"Approve one pitch (then send it from here, or from your own mailbox)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/press/pitches/{id}/reject":{"post":{"tags":["Social"],"summary":"Turn a pitch down","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/press/pitches/{id}/mark-sent":{"post":{"tags":["Social"],"summary":"Record that you sent an approved pitch from your mailbox","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/press/pitches/{id}/send":{"post":{"tags":["Social"],"summary":"Send one approved pitch to its journalist by email (you approve this exact message as you send it; one address, never a list)","x-required-scope":"messages:send","description":"Requires scope `messages:send`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"content_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"The pitch's content_hash as you saw it"},"to":{"type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"The address you saw it going to"}},"required":["content_hash","to"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/press/pitches/{id}/outcome":{"post":{"tags":["Social"],"summary":"Record that the journalist replied or said no: follow-ups stop","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"outcome":{"type":"string","enum":["replied","declined"]}},"required":["outcome"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/press/kit":{"get":{"tags":["Social"],"summary":"The press kit: approved logos, images and documents that may be used outside","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"brand_id","in":"query","required":false,"schema":{"type":"string","maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/analyst/questions":{"post":{"tags":["Social"],"summary":"Ask a question about social performance, the inbox, listening or reviews: answered from your data with the query and sources shown","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"question":{"type":"string","minLength":3,"maxLength":500},"use_model":{"type":"boolean"}},"required":["question"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Social"],"summary":"What the social analyst can answer (the fixed queries and periods) and the questions asked recently","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":20,"type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/people":{"get":{"tags":["Social"],"summary":"People whose own accounts are written for (ghostwriting) or who share company posts (advocacy)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/people/me":{"put":{"tags":["Social"],"summary":"Set yourself up to be written for or to share company posts: your own connected account, topics and samples of your writing","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"display_name":{"type":"string","minLength":1,"maxLength":120},"channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"brand_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"topics":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"samples":{"maxItems":50,"type":"array","items":{"type":"string","minLength":1,"maxLength":5000}},"ghostwriting":{"type":"boolean"},"advocacy":{"type":"boolean"}},"required":["display_name","channel_account_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Social"],"summary":"Stop being written for (drafts waiting for you are dismissed)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/people/{id}/drafts":{"post":{"tags":["Social"],"summary":"Draft a post in a person's voice from a topic and their own answers; only that person can approve it","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"topic":{"type":"string","minLength":3,"maxLength":300},"answers":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":4000}},"scheduled_at":{"anyOf":[{"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))$"},{"type":"null"}]}},"required":["topic","answers"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/advocacy":{"get":{"tags":["Social"],"summary":"Company posts you can share on your own account, and who shared the most with what reach","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":true,"schema":{"default":30,"type":"integer","minimum":1,"maximum":90}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/advocacy/shares":{"post":{"tags":["Social"],"summary":"Share a company post on your own account (it waits for your own approval)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"post_id":{"type":"string","minLength":3,"maxLength":80},"comment":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}},"required":["post_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/inbox/{id}/review-post":{"post":{"tags":["Social"],"summary":"Turn a five-star review into a post once the reviewer agreed (say how); it waits for approval like any post","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_ids":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}},"permission":{"type":"string","minLength":5,"maxLength":500},"body":{"anyOf":[{"type":"string","minLength":1,"maxLength":3000},{"type":"null"}]}},"required":["channel_account_ids","permission"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/listening/feeds":{"get":{"tags":["Social"],"summary":"News, blog and RSS feeds read for media monitoring","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Social"],"summary":"Add a news, blog or RSS/Atom feed to monitor (items published before you add it are skipped)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"name":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]}},"required":["url"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/listening/feeds/{id}":{"delete":{"tags":["Social"],"summary":"Stop monitoring a feed","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/listening/feeds/{id}/refresh":{"post":{"tags":["Social"],"summary":"Read a feed now (at most once an hour) and file what matches your listening queries","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/listening/community":{"get":{"tags":["Social"],"summary":"Public community sources searched for your listening terms (Hacker News, Stack Exchange sites): read only, nothing is posted","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Social"],"summary":"Turn on a community source: searched for your listening terms from now on (nothing from before is read); buying threads go to your sales team","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"provider":{"type":"string","enum":["hacker_news","stack_exchange"]},"site":{"description":"For Stack Exchange: the site, like stackoverflow or superuser","anyOf":[{"type":"string","maxLength":80},{"type":"null"}]}},"required":["provider"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/listening/community/{id}":{"delete":{"tags":["Social"],"summary":"Turn a community source off (what it filed stays)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/listening/themes":{"get":{"tags":["Social"],"summary":"Recurring themes (phrases) in recent mentions, per listening query","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"query_id","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"days","in":"query","required":true,"schema":{"default":30,"type":"integer","minimum":1,"maximum":90}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/boosts":{"get":{"tags":["Social"],"summary":"Organic posts that did clearly better than the account's usual, suggested for a boost, and the campaigns each can go in","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/boosts/{id}/paid-proposal":{"post":{"tags":["Social"],"summary":"Send a suggested post to paid media as a new paused ad in a campaign you choose; it waits there for approval","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_campaign_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^chc_.*"},"ad_set_id":{"anyOf":[{"type":"string","maxLength":60,"format":"starts_with","pattern":"^che_.*"},{"type":"null"}]}},"required":["channel_campaign_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/social/boosts/{id}/dismiss":{"post":{"tags":["Social"],"summary":"Dismiss a boost suggestion","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/roster":{"get":{"tags":["Creators"],"summary":"Creators with followers, engagement, vetting and status","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["prospect","shortlisted","contacted","active","declined","blocked"]}},{"name":"limit","in":"query","required":true,"schema":{"default":100,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Creators"],"summary":"Add creators from your own data or a network's API export (no scraping)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"creators":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"network":{"type":"string","enum":["instagram","tiktok","youtube","x","linkedin","pinterest","threads","bluesky","twitch","other"]},"handle":{"type":"string","minLength":1,"maxLength":100},"source":{"type":"string","enum":["supplied"]},"followers":{"type":"integer","minimum":0,"maximum":9007199254740991},"avg_engagement_rate":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"audience":{"type":"object","properties":{"countries":{"maxItems":50,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"ages":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":20}},"interests":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":60}}},"additionalProperties":false},"topics":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":60}},"email":{"anyOf":[{"type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},{"type":"null"}]},"rate_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"currency":{"type":"string","minLength":3,"maxLength":3},"signals":{"type":"object","properties":{"following":{"type":"integer","minimum":0,"maximum":9007199254740991},"follower_growth_30d_pct":{"type":"number"},"recent_captions":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":2000}}},"additionalProperties":false}},"required":["name","network","handle"],"additionalProperties":false}}},"required":["creators"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/roster/{id}/history":{"get":{"tags":["Creators"],"summary":"One creator's record: deals, messages, content, payouts, affiliate sales and what was paid","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/programs":{"get":{"tags":["Creators"],"summary":"Creator programs with their brief and budget","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Creators"],"summary":"Start a creator program with its brief and budget","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"brand_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"campaign_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"brief":{"type":"object","properties":{"goal":{"type":"string","maxLength":1000},"topics":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":60}},"countries":{"maxItems":50,"type":"array","items":{"type":"string","minLength":2,"maxLength":2}},"must_say":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":200}},"must_not":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":200}},"deliverables":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":200}},"min_followers":{"type":"integer","minimum":0,"maximum":9007199254740991},"answer_questions":{"maxItems":10,"type":"array","items":{"type":"string","minLength":10,"maxLength":200}}},"additionalProperties":false},"budget_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"currency":{"type":"string","minLength":3,"maxLength":3}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/programs/{id}/shortlist":{"post":{"tags":["Creators"],"summary":"Vet creators against the brief and rank them, with reasons","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"limit":{"type":"integer","minimum":1,"maximum":50}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/programs/{id}/answer-check":{"post":{"tags":["Creators"],"summary":"Check the program's live creator posts against its questions: readable by answer engines' crawlers, and answering each question (up to 50 posts, each once a day)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/programs/{id}/answers":{"get":{"tags":["Creators"],"summary":"Which of the program's questions have readable creator posts answering them","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/programs/{id}/citations":{"get":{"tags":["Creators"],"summary":"Which answer engines cite the program's live creator posts for its questions, from the stored answers (nothing is asked)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/programs/{id}/citations/estimate":{"post":{"tags":["Creators"],"summary":"Price a check of the program's questions on the answer engines the stored answers don't cover (nothing is asked yet)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/programs/{id}/citations/run":{"post":{"tags":["Creators"],"summary":"Run a priced check of the program's questions (a signed-in person confirms the price)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"run_id":{"type":"string","minLength":3,"maxLength":80}},"required":["run_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/programs/{id}/report":{"get":{"tags":["Creators"],"summary":"Program results per creator: fee, deliverables, engagements, orders and sales","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/deals":{"post":{"tags":["Creators"],"summary":"Propose a deal: fee within the budget, deliverables, usage rights and the disclosure clause","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"program_id":{"type":"string","maxLength":60},"creator_id":{"type":"string","maxLength":60},"fee_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"deliverables":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","maxLength":200}},"usage_rights":{"type":"object","properties":{"asset_ids":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":40}},"territories":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":10}},"expires_on":{"anyOf":[{"type":"string","format":"date","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])))$"},{"type":"null"}]},"channels":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":40}},"terms":{"type":"string","maxLength":2000}},"additionalProperties":false},"starts_on":{"anyOf":[{"type":"string","format":"date","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])))$"},{"type":"null"}]},"ends_on":{"anyOf":[{"type":"string","format":"date","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])))$"},{"type":"null"}]},"disclosure_clause":{"type":"boolean"}},"required":["program_id","creator_id","fee_minor","deliverables"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Creators"],"summary":"Deals with their fee, deliverables and status (newest first, at most 100)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["proposed","agreed","signed","delivered","closed","cancelled"]}},{"name":"program_id","in":"query","required":false,"schema":{"type":"string","maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/deals/{id}/sign":{"post":{"tags":["Creators"],"summary":"Record the signed contract (its usage rights are added to the assets with their expiry)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/messages":{"get":{"tags":["Creators"],"summary":"Messages to creators and where each stands (draft, approved, sent)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","approved","sending","sent","rejected"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/outreach-drafts":{"post":{"tags":["Creators"],"summary":"Draft outreach, a follow-up or an offer (within budget); a person approves and sends it","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"creator_id":{"type":"string","maxLength":60},"deal_id":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"kind":{"type":"string","enum":["outreach","follow_up","offer","brief"]},"subject":{"type":"string","minLength":1,"maxLength":200},"body":{"type":"string","minLength":1,"maxLength":10000},"offer_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]}},"required":["creator_id","subject","body"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/messages/{id}/approve":{"post":{"tags":["Creators"],"summary":"Approve one message (then send it from here, or from the brand mailbox)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/messages/{id}/reject":{"post":{"tags":["Creators"],"summary":"Turn a message down","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/messages/{id}/mark-sent":{"post":{"tags":["Creators"],"summary":"Record that you sent an approved message","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/messages/{id}/send":{"post":{"tags":["Creators"],"summary":"Send one approved message to its creator by email (you approve this exact message as you send it; one address, never a list)","x-required-scope":"messages:send","description":"Requires scope `messages:send`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"content_hash":{"type":"string","pattern":"^[0-9a-f]{64}$","description":"The message's content_hash as you saw it"},"to":{"type":"string","maxLength":320,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$","description":"The address you saw it going to"}},"required":["content_hash","to"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/messages/{id}/outcome":{"post":{"tags":["Creators"],"summary":"Record that the creator replied or said no: follow-ups stop (a no ends messages to them)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"outcome":{"type":"string","enum":["replied","declined"]}},"required":["outcome"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/deliverables":{"get":{"tags":["Creators"],"summary":"Creators' content and where each stands: the checks it got, approvals and results (newest first, at most 100)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"program_id","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"deal_id","in":"query","required":false,"schema":{"type":"string","maxLength":60}},{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["submitted","changes_requested","approved","live"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Creators"],"summary":"Submit a creator's content for review: disclosure and the brief are checked","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"deal_id":{"type":"string","maxLength":60},"network":{"type":"string","maxLength":40},"caption":{"type":"string","maxLength":10000},"asset_id":{"anyOf":[{"type":"string","maxLength":40},{"type":"null"}]},"url":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"paid_partnership_label":{"type":"boolean"}},"required":["deal_id","network","caption"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/deliverables/{id}/approve":{"post":{"tags":["Creators"],"summary":"Approve a deliverable (one step of your approval chain)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/sales":{"post":{"tags":["Creators"],"summary":"Import orders attributed by affiliate code (from your store or affiliate network)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sales":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"object","properties":{"code":{"type":"string","minLength":1,"maxLength":40},"order_ref":{"type":"string","minLength":1,"maxLength":200},"amount_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"currency":{"type":"string","minLength":3,"maxLength":3},"occurred_at":{"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))$"}},"required":["code","order_ref","amount_minor","currency","occurred_at"],"additionalProperties":false}}},"required":["sales"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/payouts":{"get":{"tags":["Creators"],"summary":"Payout proposals and where each stands (nothing is paid from here)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Creators"],"summary":"Propose a payout for approved work within the contract fee (a person approves; paid outside the product)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"deal_id":{"type":"string","maxLength":60},"amount_minor":{"type":"integer","minimum":1,"maximum":9007199254740991},"reason":{"type":"string","maxLength":500}},"required":["deal_id","amount_minor"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/payouts/{id}/approve":{"post":{"tags":["Creators"],"summary":"Approve a payout (you pay it outside the product)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/payouts/{id}/reject":{"post":{"tags":["Creators"],"summary":"Turn a payout down","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/payouts/{id}/mark-paid":{"post":{"tags":["Creators"],"summary":"Record that you paid an approved payout","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/deliverables/{id}":{"patch":{"tags":["Creators"],"summary":"Record that approved content went live, with its link and results","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"anyOf":[{"type":"string","maxLength":2000,"format":"uri"},{"type":"null"}]},"impressions":{"type":"integer","minimum":0,"maximum":9007199254740991},"engagements":{"type":"integer","minimum":0,"maximum":9007199254740991},"clicks":{"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/deals/{id}/negotiation":{"get":{"tags":["Creators"],"summary":"A deal's negotiation: notes, the creator's counters and the counter-offers proposed","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Creators"],"summary":"Record a negotiation note or the creator's counter (their fee and deliverables)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["note","counter"]},"body":{"type":"string","maxLength":5000},"fee_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"deliverables":{"anyOf":[{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},{"type":"null"}]}},"required":["kind"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/deals/{id}/counter-offer":{"post":{"tags":["Creators"],"summary":"Propose a counter-offer inside the program's remaining budget, as a draft a person approves and sends; anything above it or outside the brief waits for a person","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ceiling_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"strategy":{"type":"string","enum":["meet_halfway","accept"]}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/deals/{id}/terms":{"post":{"tags":["Creators"],"summary":"Settle the terms the creator accepted: fee (inside the budget) and deliverables","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"fee_minor":{"type":"integer","minimum":0,"maximum":9007199254740991},"deliverables":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"required":["fee_minor"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/discovery/youtube":{"post":{"tags":["Creators"],"summary":"Find YouTube creators by topic and the countries they're based in, with their public counts and recent engagement (read only)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"topic":{"type":"string","minLength":3,"maxLength":100},"countries":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[A-Za-z]{2}$"}},"language":{"anyOf":[{"type":"string","pattern":"^[a-z]{2}(-[A-Za-z]{2,4})?$"},{"type":"null"}]},"max":{"type":"integer","minimum":1,"maximum":25}},"required":["topic"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/discovery/instagram":{"post":{"tags":["Creators"],"summary":"Look up Instagram creators by username from your connected Instagram professional account (public counts and recent posts; read only)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"usernames":{"minItems":1,"maxItems":25,"type":"array","items":{"type":"string","minLength":1,"maxLength":31}},"channel_account_id":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]}},"required":["usernames"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/pause":{"post":{"tags":["Creators"],"summary":"Pause creator messages (none goes out while paused; send again once it's lifted) or, as an owner, lift the pause","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"paused":{"type":"boolean"}},"required":["paused"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"paused":{"type":"boolean"}},"required":["paused"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/settings":{"get":{"tags":["Creators"],"summary":"Creator settings: whether gifted creators' posts are checked on a schedule, and the handle and words they're checked for","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Creators"],"summary":"Save the brand's handle and words to look for, and turn the check of gifted creators' posts every 6 hours on or off (read only)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"gift_tracking":{"type":"boolean"},"brand_handle":{"anyOf":[{"type":"string","maxLength":31},{"type":"null"}]},"terms":{"maxItems":20,"type":"array","items":{"type":"string","minLength":3,"maxLength":60}},"channel_account_id":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/gifts/instagram-posts":{"post":{"tags":["Creators"],"summary":"Look for gifted creators' public Instagram posts that mention your brand or product since the gift shipped (tagged or not; read only)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"brand_handle":{"anyOf":[{"type":"string","maxLength":31},{"type":"null"}]},"terms":{"maxItems":20,"type":"array","items":{"type":"string","minLength":3,"maxLength":60}},"channel_account_id":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/deliverables/instagram-results":{"post":{"tags":["Creators"],"summary":"Refresh live Instagram content's public like and comment counts from the creator's recent posts (read only)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/deliverables/results-refresh":{"post":{"tags":["Creators"],"summary":"Refresh live content's public results from YouTube (Instagram and TikTok need the creator's own insights)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"deliverable_ids":{"maxItems":200,"type":"array","items":{"type":"string","maxLength":60}},"limit":{"type":"integer","minimum":1,"maximum":200}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/deals/{id}/affiliate-partner":{"post":{"tags":["Creators"],"summary":"Name the creator's partner id on your affiliate network, so its sales count for this deal","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"partner_id":{"anyOf":[{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_-]+$"},{"type":"null"}]}},"required":["partner_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/affiliate/accounts":{"get":{"tags":["Creators"],"summary":"Your connected affiliate network accounts (impact.com) to import sales from","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/affiliate/impact-partners":{"get":{"tags":["Creators"],"summary":"Your impact.com partners, programs and contracts, each partner matched to the creator whose deal names it (read only)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"channel_account_id","in":"query","required":true,"schema":{"type":"string","maxLength":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/affiliate/impact-import":{"post":{"tags":["Creators"],"summary":"Import the last 30 days of impact.com sales, matched to creators by promo code or partner id (read only)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":60},"max_pages":{"type":"integer","minimum":1,"maximum":20}},"required":["channel_account_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/gifts":{"get":{"tags":["Creators"],"summary":"Gifts and where each stands (shipping details for signed-in people only)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Creators"],"summary":"Propose a product gift for a creator (a person approves; shipped by hand)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"creator_id":{"type":"string","maxLength":60},"program_id":{"anyOf":[{"type":"string","maxLength":60},{"type":"null"}]},"product":{"type":"string","minLength":1,"maxLength":300},"quantity":{"type":"integer","minimum":1,"maximum":100},"value_minor":{"anyOf":[{"type":"integer","minimum":0,"maximum":9007199254740991},{"type":"null"}]},"currency":{"type":"string","minLength":3,"maxLength":3},"note":{"type":"string","maxLength":2000}},"required":["creator_id","product"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/gifts/{id}/approve":{"post":{"tags":["Creators"],"summary":"Approve a gift (makes the shipping form link to send the creator, shown once)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tracking":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/gifts/{id}/cancel":{"post":{"tags":["Creators"],"summary":"Cancel a gift","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tracking":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/gifts/{id}/mark-shipped":{"post":{"tags":["Creators"],"summary":"Record that you shipped a gift","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tracking":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/gifts/{id}/mark-delivered":{"post":{"tags":["Creators"],"summary":"Record that a gift arrived","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"tracking":{"anyOf":[{"type":"string","maxLength":200},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/deals/{id}/contract":{"post":{"tags":["Creators"],"summary":"Make the deal's contract document (a new version when the deal changed); it's a draft until a person sends it for signature","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Creators"],"summary":"The deal's latest contract: version, status, when it was sent and signed (the document and the signer's name for signed-in people)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/contracts/{id}/send-for-signature":{"post":{"tags":["Creators"],"summary":"Send the contract to the creator for an electronic signature: a message draft that waits for approval; its one-time link is made when the message is sent","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/programs/{id}/applications":{"post":{"tags":["Creators"],"summary":"Open a program to applications (a new link, shown once; the old one stops working) or close it","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"open":{"type":"boolean"}},"required":["open"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Creators"],"summary":"Applications to a program, newest first (contact details and notes for signed-in people)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/applications/{id}/review":{"post":{"tags":["Creators"],"summary":"Accept an application (the creator joins the shortlist) or decline it; nothing is sent to them","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"decision":{"type":"string","enum":["accept","decline"]}},"required":["decision"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/ads/queue":{"get":{"tags":["Creators"],"summary":"Creator content ready to run as partnership ads, with the creator's authorization and when the rights end","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/deliverables/{id}/ads-ready":{"post":{"tags":["Creators"],"summary":"Mark approved creator content ready for partnership ads (signed deal, paid use in the rights, the paid-partnership label), with the creator's authorization","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"authorization_ref":{"anyOf":[{"type":"string","maxLength":300},{"type":"null"}]},"authorized_until":{"anyOf":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/ads/{id}/withdraw":{"post":{"tags":["Creators"],"summary":"Take creator content out of the partnership-ad queue","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/programs/{id}/creators/{creator_id}/video-vetting/estimate":{"post":{"tags":["Creators"],"summary":"Price vetting a YouTube creator's latest videos against this program's brief (reads their uploads; runs nothing)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}},{"name":"creator_id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/programs/{id}/creators/{creator_id}/video-vetting":{"get":{"tags":["Creators"],"summary":"The last video vetting of this creator for this program, with its thumbnails","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}},{"name":"creator_id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Creators"],"summary":"Run the video vetting you were shown the price of (its estimate); findings are notes for you, never a rejection","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}},{"name":"creator_id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"estimate_hash":{"type":"string","pattern":"^[a-f0-9]{32}$"}},"required":["estimate_hash"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/roster/{id}/channel-analytics/invite":{"post":{"tags":["Creators"],"summary":"Make a link that asks a YouTube creator to share their channel's daily totals (shown once; you send it)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/roster/{id}/channel-analytics":{"get":{"tags":["Creators"],"summary":"A creator's shared channel totals by day, and where their consent stands","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/roster/{id}/channel-analytics/refresh":{"post":{"tags":["Creators"],"summary":"Read a consenting creator's channel totals for the last 28 days (at most once a day)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/roster/{id}/channel-analytics/withdraw":{"post":{"tags":["Creators"],"summary":"Stop a creator's channel sharing or invitation: what was read is deleted and the access is removed with Google","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/creators/sales/shopify/import":{"post":{"tags":["Creators"],"summary":"Import orders that used creators' discount codes from your Shopify store (read only; refunds reduce or take back a sale; once an hour)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"}},"required":["channel_account_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/overview":{"get":{"tags":["Measurement"],"summary":"Key results across channels for a period against the one before, with open data alerts and how fresh each source is","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":true,"schema":{"default":28,"type":"integer","minimum":1,"maximum":90}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/metrics":{"get":{"tags":["Measurement"],"summary":"Every metric with its formula: the built-in ones and your own","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Measurement"],"summary":"Define your own metric as a formula over the others (for example conversions / sessions)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,39}$"},"label":{"type":"string","minLength":1,"maxLength":80},"formula":{"type":"string","minLength":1,"maxLength":200},"unit":{"type":"string","enum":["number","money","percent","ratio"]},"description":{"type":"string","maxLength":300}},"required":["key","label","formula","unit"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/numbers":{"get":{"tags":["Measurement"],"summary":"Metrics over a period by day, week, channel, campaign or in total, with the query, the sources and any data warnings","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"metrics","in":"query","required":true,"schema":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,39}$"}}},{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"group_by","in":"query","required":true,"schema":{"default":"total","type":"string","enum":["day","week","channel","campaign","source","total"]}},{"name":"campaign_id","in":"query","required":false,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cmp_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/questions":{"post":{"tags":["Measurement"],"summary":"Ask a question in plain words; get the numbers, the query that produced them and the sources","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"question":{"type":"string","minLength":3,"maxLength":500}},"required":["question"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/model-questions":{"post":{"tags":["Measurement"],"summary":"Ask about your mix model in plain words (best return, next unit of spend, moving budget, the best split, how sure it is, what to test); answers are estimates with ranges","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"question":{"type":"string","minLength":3,"maxLength":500}},"required":["question"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/warehouse-exports":{"post":{"tags":["Measurement"],"summary":"Write attribution or a report's results to a table in your BigQuery or Snowflake warehouse (owners): aggregates only, up to 10,000 rows","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"dataset":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,127}(\\.[A-Za-z_][A-Za-z0-9_]{0,127})?$"},"table":{"type":"string","pattern":"^[A-Za-z_][A-Za-z0-9_]{0,127}$"},"what":{"type":"string","enum":["attribution","report_run"]},"attribution":{"type":"object","properties":{"model":{"type":"string","maxLength":40},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"conversion":{"default":"event","type":"string","enum":["event","deal_won"]}},"required":["model","from","to","conversion"],"additionalProperties":false},"run_id":{"type":"string","maxLength":80}},"required":["channel_account_id","dataset","table","what"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/recommendations":{"get":{"tags":["Measurement"],"summary":"Budget recommendations from your mix model (the expected change with its range), newest first","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Measurement"],"summary":"Ask the latest mix model for a budget recommendation now (filed in the app; nothing changes)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/recommendations/{id}/paid-proposals":{"post":{"tags":["Measurement"],"summary":"Send a recommendation to paid media: one budget proposal per live campaign, each waiting for its own approval there (a person, in the app)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/recommendations/{id}/dismiss":{"post":{"tags":["Measurement"],"summary":"Dismiss a recommendation","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/alerts":{"get":{"tags":["Measurement"],"summary":"Data-quality alerts, newest first: each carries every issue its check found","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["open","resolved"]}},{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/alerts/{id}/resolve":{"post":{"tags":["Measurement"],"summary":"Mark a data alert as dealt with","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/checks":{"post":{"tags":["Measurement"],"summary":"Check yesterday's data now (gaps, spikes, double counting, currency, naming and tracking tags); every issue goes in one alert","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/attribution":{"get":{"tags":["Measurement"],"summary":"Credit by channel and campaign under an attribution model, from consented journeys only, beside what each ad platform reports","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"model","in":"query","required":true,"schema":{"default":"position","type":"string","enum":["first","last","linear","time_decay","position","data_driven"]}},{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"conversion","in":"query","required":true,"schema":{"default":"event","type":"string","enum":["event","deal_won"]}},{"name":"half_life_days","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Measurement"],"summary":"Keep an attribution result (for reports and later comparison)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"model":{"default":"position","type":"string","enum":["first","last","linear","time_decay","position","data_driven"]},"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"conversion":{"default":"event","type":"string","enum":["event","deal_won"]},"half_life_days":{"type":"integer","minimum":1,"maximum":60}},"required":["model","from","to","conversion"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/attribution/export":{"get":{"tags":["Measurement"],"summary":"Attribution as a table for a spreadsheet or a warehouse (CSV: model, period, channel, campaign, credit, value)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"model","in":"query","required":true,"schema":{"default":"position","type":"string","enum":["first","last","linear","time_decay","position","data_driven"]}},{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"conversion","in":"query","required":true,"schema":{"default":"event","type":"string","enum":["event","deal_won"]}},{"name":"half_life_days","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":60}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/attribution/saved":{"get":{"tags":["Measurement"],"summary":"Attribution results kept earlier, newest first","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/holdouts":{"get":{"tags":["Measurement"],"summary":"Measured lift of each kind of automatic work and each agent against its holdout, with the uncertainty","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/channels":{"get":{"tags":["Measurement"],"summary":"Per channel, side by side: attribution, what the platform reports, the mix model and lift tests, with their ranges and where they disagree (never averaged)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":true,"schema":{"default":28,"type":"integer","minimum":7,"maximum":92}},{"name":"model","in":"query","required":false,"schema":{"type":"string","enum":["first","last","linear","time_decay","position","data_driven"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/first-model":{"get":{"tags":["Measurement"],"summary":"Where your first mix model stands: the days of spend so far, and the model with how much data it had and how uncertain it is","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/holdouts/agents":{"get":{"tags":["Measurement"],"summary":"Each agent's contribution per kind of work against its holdout, with the agent's name and the uncertainty","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"from","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/lift-tests":{"get":{"tags":["Measurement"],"summary":"Geo and time-based lift tests with their design and readout","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Measurement"],"summary":"Design a geo or on/off lift test: controls chosen, and the smallest change it can detect stated before anything changes","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"geo"},"name":{"type":"string","minLength":1,"maxLength":120},"metric":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,39}$"},"channel":{"type":"string","maxLength":40},"treatment_geos":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,20}$"}},"control_geos":{"maxItems":50,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,20}$"}},"pre_from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"pre_to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"test_days":{"type":"integer","minimum":7,"maximum":90},"alpha":{"type":"number","exclusiveMinimum":0,"exclusiveMaximum":0.5},"power":{"type":"number","exclusiveMinimum":0.5,"exclusiveMaximum":1}},"required":["kind","name","metric","treatment_geos","pre_from","pre_to","test_days"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"time"},"name":{"type":"string","minLength":1,"maxLength":120},"metric":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,39}$"},"channel":{"type":"string","maxLength":40},"on":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"array","prefixItems":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}],"items":false,"minItems":2,"maxItems":2}},"off":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"array","prefixItems":[{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}],"items":false,"minItems":2,"maxItems":2}},"history_from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"history_to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"alpha":{"type":"number","exclusiveMinimum":0,"exclusiveMaximum":0.5},"power":{"type":"number","exclusiveMinimum":0.5,"exclusiveMaximum":1}},"required":["kind","name","metric","on","off","history_from","history_to"],"additionalProperties":false}]}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/lift-tests/{id}/begin":{"post":{"tags":["Measurement"],"summary":"Record that a lift test has begun (the spend change itself is approved in paid media)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["from"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/lift-tests/{id}/readout":{"post":{"tags":["Measurement"],"summary":"Read a lift test: the lift with its interval and a plain verdict (before its planned end, an interim look); the test's spend is entered by a person","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"spend":{"type":"number","minimum":0,"maximum":1000000000}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/models":{"get":{"tags":["Measurement"],"summary":"Marketing-mix models fitted for your organization, newest first","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Measurement"],"summary":"Fit a marketing-mix model from your spend and results (calibrated by lift tests that were read)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"outcome":{"default":"conversions","type":"string","pattern":"^[a-z][a-z0-9_]{1,39}$"}},"required":["from","to","outcome"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/models/{id}/scenario":{"post":{"tags":["Measurement"],"summary":"Split a daily budget across channels by the model's response curves (a scenario: nothing changes)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"daily_budget":{"type":"number","exclusiveMinimum":0,"maximum":1000000000},"min":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"number","minimum":0}},"max":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"number","minimum":0}}},"required":["daily_budget"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/reports":{"get":{"tags":["Measurement"],"summary":"Saved reports and dashboards","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Measurement"],"summary":"Save a report: metrics, grouping, period and an optional weekly or monthly schedule","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"metrics":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{1,39}$"}},"group_by":{"type":"string","enum":["day","week","channel","campaign","source"]},"period_days":{"type":"integer","minimum":1,"maximum":366},"schedule":{"anyOf":[{"type":"string","enum":["weekly","monthly"]},{"type":"null"}]},"notify":{"type":"boolean"}},"required":["name","metrics","group_by","period_days"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/reports/{id}/refresh":{"post":{"tags":["Measurement"],"summary":"Produce a report now (kept with its numbers, query and sources; at most 20 a report a day)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/reports/{id}/runs":{"get":{"tags":["Measurement"],"summary":"A report's earlier runs, newest first (at most 50)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/report-runs/{id}":{"get":{"tags":["Measurement"],"summary":"One report run with its numbers, as CSV for a spreadsheet or a warehouse, or as slides (PowerPoint)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}},{"name":"format","in":"query","required":true,"schema":{"default":"json","type":"string","enum":["json","csv","pptx"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/offline-imports":{"post":{"tags":["Measurement"],"summary":"Import offline spend and results (TV, mail, events) from a file's rows; filed only, nothing acts on it","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"rows":{"minItems":1,"maxItems":5000,"type":"array","items":{"type":"object","properties":{"day":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"channel":{"type":"string","minLength":1,"maxLength":40},"metric":{"type":"string","enum":["spend","impressions","conversions","conversion_value"]},"value":{"type":"number","minimum":0},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"geo":{"type":"string","maxLength":20}},"required":["day","channel","metric","value"],"additionalProperties":false}}},"required":["rows"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/readers/{id}/refresh":{"post":{"tags":["Measurement"],"summary":"Read a connected analytics account's daily event counts, or a data source's daily figures, now (filed only)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/benchmarks":{"get":{"tags":["Measurement"],"summary":"Benchmarks of agent-managed campaigns against campaigns left to the ad platform's own automation, newest first","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Measurement"],"summary":"Set a benchmark (a person): campaigns split at random, or as you choose, into ones held to the platform's own automation until the end date and ones the agents keep managing. Held campaigns take no agent or rule change; your own changes, pauses and cuts still go","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"metric":{"type":"string","enum":["roas","cpa"]},"campaign_ids":{"minItems":6,"maxItems":200,"type":"array","items":{"type":"string","minLength":3,"maxLength":80}},"held_ids":{"maxItems":200,"type":"array","items":{"type":"string","minLength":3,"maxLength":80}},"starts_on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"ends_on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["name","campaign_ids","starts_on","ends_on"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/benchmarks/{id}":{"get":{"tags":["Measurement"],"summary":"A benchmark with its readout so far: the difference with its 95% interval, or why it is too small to say","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/benchmarks/{id}/end":{"post":{"tags":["Measurement"],"summary":"End a benchmark now (a person): the holds lift at once and the readout is kept","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/value-model":{"get":{"tags":["Measurement"],"summary":"The predicted-value model from your order history: how it predicts, its back-test, and whether paid media sends it","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Measurement"],"summary":"Fit the predicted-value model from your order history now, with its back-test (a person; once a day; filed only, nothing is sent)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/value-model/use":{"put":{"tags":["Measurement"],"summary":"Turn the predicted value on or off for paid media's conversion uploads (owners; only with a usable model; only for people who agreed to personalized ads)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"on":{"type":"boolean"}},"required":["on"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/voice":{"get":{"tags":["Measurement"],"summary":"Voice-of-customer syntheses: themes with their sentiment and example quotes (names and addresses removed), newest first","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Measurement"],"summary":"Synthesize what customers say in reviews, inbox messages and survey answers into themes (confirm the estimate's credits; at most 4 a day)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"sources":{"maxItems":4,"type":"array","items":{"type":"string","enum":["review","message","comment","survey"]}},"confirm":{"type":"boolean"},"max_credits":{"type":"number","minimum":0,"maximum":1000}},"required":["from","to","confirm","max_credits"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/voice/estimate":{"post":{"tags":["Measurement"],"summary":"What a voice-of-customer synthesis would read and cost, before it runs","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"from":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"to":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"sources":{"maxItems":4,"type":"array","items":{"type":"string","enum":["review","message","comment","survey"]}}},"required":["from","to"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/readers/{id}/options":{"put":{"tags":["Measurement"],"summary":"Choose an analytics account's activation event, the event Mixpanel cohorts start with, the Amplitude charts to read, or PostHog's cloud","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"activation_event":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"birth_event":{"anyOf":[{"type":"string","minLength":1,"maxLength":120},{"type":"null"}]},"chart_ids":{"maxItems":10,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9]{3,20}$"}},"region":{"type":"string","enum":["us","eu"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/readers/{id}/cohorts":{"post":{"tags":["Measurement"],"summary":"Read an analytics account's new people by week, their activation and how many came back, now (aggregates only, filed only)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/readers/{id}/retention":{"get":{"tags":["Measurement"],"summary":"Activation and retention by cohort week, as read from an analytics account (groups below the minimum size aren't shown)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/settings":{"get":{"tags":["Measurement"],"summary":"Measurement settings: reporting currency and rates, minimum group size, holdouts, attribution window, naming rules, report notices","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Measurement"],"summary":"Change measurement settings (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"min_group_size":{"type":"integer","minimum":5,"maximum":1000},"holdout_pct":{"type":"object","propertyNames":{"type":"string","pattern":"^[a-z_]{1,40}$"},"additionalProperties":{"type":"number","minimum":0,"maximum":50}},"lookback_days":{"type":"integer","minimum":1,"maximum":90},"conversion_event":{"type":"string","pattern":"^[a-z][a-z0-9_.]{0,79}$"},"view_through_weight":{"type":"number","minimum":0,"maximum":1},"naming_pattern":{"anyOf":[{"type":"string","maxLength":120},{"type":"null"}]},"allowed_utm_sources":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^[a-z0-9_.-]{1,40}$"}},"report_notices":{"type":"boolean"},"order_event":{"type":"string","pattern":"^[a-z][a-z0-9_.]{0,79}$"},"value_horizon_days":{"anyOf":[{"type":"number","const":90},{"type":"number","const":180},{"type":"number","const":365}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/measure/fx-rates/{currency}":{"put":{"tags":["Measurement"],"summary":"Set a currency's rate into your reporting currency (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[{"name":"currency","in":"path","required":true,"schema":{"type":"string","pattern":"^[A-Z]{3}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"rate":{"type":"number","exclusiveMinimum":0,"maximum":1000000}},"required":["rate"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/tests":{"get":{"tags":["Experiments"],"summary":"Tests, newest first, with the program's win rate, running count, overlapping tests and tests without visitors","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["draft","running","stopped","completed"]}},{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Experiments"],"summary":"Draft a test: variants (the first is the original), the goal, guardrails and an optional sample-size plan","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"hypothesis":{"type":"string","maxLength":1000},"kind":{"type":"string","enum":["ab","multivariate","bandit"]},"surface":{"type":"string","enum":["page","message"]},"site":{"type":"string","maxLength":253},"path_pattern":{"type":"string","pattern":"^\\/[A-Za-z0-9/_\\-.*]{0,200}$"},"message_ref":{"type":"string","maxLength":120},"variants":{"minItems":2,"maxItems":8,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_]{1,20}$"},"name":{"type":"string","minLength":1,"maxLength":80},"weight":{"type":"number","exclusiveMinimum":0,"maximum":100},"changes":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"selector":{"type":"string","minLength":1,"maxLength":200},"text":{"type":"string","maxLength":2000},"attr":{"type":"string","enum":["href","src","alt","title","placeholder"]},"value":{"type":"string","maxLength":2000}},"required":["selector"],"additionalProperties":false}},"message":{"type":"object","properties":{"subject":{"type":"string","maxLength":200},"preview":{"type":"string","maxLength":200}},"additionalProperties":false}},"required":["key","name","weight","changes"],"additionalProperties":false}},"primary_goal":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_]{1,30}$"},"label":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["pageview","click","event"]},"path":{"type":"string","maxLength":200},"selector":{"type":"string","maxLength":200},"event":{"type":"string","pattern":"^[a-z][a-z0-9_.:-]{0,79}$"}},"required":["key","label","kind"],"additionalProperties":false},"guardrails":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_]{1,30}$"},"label":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["pageview","click","event"]},"path":{"type":"string","maxLength":200},"selector":{"type":"string","maxLength":200},"event":{"type":"string","pattern":"^[a-z][a-z0-9_.:-]{0,79}$"},"bad":{"type":"string","enum":["increase","decrease"]},"max_harm_pct":{"type":"number","minimum":0,"maximum":100}},"required":["key","label","kind","bad","max_harm_pct"],"additionalProperties":false}},"traffic_pct":{"type":"integer","minimum":1,"maximum":100},"content_piece_id":{"type":"string","maxLength":60},"contexts":{"maxItems":5,"type":"array","items":{"type":"string","minLength":3,"maxLength":60}},"plan":{"type":"object","properties":{"baseline":{"type":"number","exclusiveMinimum":0,"exclusiveMaximum":1},"mde":{"type":"number","exclusiveMinimum":0,"maximum":5},"daily_units":{"anyOf":[{"type":"integer","minimum":1,"maximum":100000000},{"type":"null"}]}},"required":["baseline","mde"],"additionalProperties":false}},"required":["name","variants","primary_goal"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/plan":{"post":{"tags":["Experiments"],"summary":"How many visitors and days a test needs to detect a lift, from the baseline rate and daily traffic","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"baseline":{"type":"number","exclusiveMinimum":0,"exclusiveMaximum":1},"mde":{"type":"number","exclusiveMinimum":0,"maximum":5},"variants":{"type":"integer","minimum":2,"maximum":8},"daily_units":{"anyOf":[{"type":"integer","minimum":1,"maximum":100000000},{"type":"null"}]},"traffic_pct":{"type":"integer","minimum":1,"maximum":100},"alpha":{"type":"number","exclusiveMinimum":0,"exclusiveMaximum":0.5},"power":{"type":"number","exclusiveMinimum":0.5,"exclusiveMaximum":1}},"required":["baseline","mde","variants"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/ideas":{"get":{"tags":["Experiments"],"summary":"Test ideas with the numbers behind each: busy pages that convert poorly, pages losing search clicks, winners to try elsewhere","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","minimum":7,"maximum":90}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/proposals":{"get":{"tags":["Experiments"],"summary":"Proposals to try a finished test's winner on another channel (web, email, push), with what the test measured","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/proposals/drafts":{"post":{"tags":["Experiments"],"summary":"Draft a test from a proposal (an email subject test or a page test); a person starts it","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"experiment_id":{"type":"string","minLength":3,"maxLength":80},"to":{"type":"string","enum":["page","email"]},"template_id":{"type":"string","maxLength":80},"site":{"type":"string","maxLength":253},"path_pattern":{"type":"string","pattern":"^\\/[A-Za-z0-9/_\\-.*]{0,200}$"},"selector":{"type":"string","maxLength":200},"goal_event":{"type":"string","pattern":"^[a-z][a-z0-9_.:-]{0,59}$"},"goal_path":{"type":"string","pattern":"^\\/[A-Za-z0-9/_\\-.*]{0,200}$"}},"required":["experiment_id","to"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/outside":{"get":{"tags":["Experiments"],"summary":"Tests from your connected experimentation tool, most recently changed first (at most 100): what the tool reported and our own check of it","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/outside/accounts/{id}/refresh":{"post":{"tags":["Experiments"],"summary":"Read a connected experimentation tool's tests and results now (read only; filed, nothing acts on it)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/copy-plans":{"get":{"tags":["Experiments"],"summary":"Copy experiment plans handed over from content, newest first: waiting for setup, or the draft test each became","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/copy-plans/{id}":{"get":{"tags":["Experiments"],"summary":"A copy experiment plan: its versions, hypotheses, people needed per version, and the test it became","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/copy-plans/{id}/setup":{"post":{"tags":["Experiments"],"summary":"Choose where a copy plan runs (a person): a page and the element each version replaces, or an email template; it becomes a draft test you start","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"site":{"type":"string","minLength":1,"maxLength":253},"path_pattern":{"type":"string","pattern":"^\\/[A-Za-z0-9/_\\-.*]{0,200}$"},"selector":{"type":"string","minLength":1,"maxLength":200},"goal_path":{"type":"string","pattern":"^\\/[A-Za-z0-9/_\\-.*]{0,200}$"},"goal_selector":{"type":"string","minLength":1,"maxLength":200},"template_id":{"type":"string","minLength":3,"maxLength":80},"goal_event":{"type":"string","pattern":"^[a-z][a-z0-9_.:-]{0,59}$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/outside/accounts/{id}/product":{"put":{"tags":["Experiments"],"summary":"Say which Optimizely product an account is: Web Experimentation (pages) or Feature Experimentation (flags and their A/B rules)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"product":{"type":"string","enum":["web","feature_experimentation"]}},"required":["product"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/{id}/begin":{"post":{"tags":["Experiments"],"summary":"Start showing a drafted test on your site (checked against overlapping tests and your policies)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/{id}/stop":{"post":{"tags":["Experiments"],"summary":"Stop a test now: everyone sees the original again (no approval of its own)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/{id}/winner":{"post":{"tags":["Experiments"],"summary":"Show a variant to everyone as the winner (a person's approval; checked by your policies; refused if it harmed a guardrail)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"variant":{"type":"string","pattern":"^[a-z0-9_]{1,20}$"}},"required":["variant"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/{id}/winner/decline":{"post":{"tags":["Experiments"],"summary":"Turn down a proposed winner (the test keeps its current state)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/{id}/winner/withdraw":{"post":{"tags":["Experiments"],"summary":"Withdraw an applied winner: everyone sees the original page again (never waits for approval)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reason":{"type":"string","minLength":1,"maxLength":500}},"required":["reason"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/personalization":{"get":{"tags":["Experiments"],"summary":"Personalization rules (by source, campaign, landing page or search keyword) and their status","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":400}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Experiments"],"summary":"Draft a personalization rule: what a page says to visitors from a source, campaign or search keyword","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"site":{"type":"string","maxLength":253},"path_pattern":{"type":"string","pattern":"^\\/[A-Za-z0-9/_\\-.*]{0,200}$"},"banner":{"type":"string","minLength":1,"maxLength":300},"match":{"type":"object","properties":{"utm_source":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":60}},"utm_campaign":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":120}},"keyword_param":{"type":"string","maxLength":30},"landing_path":{"type":"string","maxLength":200},"keywords":{"maxItems":200,"type":"array","items":{"type":"string","minLength":1,"maxLength":60}},"segment_ids":{"maxItems":10,"type":"array","items":{"type":"string","minLength":3,"maxLength":60}},"account_signal":{"type":"object","properties":{"kind":{"type":"string","pattern":"^[a-z][a-z0-9_.]{0,39}$"},"topic":{"type":"string","maxLength":120},"days":{"type":"integer","minimum":1,"maximum":90}},"required":["kind"],"additionalProperties":false}},"additionalProperties":false},"changes":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"selector":{"type":"string","minLength":1,"maxLength":200},"text":{"type":"string","maxLength":2000},"attr":{"type":"string","enum":["href","src","alt","title","placeholder"]},"value":{"type":"string","maxLength":2000},"template":{"type":"string","maxLength":300}},"required":["selector"],"additionalProperties":false}},"priority":{"type":"integer","minimum":1,"maximum":1000}},"required":["name","match"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/personalization/{id}/publish":{"post":{"tags":["Experiments"],"summary":"Show a personalization rule on your site (a person's approval; checked by your policies)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/personalization/{id}/off":{"post":{"tags":["Experiments"],"summary":"Turn a personalization rule off (never waits for approval)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/settings":{"get":{"tags":["Experiments"],"summary":"Experiment settings: the automatic stop on a harmed guardrail, tests at once, confidence and how long visitor data is kept","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Experiments"],"summary":"Change experiment settings (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"auto_stop_on_guardrail":{"type":"boolean"},"max_running":{"type":"integer","minimum":1,"maximum":100},"alpha":{"type":"number","minimum":0.01,"maximum":0.2},"unit_retention_days":{"type":"integer","minimum":1,"maximum":365}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/landing-tests":{"post":{"tags":["Experiments"],"summary":"Test landing page variants: each is a content piece (your text or generated from the brief) a person approves before the test can start","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"piece_id":{"type":"string","minLength":3,"maxLength":60},"site":{"type":"string","minLength":1,"maxLength":253},"path_pattern":{"type":"string","pattern":"^\\/[A-Za-z0-9/_\\-.*]{0,200}$"},"product":{"type":"object","properties":{"channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"product_id":{"type":"string","maxLength":60}},"required":["channel_account_id","product_id"],"additionalProperties":false},"selectors":{"type":"object","properties":{"headline":{"type":"string","pattern":"^[A-Za-z0-9 #.\\-_[\\]=\"':>,()]{1,200}$"},"subhead":{"type":"string","pattern":"^[A-Za-z0-9 #.\\-_[\\]=\"':>,()]{1,200}$"},"cta":{"type":"string","pattern":"^[A-Za-z0-9 #.\\-_[\\]=\"':>,()]{1,200}$"}},"required":["headline"],"additionalProperties":false},"variants":{"minItems":1,"maxItems":4,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_]{1,20}$"},"name":{"type":"string","minLength":1,"maxLength":80},"angle":{"type":"string","enum":["benefit","urgency","curiosity","proof","simplicity"]},"instructions":{"type":"string","maxLength":1000},"text":{"type":"string","minLength":1,"maxLength":20000}},"required":["key","name"],"additionalProperties":false}},"primary_goal":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_]{1,30}$"},"label":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["pageview","click"]},"path":{"type":"string","maxLength":200},"selector":{"type":"string","maxLength":200}},"required":["key","label","kind"],"additionalProperties":false},"guardrails":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_]{1,30}$"},"label":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["pageview","click"]},"path":{"type":"string","maxLength":200},"selector":{"type":"string","maxLength":200},"bad":{"type":"string","enum":["increase","decrease"]},"max_harm_pct":{"type":"number","minimum":0,"maximum":100}},"required":["key","label","kind","bad","max_harm_pct"],"additionalProperties":false}},"traffic_pct":{"type":"integer","minimum":1,"maximum":100}},"required":["name","piece_id","site","selectors","variants","primary_goal"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Experiments"],"summary":"Landing page tests, newest first (at most 50)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/landing-tests/products":{"get":{"tags":["Experiments"],"summary":"Your connected Shopify stores and their products (up to 50, by title), for a product page test","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":100}},{"name":"store","in":"query","required":false,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/landing-tests/{id}":{"get":{"tags":["Experiments"],"summary":"A landing page test's variants: their pieces, approval, CMS drafts and what happens to each after the test","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/landing-tests/{id}/begin":{"post":{"tags":["Experiments"],"summary":"Start a landing page test once every variant is approved: CMS drafts made (never published), then the test starts through your policies","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","maxLength":60},"state":{"type":"string","pattern":"^[0-9a-f]{16}$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/landing-tests/{id}/product-copy":{"post":{"tags":["Experiments"],"summary":"Apply a product page test's winner to the Shopify product: its approved title, description or both (read first, checked after, once)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"boolean"},"description":{"type":"boolean"},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["title","description"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/{id}/skill":{"get":{"tags":["Experiments"],"summary":"A skill (SKILL.md, or a .zip skill bundle) a coding agent follows to build this test's variants into your site's code as a feature flag read from the tag","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}},{"name":"format","in":"query","required":true,"schema":{"default":"md","type":"string","enum":["md","zip"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/{id}/code-flag":{"post":{"tags":["Experiments"],"summary":"Add a code flag to a draft page test (a person): each variant also writes its key into a hidden flag element your site's code can read","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/experiments/{id}":{"get":{"tags":["Experiments"],"summary":"A test with its results (intervals, always-valid p-values, guardrails), its winner and its log","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Experiments"],"summary":"Change a draft test's name, hypothesis, variants, goal or guardrails (a person; fixed once it starts)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"hypothesis":{"type":"string","maxLength":1000},"variants":{"minItems":2,"maxItems":8,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_]{1,20}$"},"name":{"type":"string","minLength":1,"maxLength":80},"weight":{"type":"number","exclusiveMinimum":0,"maximum":100},"changes":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"selector":{"type":"string","minLength":1,"maxLength":200},"text":{"type":"string","maxLength":2000},"attr":{"type":"string","enum":["href","src","alt","title","placeholder"]},"value":{"type":"string","maxLength":2000}},"required":["selector"],"additionalProperties":false}},"message":{"type":"object","properties":{"subject":{"type":"string","maxLength":200},"preview":{"type":"string","maxLength":200}},"additionalProperties":false}},"required":["key","name","weight","changes"],"additionalProperties":false}},"primary_goal":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_]{1,30}$"},"label":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["pageview","click","event"]},"path":{"type":"string","maxLength":200},"selector":{"type":"string","maxLength":200},"event":{"type":"string","pattern":"^[a-z][a-z0-9_.:-]{0,79}$"}},"required":["key","label","kind"],"additionalProperties":false},"guardrails":{"maxItems":5,"type":"array","items":{"type":"object","properties":{"key":{"type":"string","pattern":"^[a-z0-9_]{1,30}$"},"label":{"type":"string","minLength":1,"maxLength":80},"kind":{"type":"string","enum":["pageview","click","event"]},"path":{"type":"string","maxLength":200},"selector":{"type":"string","maxLength":200},"event":{"type":"string","pattern":"^[a-z][a-z0-9_.:-]{0,79}$"},"bad":{"type":"string","enum":["increase","decrease"]},"max_harm_pct":{"type":"number","minimum":0,"maximum":100}},"required":["key","label","kind","bad","max_harm_pct"],"additionalProperties":false}},"traffic_pct":{"type":"integer","minimum":1,"maximum":100}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/surveys/{id}/sends/estimate":{"post":{"tags":["Research"],"summary":"How many of your people a survey send would ask (only those with a yes to marketing on the channel, each once per survey), and the limits","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"audience":{"type":"object","properties":{"consented":{"type":"boolean","const":true}},"required":["consented"],"additionalProperties":false}},"required":["channel","audience"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/surveys/{id}/sends":{"post":{"tags":["Research"],"summary":"Send a survey to your consented people through your sending channel with an approved marketing template that has {{vars.survey_link}} (a person in the web app, with the count they saw and confirm: true; 20 to 100 people a send)","x-required-scope":"messages:send","description":"Requires scope `messages:send`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel":{"type":"string","enum":["email","sms"]},"template_id":{"type":"string","minLength":3,"maxLength":120},"audience":{"type":"object","properties":{"consented":{"type":"boolean","const":true}},"required":["consented"],"additionalProperties":false},"acknowledged":{"type":"integer","minimum":1,"maximum":1000},"confirm":{"type":"boolean"}},"required":["channel","template_id","audience","acknowledged","confirm"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Research"],"summary":"A survey's sends: how many were asked, queued and refused, and how many answered (never who)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/respond/{token}":{"get":{"tags":["Research"],"summary":"An older survey link: sends the person to the survey form","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","minLength":40,"maxLength":200}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Research"],"summary":"File the answers from a survey form, once per link, without a link back to who gave them","security":[],"parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","minLength":40,"maxLength":200}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/settings":{"get":{"tags":["Research"],"summary":"Research settings: whether synthetic answers may be made (off until an owner turns them on)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Research"],"summary":"Turn synthetic answers on or off for your organization (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"synthetic_enabled":{"type":"boolean"}},"required":["synthetic_enabled"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/surveys":{"get":{"tags":["Research"],"summary":"Surveys, newest first, with how many answers each has","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Research"],"summary":"Design a survey: up to 30 questions (single or multiple choice, a 1–5 or 0–10 scale, free text). Answers arrive by file import","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"questions":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":32},"text":{"type":"string","minLength":1,"maxLength":500},"type":{"type":"string","enum":["single","multiple","scale","text"]},"options":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"scale":{"type":"object","properties":{"min":{"anyOf":[{"type":"number","const":0},{"type":"number","const":1}]},"max":{"anyOf":[{"type":"number","const":5},{"type":"number","const":10}]}},"required":["min","max"],"additionalProperties":false}},"required":["text","type"],"additionalProperties":false}}},"required":["title","questions"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/surveys/templates":{"post":{"tags":["Research"],"summary":"Make a concept, message, price or brand-tracking survey (its questions from the concepts, messages, price points or other brands you give). Real answers arrive from sending it or by file import; a synthetic panel is compared with them","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["concept","message","price","brand"]},"title":{"type":"string","minLength":1,"maxLength":200},"subject":{"type":"string","minLength":1,"maxLength":200},"items":{"minItems":2,"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}}},"required":["kind","subject","items"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/surveys/{id}":{"get":{"tags":["Research"],"summary":"One survey: its questions, answer count and the files imported for it","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Research"],"summary":"Rename a survey, close it, or change its questions (only until answers are imported)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"questions":{"minItems":1,"maxItems":30,"type":"array","items":{"type":"object","properties":{"id":{"type":"string","minLength":1,"maxLength":32},"text":{"type":"string","minLength":1,"maxLength":500},"type":{"type":"string","enum":["single","multiple","scale","text"]},"options":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"scale":{"type":"object","properties":{"min":{"anyOf":[{"type":"number","const":0},{"type":"number","const":1}]},"max":{"anyOf":[{"type":"number","const":5},{"type":"number","const":10}]}},"required":["min","max"],"additionalProperties":false}},"required":["text","type"],"additionalProperties":false}},"status":{"type":"string","enum":["draft","closed"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/surveys/{id}/import":{"post":{"tags":["Research"],"summary":"Import a CSV of answers (up to 5,000 rows): columns named by question id or exact text; identifier columns are dropped unread","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"csv":{"type":"string","minLength":1,"maxLength":1900000}},"required":["csv"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/surveys/{id}/results":{"get":{"tags":["Research"],"summary":"A survey's results per question: counts, distributions, means and free-text themes; groups under 5 answers aren't broken out","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/surveys/{id}/synthesis/estimate":{"post":{"tags":["Research"],"summary":"What a survey synthesis will cost in credits before it's made, and whether it fits under the monthly limit","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/surveys/{id}/synthesis":{"post":{"tags":["Research"],"summary":"Summarize a survey's answers; every claim cites the question and the number of responses it rests on","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"confirm":{"type":"boolean","const":true}},"required":["confirm"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Research"],"summary":"A survey's latest synthesis, each claim with its question and response count or marked unverified","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/surveys/{id}/synthetic-panels/estimate":{"post":{"tags":["Research"],"summary":"What synthetic answers to a survey would cost, and whether they can be made (owners turn them on; the model must be on)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"size":{"default":50,"type":"integer","minimum":1,"maximum":100},"audience":{"default":"","type":"string","maxLength":1000},"persona":{"type":"string","minLength":3,"maxLength":200}},"required":["size","audience"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/surveys/{id}/synthetic-panels":{"post":{"tags":["Research"],"summary":"Make synthetic answers to a survey's choice and scale questions (labelled synthetic; validated against your real answers)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"size":{"default":50,"type":"integer","minimum":1,"maximum":100},"audience":{"default":"","type":"string","maxLength":1000},"persona":{"type":"string","minLength":3,"maxLength":200},"confirm":{"type":"boolean","const":true}},"required":["size","audience","confirm"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Research"],"summary":"A survey's synthetic panels with their latest validation (labelled synthetic)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/synthetic-panels/{id}":{"get":{"tags":["Research"],"summary":"One synthetic panel with its latest validation; results only for questions validated against at least 30 real answers","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/synthetic-panels/{id}/validate":{"post":{"tags":["Research"],"summary":"Compare a synthetic panel with the real answers to the same survey again: the error per question and an agreement score","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/trends":{"get":{"tags":["Research"],"summary":"Rising and falling search queries, search and site metrics, and social topics over two windows, each with its source","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":true,"schema":{"default":28,"type":"integer","minimum":7,"maximum":90}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/conversations":{"get":{"tags":["Research"],"summary":"What reviews, comments, mentions and messages say: themes, sentiment and ratings as counts only, groups under 5 left out","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":true,"schema":{"default":90,"type":"integer","minimum":7,"maximum":365}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["comment","mention","message","review","thread"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/personas/audiences":{"get":{"tags":["Research"],"summary":"Persona audiences from your own customer groups (each at least 5 people) for synthetic panels; groups only, never a person","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/surveys/{id}/tracking":{"get":{"tags":["Research"],"summary":"A survey's answers week by week (brand tracking): shares and means per wave; a week with fewer than 5 answers is read with the next, and answers fewer than 5 people gave are left out","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/simulations/estimate":{"post":{"tags":["Research"],"summary":"What a simulation of a message's response would cost (one credit an audience group), and whether it can run","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"audience":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/simulations":{"post":{"tags":["Research"],"summary":"Simulate how your audience groups would respond to a message (labelled synthetic; compared with your posts' real median engagement). Give the credits the estimate showed; a run never costs more","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"message":{"type":"string","minLength":10,"maxLength":2000},"channel":{"type":"string","enum":["social","email","ad"]},"audience":{"anyOf":[{"type":"string","maxLength":1000},{"type":"null"}]},"confirm":{"type":"boolean","const":true},"max_credits":{"type":"integer","minimum":0,"maximum":1000}},"required":["message","channel","confirm","max_credits"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Research"],"summary":"Recent simulations (labelled synthetic)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/simulations/{id}":{"get":{"tags":["Research"],"summary":"One simulation (labelled synthetic)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/competitors":{"get":{"tags":["Research"],"summary":"Competitors you watch, with their tracked pages, when each was last read, and how often AI answers name them","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Research"],"summary":"Watch a competitor: its domain and up to 10 public pages (its home page when none are given)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"domain":{"type":"string","minLength":3,"maxLength":253},"notes":{"type":"string","maxLength":2000},"pages":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"kind":{"type":"string","enum":["home","pricing","product","features","blog","changelog","careers","other"]}},"required":["url"],"additionalProperties":false}}},"required":["name","domain"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/competitors/{id}":{"patch":{"tags":["Research"],"summary":"Rename a competitor, change its notes, or archive it (its pages stop being read)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"notes":{"type":"string","maxLength":2000},"status":{"type":"string","enum":["active","archived"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/competitors/{id}/searchable":{"post":{"tags":["Research"],"summary":"Let the assistant search for this competitor: its name and site, on the web (a person's choice)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"searchable":{"type":"boolean"},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["searchable","name"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/competitors/{id}/pages":{"post":{"tags":["Research"],"summary":"Track another public page of a competitor (on its own domain)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"kind":{"type":"string","enum":["home","pricing","product","features","blog","changelog","careers","other"]}},"required":["url"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/pages/{id}":{"delete":{"tags":["Research"],"summary":"Stop tracking a page (its stored snapshots go with it)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/competitors/check":{"post":{"tags":["Research"],"summary":"Read the tracked pages now (up to 20, least recently read first, robots.txt respected) and file what changed","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"competitor_id":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^rs_cmp_.*"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/changes":{"get":{"tags":["Research"],"summary":"What changed on competitors' tracked pages, newest first","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"competitor_id","in":"query","required":false,"schema":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^rs_cmp_.*"}},{"name":"limit","in":"query","required":true,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/briefs/estimate":{"post":{"tags":["Research"],"summary":"What a research brief will cost in credits before it's made, and whether it fits under the monthly limit","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"competitor_ids":{"maxItems":25,"type":"array","items":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^rs_cmp_.*"}},"include_win_loss":{"type":"boolean"},"brand_id":{"type":"string","minLength":3,"maxLength":80}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/briefs":{"post":{"tags":["Research"],"summary":"Make a research brief from the stored competitor pages, recent changes and deal outcomes; every claim carries its sources","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"question":{"type":"string","maxLength":2000},"kind":{"type":"string","enum":["market","competitor","win_loss","audience"]},"competitor_ids":{"maxItems":25,"type":"array","items":{"type":"string","maxLength":60,"format":"starts_with","pattern":"^rs_cmp_.*"}},"include_win_loss":{"type":"boolean"},"notes":{"maxItems":20,"type":"array","items":{"type":"string","minLength":1,"maxLength":600}},"source_urls":{"maxItems":8,"type":"array","items":{"type":"string","maxLength":2000,"format":"uri"}},"brand_id":{"type":"string","minLength":3,"maxLength":80},"confirm":{"type":"boolean","const":true}},"required":["title","confirm"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Research"],"summary":"Research briefs, newest first, with how many claims each has and how many are unverified","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":30,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/briefs/{id}":{"get":{"tags":["Research"],"summary":"One research brief: its summary and claims, each with its sources or marked unverified","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/win-loss":{"get":{"tags":["Research"],"summary":"Closed deals from the sales product by outcome and stage, with amounts per currency (no people's details)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":true,"schema":{"default":180,"type":"integer","minimum":7,"maximum":730}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/research/personas":{"get":{"tags":["Research"],"summary":"Persona panel from your own audience: countries, languages and profile attributes, groups under 5 people left out","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ws_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/plan":{"get":{"tags":["Plans and credits"],"summary":"The plans (prices, allowances, modules, autonomy), credit prices and the organization's current plan","x-required-scope":"billing:read","description":"Requires scope `billing:read`.","security":[{"apiKey":[]},{"oauth2":["billing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/plan/limits":{"get":{"tags":["Plans and credits"],"summary":"The plan's limits beyond credits (brands, connected accounts, people) and how many are in use; nothing is ever charged at a limit","x-required-scope":"billing:read","description":"Requires scope `billing:read`.","security":[{"apiKey":[]},{"oauth2":["billing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/plan/current":{"put":{"tags":["Plans and credits"],"summary":"Choose the organization's plan (owners). Paid plans open when paid sign-ups do; until then only Free can be chosen and nothing is charged","x-required-scope":"billing:write","description":"Requires scope `billing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"plan":{"type":"string","enum":["free","starter","growth","agency","enterprise"]}},"required":["plan"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/usage":{"get":{"tags":["Plans and credits"],"summary":"This month's credits used by module against the monthly cap, the 50/80/100 percent alerts and what happens at the cap","x-required-scope":"billing:read","description":"Requires scope `billing:read`.","security":[{"apiKey":[]},{"oauth2":["billing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/usage/top-ups":{"post":{"tags":["Plans and credits"],"summary":"Buy more credits (1000 for $10; owners). Refused while paid sign-ups are off; nothing is charged","x-required-scope":"billing:write","description":"Requires scope `billing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"packs":{"type":"integer","minimum":1,"maximum":100}},"required":["packs"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/plan/outcomes":{"get":{"tags":["Plans and credits"],"summary":"Outcome-priced options, which this organization turned on, and this month's outcomes priced at the catalog's rates (a statement: nothing is charged)","x-required-scope":"billing:read","description":"Requires scope `billing:read`.","security":[{"apiKey":[]},{"oauth2":["billing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/plan/outcomes/{id}":{"put":{"tags":["Plans and credits"],"summary":"Turn an outcome-priced option on or off (owners; counted from now on, never before)","x-required-scope":"billing:write","description":"Requires scope `billing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","enum":["creator_deal","resolved_conversation"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/plan/trial":{"get":{"tags":["Plans and credits"],"summary":"This organization's trial of a paid plan (if any) and whether trials are open","x-required-scope":"billing:read","description":"Requires scope `billing:read`.","security":[{"apiKey":[]},{"oauth2":["billing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Plans and credits"],"summary":"Start the organization's one 14-day trial of Starter or Growth (owners on Free; no card; back to Free when it ends; nothing is charged)","x-required-scope":"billing:write","description":"Requires scope `billing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"plan":{"type":"string","enum":["starter","growth"]}},"required":["plan"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/agency/clients":{"get":{"tags":["Agency workspaces"],"summary":"Client workspaces this agency manages, each with its monthly credit cap and this month's credits used by module","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Agency workspaces"],"summary":"Add a client workspace: an organization you also own, with its own monthly credit cap (owners, Agency plan)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"client_org_id":{"type":"string","minLength":3,"maxLength":80},"label":{"type":"string","minLength":1,"maxLength":120},"monthly_credits":{"anyOf":[{"type":"integer","minimum":0,"maximum":1000000},{"type":"null"}]},"growth_allowances":{"type":"boolean"}},"required":["client_org_id","label"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/agency/clients/{id}":{"get":{"tags":["Agency workspaces"],"summary":"One client workspace's report: its cap and this month's credits by module","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Agency workspaces"],"summary":"Rename a client workspace or change its monthly credit cap (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"monthly_credits":{"anyOf":[{"type":"integer","minimum":0,"maximum":1000000},{"type":"null"}]},"growth_allowances":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Agency workspaces"],"summary":"Stop managing a client workspace (its data stays in its own organization; owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/agency/managed-by":{"delete":{"tags":["Agency workspaces"],"summary":"End the agency's management of this organization (owners of this organization; its data and limits stay)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/agency/link-offers":{"post":{"tags":["Agency workspaces"],"summary":"Invite a client organization to be managed by this agency: a one-time code, shown once, that the client's owner accepts within 7 days (owners, Agency plan)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"label":{"type":"string","minLength":1,"maxLength":120},"monthly_credits":{"anyOf":[{"type":"integer","minimum":0,"maximum":1000000},{"type":"null"}]},"growth_allowances":{"type":"boolean"}},"required":["label"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Agency workspaces"],"summary":"This agency's invitations to client organizations and where each stands (never the codes)","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/agency/link-offers/{id}":{"delete":{"tags":["Agency workspaces"],"summary":"Withdraw an open invitation (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/agency/link-offers/preview":{"post":{"tags":["Agency workspaces"],"summary":"What an agency's invitation offers this organization (the agency and the monthly credit limit), before an owner accepts it","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"string","minLength":10,"maxLength":200}},"required":["code"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/agency/link-offers/accept":{"post":{"tags":["Agency workspaces"],"summary":"Accept an agency's invitation for this organization to be managed by it (owners of this organization, in the web app)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"code":{"type":"string","minLength":10,"maxLength":200},"monthly_credits":{"anyOf":[{"type":"integer","minimum":0,"maximum":1000000},{"type":"null"}]}},"required":["code","monthly_credits"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/agency/portal":{"get":{"tags":["Agency workspaces"],"summary":"For a client organization's people: the agency that manages it (its name and logo) for the approval portal","x-required-scope":"mkt-approvals:read","description":"Requires scope `mkt-approvals:read`.","security":[{"apiKey":[]},{"oauth2":["mkt-approvals:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/agency/clients/{id}/statement":{"get":{"tags":["Agency workspaces"],"summary":"One client workspace's statement for this month at list prices, as JSON or CSV (nothing is charged)","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}},{"name":"format","in":"query","required":true,"schema":{"default":"json","type":"string","enum":["json","csv"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/agency/portal/content-reviews":{"get":{"tags":["Agency workspaces"],"summary":"For the approval portal: content pieces waiting for review in this organization, each with the version to decide and whether you may decide its current step","x-required-scope":"mkt-approvals:read","description":"Requires scope `mkt-approvals:read`.","security":[{"apiKey":[]},{"oauth2":["mkt-approvals:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":300}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/agency/portal/content-reviews/{id}/file":{"get":{"tags":["Agency workspaces"],"summary":"For the approval portal: the file under review (a picture, video, sound or PDF, by its bytes, at most 8 MB), to see before deciding","x-required-scope":"mkt-approvals:read","description":"Requires scope `mkt-approvals:read`.","security":[{"apiKey":[]},{"oauth2":["mkt-approvals:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/agency/portal/content-reviews/{id}/verdict":{"post":{"tags":["Agency workspaces"],"summary":"Approve a content piece or ask for changes from the approval portal (the same checks as in the content studio; bound to the version shown)","x-required-scope":"mkt-approvals:write","description":"Requires scope `mkt-approvals:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"decision":{"type":"string","enum":["approve","request_changes"]},"version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"note":{"type":"string","maxLength":2000}},"required":["decision","version"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/agency/branding":{"get":{"tags":["Agency workspaces"],"summary":"The name and logo your clients' reviewers see on their approval portal","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Agency workspaces"],"summary":"Set the name and logo (your own PNG, JPEG or WebP, at most 64 KB) your clients' reviewers see (owners, Agency plan)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"display_name":{"type":"string","minLength":1,"maxLength":120},"logo_base64":{"anyOf":[{"type":"string","maxLength":90000},{"type":"null"}]}},"required":["display_name"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/agency/usage-report":{"get":{"tags":["Agency workspaces"],"summary":"Per-client usage this month and the list price per client workspace, as JSON or CSV (a report: nothing is charged)","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[{"name":"format","in":"query","required":true,"schema":{"default":"json","type":"string","enum":["json","csv"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/first-run/visibility-check":{"post":{"tags":["Plans and credits"],"summary":"The first run's one AI-visibility check: add one question and price it on the engines available (nothing runs until you confirm)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"question":{"type":"string","minLength":5,"maxLength":300}},"required":["question"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/first-run/visibility-check/{id}/confirm":{"post":{"tags":["Plans and credits"],"summary":"Confirm the first run's priced visibility check and run it (once; the credits shown are the most it uses)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/first-run/progress":{"get":{"tags":["Plans and credits"],"summary":"Where your organization is in setup (the step, the goals picked, the website given), or null before it starts","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Plans and credits"],"summary":"Save where you are in setup, so leaving it (to connect an account, a reload, another device) never loses your place","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"step":{"type":"integer","minimum":1,"maximum":4},"goals":{"maxItems":12,"type":"array","items":{"type":"string","pattern":"^[a-z_]{2,20}$"}},"url":{"type":"string","maxLength":2000}},"required":["step","goals","url"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/first-run/audit":{"get":{"tags":["Plans and credits"],"summary":"A read-only first look: what the product found in your own data and what it would do first (nothing is sent, published or spent)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/connected-accounts":{"get":{"tags":["Integrations"],"summary":"Every connected account: who connected it, its scopes, the health of its sign-in, its last sync and the marketing accounts under it (never a secret)","x-required-scope":"connections:read","description":"Requires scope `connections:read`.","security":[{"apiKey":[]},{"oauth2":["connections:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/privacy/requests/preview":{"post":{"tags":["Privacy"],"summary":"What's held on a person, found by email address: how many people, and rows per table (never the rows). An owner, in the web app","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","minLength":3,"maxLength":320}},"required":["email"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/privacy/requests/export":{"post":{"tags":["Privacy"],"summary":"A person's data as a JSON file, to answer their request for it (an owner, in the web app; audited without the address). A long history comes in parts of up to 25,000 records: send `next_cursor` back as `cursor` for the next one","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","minLength":3,"maxLength":320},"confirm":{"type":"boolean","const":true},"cursor":{"type":"string","minLength":10,"maxLength":20000}},"required":["email","confirm"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/privacy/requests/erase":{"post":{"tags":["Privacy"],"summary":"Erase a person's data in every module (the address typed twice; an owner, in the web app). A hashed do-not-contact entry is kept so they aren't contacted again","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","minLength":3,"maxLength":320},"confirm_email":{"type":"string","minLength":3,"maxLength":320},"confirm":{"type":"boolean","const":true}},"required":["email","confirm_email","confirm"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/privacy/retention":{"get":{"tags":["Privacy"],"summary":"How long people's events and sales handoff events are kept (null keeps them)","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Privacy"],"summary":"Set how many days people's events and sales handoff events are kept (30 to 3,650; null keeps them). An owner, in the web app; a daily job deletes what's older","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"profile_events_days":{"anyOf":[{"type":"integer","minimum":30,"maximum":3650},{"type":"null"}]},"handoff_events_days":{"anyOf":[{"type":"integer","minimum":30,"maximum":3650},{"type":"null"}]}},"required":["profile_events_days","handoff_events_days"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/handoff/connection":{"get":{"tags":["Sales handoff"],"summary":"The connection to the sales product: its address, since when events are delivered, the last check and the webhook address to give it (never the key or secret)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Sales handoff"],"summary":"Connect the sales product with its address, an API key and a shared signing secret. Nothing is sent: only events from now on are delivered","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"base_url":{"type":"string","minLength":8,"maxLength":500},"api_key":{"type":"string","minLength":8,"maxLength":500},"signing_secret":{"type":"string","minLength":1,"maxLength":200}},"required":["base_url","api_key","signing_secret"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Sales handoff"],"summary":"Pause or resume delivery to the sales product (paused events wait; nothing is dropped)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"paused":{"type":"boolean"}},"required":["paused"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Sales handoff"],"summary":"Disconnect the sales product (waiting events stay waiting)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/handoff/connection/check":{"post":{"tags":["Sales handoff"],"summary":"Check the connection with one signed request that reaches no person and carries no event","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/handoff/status":{"get":{"tags":["Sales handoff"],"summary":"Counts of events delivered, waiting, failed and held, messages received, and people held from marketing (counts only)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/handoff/events":{"get":{"tags":["Sales handoff"],"summary":"Recent events for the sales product with where each stands and why (newest first, at most 100; no personal details)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","sent","failed","held"]}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/handoff/events/{id}/replay":{"post":{"tags":["Sales handoff"],"summary":"Send one failed or held event again, once (the same idempotency key, so the sales product keeps one copy)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/handoff/inbox":{"get":{"tags":["Sales handoff"],"summary":"Recent messages from the sales product (deals, signals, target lists, consent and sequence changes), summarized without personal details","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/handoff/fallback":{"get":{"tags":["Sales handoff"],"summary":"Where events go while no sales product is connected: your webhook or a CSV download, since when, and how many wait (never the secret)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Sales handoff"],"summary":"Send events to your own webhook (signed; the signing secret is shown once) or offer them as a CSV download, from now on only","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","oneOf":[{"type":"object","properties":{"mode":{"type":"string","const":"webhook"},"url":{"type":"string","minLength":8,"maxLength":500}},"required":["mode","url"],"additionalProperties":false},{"type":"object","properties":{"mode":{"type":"string","const":"csv"}},"required":["mode"],"additionalProperties":false}]}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Sales handoff"],"summary":"Turn the fallback off (events wait in the outbox again)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/handoff/fallback/export":{"post":{"tags":["Sales handoff"],"summary":"Download the events waiting since the CSV download was turned on, as a CSV file, or the people among them as a HubSpot contacts or Salesforce leads import file (at most 5,000; owners in the web app)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"format","in":"query","required":true,"schema":{"default":"csv","type":"string","enum":["csv","hubspot","salesforce"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/handoff/mqls":{"get":{"tags":["Sales handoff"],"summary":"Recent MQLs handed to sales with their marketing context: score, source campaign, channel, counts of reasons and touches (no personal details)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/handoff/target-accounts":{"get":{"tags":["Sales handoff"],"summary":"Target account lists from the sales product (company domains) and its latest account signals","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/handoff/revenue":{"get":{"tags":["Sales handoff"],"summary":"Revenue from won deals by the campaigns and channels that brought their people (last touch by default), with deal totals; aggregates only","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":true,"schema":{"default":90,"type":"integer","minimum":7,"maximum":92}},{"name":"model","in":"query","required":true,"schema":{"default":"last","type":"string","enum":["first","last","linear","time_decay","position"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/handoff/target-accounts/{list_id}/ad-audience":{"post":{"tags":["Sales handoff"],"summary":"Propose a target account list from the sales product as a company list for an ad account (it waits for approval; no people, only company domains)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"list_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":120}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_account_id":{"type":"string","minLength":3,"maxLength":80},"list_name":{"type":"string","minLength":1,"maxLength":200}},"required":["channel_account_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/handoff/forms":{"get":{"tags":["Sales handoff"],"summary":"Your site's forms (by the id your site sends) with submissions in the last 90 days, and which go to the sales product","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mkt/handoff/forms/{form_id}":{"put":{"tags":["Sales handoff"],"summary":"Send a site form's submissions to the sales product from now on (an owner, in the web app; earlier submissions are never sent), or stop","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"form_id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":60}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"for_sales":{"type":"boolean"},"form_name":{"type":"string","maxLength":200}},"required":["for_sales"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/me/nav":{"get":{"tags":["Account"],"summary":"Your navigation: pinned and recent pages and records, closed sidebar groups, whether shortcuts are on, which modules and setups your organization has, and whether you put the tour away","security":[{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Account"],"summary":"Turn keyboard shortcuts on or off, set which sidebar groups are closed, or put the free-plan tour away (or bring it back)","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"shortcuts_enabled":{"type":"boolean"},"collapsed":{"maxItems":11,"type":"array","items":{"type":"string","enum":["home","plan","create","reach","measure","control","agents","more","pinned","recent","work"]}},"tour_dismissed":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/me/nav/recent":{"post":{"tags":["Account"],"summary":"Note a page or record you opened (kept to your last 12)","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"href":{"type":"string","maxLength":200,"pattern":"^\\/app(\\/[A-Za-z0-9_-]+)*$"},"label":{}},"required":["href"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/me/nav/pins":{"put":{"tags":["Account"],"summary":"Set your pinned pages and records (up to 12, in order)","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"pins":{"maxItems":12,"type":"array","items":{"type":"object","properties":{"href":{"type":"string","maxLength":200,"pattern":"^\\/app(\\/[A-Za-z0-9_-]+)*$"},"label":{}},"required":["href"],"additionalProperties":false}}},"required":["pins"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/search/records":{"get":{"tags":["Records"],"summary":"Find agents by name for the command palette: the best few, names starting with the query first","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":100}},{"name":"limit","in":"query","required":true,"schema":{"default":8,"type":"integer","minimum":1,"maximum":20}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/ui-events":{"post":{"tags":["Account"],"summary":"Record how the app is used in this browser (first-party, no cookies beyond your session): navigation, the palette, empty searches (their length only), setup steps left, first use of a feature. Fixed ids and counts only","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"events":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"event":{"type":"string","enum":["ui.nav_click","ui.palette_command","ui.search_empty","ui.setup_abandoned","ui.feature_first_use","ui.shortcut_used"]},"properties":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["event","properties"],"additionalProperties":false}}},"required":["events"],"additionalProperties":false}}}},"responses":{"202":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/feedback":{"post":{"tags":["Feedback"],"summary":"Tell us what's wrong, missing or confusing, or an idea (from any page; it goes to Scheeleworks's team with the page and your plan)","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kind":{"type":"string","enum":["bug","missing","confusing","idea","praise"]},"text":{"type":"string","minLength":3,"maxLength":2000},"page":{"type":"string","maxLength":200,"pattern":"^\\/app(\\/[A-Za-z0-9_-]+)*$"},"contact_ok":{"type":"boolean"},"request_ids":{"maxItems":5,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9_-]{1,64}$"}},"screenshot":{"description":"The page as session replay records it (text masked, no input values), which the person saw before sending","type":"object","properties":{"tree":{},"width":{"type":"integer","minimum":0,"maximum":20000},"height":{"type":"integer","minimum":0,"maximum":200000}},"required":["tree"],"additionalProperties":false}},"required":["kind","text"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/feedback/survey":{"get":{"tags":["Feedback"],"summary":"A one-question survey for you, when one is due (at most every 30 days, after your first week); otherwise null","security":[{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Feedback"],"summary":"Answer (1–5, optionally a few words) or dismiss the survey you were offered","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"type":"string","maxLength":40},"score":{"type":"integer","minimum":1,"maximum":5},"comment":{"type":"string","maxLength":500},"dismissed":{"type":"boolean"},"page":{"type":"string","maxLength":200,"pattern":"^\\/app(\\/[A-Za-z0-9_-]+)*$"}},"required":["key"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/me":{"get":{"tags":["Account"],"summary":"Who am I: principal, active organization, role and scopes","security":[{"apiKey":[]},{"oauth2":[]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"me"},"kind":{"type":"string","enum":["user","api_key","oauth_app"]},"name":{"type":"string"},"user_id":{"type":["string","null"]},"organization_id":{"type":["string","null"]},"role":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"string"}},"two_factor_enabled":{"type":"boolean"},"passkeys":{"type":"number"},"mfa_required":{"type":"boolean"},"member_role":{"type":["string","null"]},"organization_deletion":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"organization_deletion"},"requested_at":{"type":"string"},"purge_after":{"type":"string"},"requested_by":{"type":["string","null"]}},"required":["id","object","requested_at","purge_after","requested_by"],"additionalProperties":false},{"type":"null"}]}},"required":["object","kind","name","user_id","organization_id","role","scopes","mfa_required"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/organization":{"get":{"tags":["Organization"],"summary":"Get the active organization","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"organization"},"name":{"type":"string"},"slug":{"type":"string"},"created_at":{"type":"string"}},"required":["id","object","name","slug","created_at"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Organization"],"summary":"Rename the organization (owner)","x-required-scope":"security:write","description":"Requires scope `security:write`.","security":[{"apiKey":[]},{"oauth2":["security:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120}},"required":["name"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"organization"},"name":{"type":"string"},"slug":{"type":"string"},"created_at":{"type":"string"}},"required":["id","object","name","slug","created_at"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Organization"],"summary":"Schedule the organization's deletion: it's suspended at once and, unless an owner undoes it within 30 days, purged with all its data, including audit history (owner, web only, the exact name to confirm)","x-required-scope":"security:write","description":"Requires scope `security:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"confirm_name":{"type":"string"}},"required":["confirm_name"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"organization_deletion"},"requested_at":{"type":"string"},"purge_after":{"type":"string"},"requested_by":{"type":["string","null"]},"organization_id":{"type":"string"},"deleted":{"type":"boolean","const":false},"scheduled":{"type":"boolean","const":true}},"required":["id","object","requested_at","purge_after","requested_by","organization_id","deleted","scheduled"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/organization/deletion":{"get":{"tags":["Organization"],"summary":"Whether the organization is scheduled for deletion, and when it will be purged (answers while it's suspended)","security":[{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"organization_deletion_status"},"pending":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"organization_deletion"},"requested_at":{"type":"string"},"purge_after":{"type":"string"},"requested_by":{"type":["string","null"]}},"required":["id","object","requested_at","purge_after","requested_by"],"additionalProperties":false},{"type":"null"}]},"can_undo":{"type":"boolean"}},"required":["object","pending","can_undo"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/organization/deletion/cancel":{"post":{"tags":["Organization"],"summary":"Undo the organization's scheduled deletion before its window ends (owner, web only)","x-required-scope":"security:write","description":"Requires scope `security:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"organization_deletion"},"organization_id":{"type":"string"},"cancelled_at":{"type":"string"},"cancelled":{"type":"boolean","const":true}},"required":["id","object","organization_id","cancelled_at","cancelled"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/members":{"get":{"tags":["Organization"],"summary":"List members and their roles","x-required-scope":"members:read","description":"Requires scope `members:read`.","security":[{"apiKey":[]},{"oauth2":["members:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":true,"schema":{"default":"created_at","type":"string","enum":["created_at","-created_at"]}},{"name":"created_after","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"created_before","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"member"},"user_id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","member","viewer","reviewer"]},"created_at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["id","object","user_id","name","email","role","created_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/members/{id}":{"patch":{"tags":["Organization"],"summary":"Change a member's role (owner)","x-required-scope":"members:write","description":"Requires scope `members:write`.","security":[{"apiKey":[]},{"oauth2":["members:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"role":{"type":"string","enum":["owner","member","viewer","reviewer"]}},"required":["role"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"member"},"user_id":{"type":"string"},"name":{"type":"string"},"email":{"type":"string"},"role":{"type":"string","enum":["owner","member","viewer","reviewer"]},"created_at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["id","object","user_id","name","email","role","created_at"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Organization"],"summary":"Remove a member and revoke their API keys and app connections (owner)","x-required-scope":"members:write","description":"Requires scope `members:write`.","security":[{"apiKey":[]},{"oauth2":["members:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/invitations":{"get":{"tags":["Organization"],"summary":"List pending invitations (owner)","x-required-scope":"members:write","description":"Requires scope `members:write`.","security":[{"apiKey":[]},{"oauth2":["members:write"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":true,"schema":{"default":"-created_at","type":"string","enum":["created_at","-created_at"]}},{"name":"created_after","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"created_before","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"invitation"},"email":{"type":"string"},"role":{"type":"string"},"status":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["id","object","email","role","status","expires_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Organization"],"summary":"Invite someone by email (owner, web only)","x-required-scope":"members:write","description":"Requires scope `members:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","maxLength":254,"format":"email","pattern":"^(?:[A-Za-z0-9_'+\\-]+\\.)*[A-Za-z0-9_'+\\-]*[A-Za-z0-9_+-]@(?:[A-Za-z0-9][A-Za-z0-9\\-]*\\.)+[A-Za-z]{2,}$"},"role":{"type":"string","enum":["owner","member","viewer","reviewer"]}},"required":["email","role"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"invitation"},"email":{"type":"string"},"role":{"type":"string"},"status":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["id","object","email","role","status","expires_at"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/invitations/{id}/resend":{"post":{"tags":["Organization"],"summary":"Resend a pending invitation (owner, web only)","x-required-scope":"members:write","description":"Requires scope `members:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"invitation"},"email":{"type":"string"},"role":{"type":"string"},"status":{"type":"string"},"expires_at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["id","object","email","role","status","expires_at"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/invitations/{id}":{"delete":{"tags":["Organization"],"summary":"Cancel a pending invitation (owner, web only)","x-required-scope":"members:write","description":"Requires scope `members:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/workspaces":{"get":{"tags":["Workspaces"],"summary":"List workspaces (brands) in the organization","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":true,"schema":{"default":"created_at","type":"string","enum":["created_at","-created_at"]}},{"name":"created_after","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"created_before","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"workspace"},"name":{"type":"string"},"slug":{"type":"string"},"brand":{"type":"object","properties":{"display_name":{"type":"string","maxLength":80},"sender_name":{"type":"string","maxLength":80},"signature":{"type":"string","maxLength":2000},"website":{"type":"string","maxLength":300,"format":"uri"},"logo_url":{"type":"string","maxLength":500,"pattern":"^https:\\/\\/"},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"additionalProperties":false},"locale":{"type":"object","properties":{"language":{"description":"What the workspace's content is written in (en, de, pt-BR)","type":"string"},"currency":{"description":"The currency the workspace's prices and values are in (ISO 4217)","type":"string"},"timezone":{"description":"The workspace's time zone (IANA)","type":"string"},"country":{"description":"The workspace's home country (ISO 3166 alpha-2)","type":"string"}},"additionalProperties":false},"member_ids":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["id","object","name","slug","created_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Workspaces"],"summary":"Create a workspace (owner)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"slug":{"type":"string","pattern":"^[a-z0-9-]{1,48}$"}},"required":["name"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"workspace"},"name":{"type":"string"},"slug":{"type":"string"},"brand":{"type":"object","properties":{"display_name":{"type":"string","maxLength":80},"sender_name":{"type":"string","maxLength":80},"signature":{"type":"string","maxLength":2000},"website":{"type":"string","maxLength":300,"format":"uri"},"logo_url":{"type":"string","maxLength":500,"pattern":"^https:\\/\\/"},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"additionalProperties":false},"locale":{"type":"object","properties":{"language":{"description":"What the workspace's content is written in (en, de, pt-BR)","type":"string"},"currency":{"description":"The currency the workspace's prices and values are in (ISO 4217)","type":"string"},"timezone":{"description":"The workspace's time zone (IANA)","type":"string"},"country":{"description":"The workspace's home country (ISO 3166 alpha-2)","type":"string"}},"additionalProperties":false},"member_ids":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["id","object","name","slug","created_at"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/workspaces/{id}":{"patch":{"tags":["Workspaces"],"summary":"Rename a workspace, or set its profile, language, currency and time zone (owner)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"brand":{"type":"object","properties":{"display_name":{"type":"string","maxLength":80},"sender_name":{"type":"string","maxLength":80},"signature":{"type":"string","maxLength":2000},"website":{"type":"string","maxLength":300,"format":"uri"},"logo_url":{"type":"string","maxLength":500,"pattern":"^https:\\/\\/"},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"additionalProperties":false},"locale":{"description":"Replaces the workspace's language, currency, time zone and country; leave a field out to unset it","type":"object","properties":{"language":{"description":"What the workspace's content is written in (en, de, pt-BR)","type":"string"},"currency":{"description":"The currency the workspace's prices and values are in (ISO 4217)","type":"string"},"timezone":{"description":"The workspace's time zone (IANA)","type":"string"},"country":{"description":"The workspace's home country (ISO 3166 alpha-2)","type":"string"}},"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"workspace"},"name":{"type":"string"},"slug":{"type":"string"},"brand":{"type":"object","properties":{"display_name":{"type":"string","maxLength":80},"sender_name":{"type":"string","maxLength":80},"signature":{"type":"string","maxLength":2000},"website":{"type":"string","maxLength":300,"format":"uri"},"logo_url":{"type":"string","maxLength":500,"pattern":"^https:\\/\\/"},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"additionalProperties":false},"locale":{"type":"object","properties":{"language":{"description":"What the workspace's content is written in (en, de, pt-BR)","type":"string"},"currency":{"description":"The currency the workspace's prices and values are in (ISO 4217)","type":"string"},"timezone":{"description":"The workspace's time zone (IANA)","type":"string"},"country":{"description":"The workspace's home country (ISO 3166 alpha-2)","type":"string"}},"additionalProperties":false},"member_ids":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["id","object","name","slug","created_at"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Workspaces"],"summary":"Delete a workspace (owner)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/workspaces/limits/{userId}":{"delete":{"tags":["Workspaces"],"summary":"Lift a person's workspace limit (they see every workspace's records) (owner)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"userId","in":"path","required":true,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"user_id":{"type":"string"},"limited":{"type":"boolean"}},"required":["user_id","limited"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/workspaces/{id}/members":{"put":{"tags":["Workspaces"],"summary":"Limit people to this workspace's records (with their other workspaces); an empty list clears it (owner)","x-required-scope":"members:write","description":"Requires scope `members:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"user_ids":{"maxItems":500,"type":"array","items":{"type":"string","maxLength":64}}},"required":["user_ids"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"workspace"},"name":{"type":"string"},"slug":{"type":"string"},"brand":{"type":"object","properties":{"display_name":{"type":"string","maxLength":80},"sender_name":{"type":"string","maxLength":80},"signature":{"type":"string","maxLength":2000},"website":{"type":"string","maxLength":300,"format":"uri"},"logo_url":{"type":"string","maxLength":500,"pattern":"^https:\\/\\/"},"color":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"additionalProperties":false},"locale":{"type":"object","properties":{"language":{"description":"What the workspace's content is written in (en, de, pt-BR)","type":"string"},"currency":{"description":"The currency the workspace's prices and values are in (ISO 4217)","type":"string"},"timezone":{"description":"The workspace's time zone (IANA)","type":"string"},"country":{"description":"The workspace's home country (ISO 3166 alpha-2)","type":"string"}},"additionalProperties":false},"member_ids":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["id","object","name","slug","created_at"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/api-keys":{"get":{"tags":["API keys"],"summary":"List API keys (secrets are never returned)","x-required-scope":"keys:write","description":"Requires scope `keys:write`.","security":[{"apiKey":[]},{"oauth2":["keys:write"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":true,"schema":{"default":"-created_at","type":"string","enum":["created_at","-created_at"]}},{"name":"created_after","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"created_before","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"api_key"},"name":{"type":"string"},"start":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"rate_limit_per_minute":{"type":["number","null"]},"created_at":{"type":"string","description":"ISO 8601 timestamp"},"last_used_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"expiry":{"type":"string","enum":["expires","expired","never_expires","no_expiry"],"description":"expires: on expires_at; never_expires: an owner chose no expiry; no_expiry: made before keys expired by default (set an expiry or roll it)"},"never_expires":{"type":"boolean"},"allowed_cidrs":{"type":"array","items":{"type":"string"},"description":"Address ranges the key works from (empty: anywhere)"},"site_id":{"description":"The one site an edge worker's key acts for, or null","type":["string","null"]}},"required":["id","object","name","start","scopes","rate_limit_per_minute","created_at","last_used_at","expires_at","revoked_at","expiry","never_expires","allowed_cidrs","site_id"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["API keys"],"summary":"Create an API key. The secret is shown once in this response.","x-required-scope":"keys:write","description":"Requires scope `keys:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"scopes":{"minItems":1,"maxItems":60,"type":"array","items":{"type":"string","maxLength":64},"description":"Bundles (org:read, agents:write…), fine scopes (agents:read, messages:send…) or resource:*. Sending always needs messages:send by name."},"expires_in_days":{"description":"Days until the key stops working (default 90, at most 365)","type":"integer","minimum":1,"maximum":365},"never_expires":{"description":"Owners only, with never_expires_reason: the key never expires","type":"boolean","const":true},"never_expires_reason":{"type":"string","minLength":10,"maxLength":500,"description":"Why this key must never expire (recorded in the audit log)"},"rate_limit_per_minute":{"type":"integer","minimum":1,"maximum":1000},"allowed_cidrs":{"description":"Only these address ranges may use the key (IPv4/IPv6 CIDR); empty or missing: anywhere","maxItems":50,"type":"array","items":{"type":"string","maxLength":64}},"site_id":{"description":"For the edge worker's key: the one site it acts for (scopes exactly [\"edge:write\"])","type":"string","pattern":"^sr_site_[0-9a-z]{26}$"}},"required":["name","scopes"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"api_key"},"name":{"type":"string"},"start":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"rate_limit_per_minute":{"type":["number","null"]},"created_at":{"type":"string","description":"ISO 8601 timestamp"},"last_used_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"expiry":{"type":"string","enum":["expires","expired","never_expires","no_expiry"],"description":"expires: on expires_at; never_expires: an owner chose no expiry; no_expiry: made before keys expired by default (set an expiry or roll it)"},"never_expires":{"type":"boolean"},"allowed_cidrs":{"type":"array","items":{"type":"string"},"description":"Address ranges the key works from (empty: anywhere)"},"site_id":{"description":"The one site an edge worker's key acts for, or null","type":["string","null"]},"secret":{"type":"string"}},"required":["id","object","name","start","scopes","rate_limit_per_minute","created_at","last_used_at","expires_at","revoked_at","expiry","never_expires","allowed_cidrs","site_id","secret"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/api-keys/{id}":{"delete":{"tags":["API keys"],"summary":"Revoke an API key","x-required-scope":"keys:write","description":"Requires scope `keys:write`.","security":[{"apiKey":[]},{"oauth2":["keys:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"api_key"},"name":{"type":"string"},"start":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"rate_limit_per_minute":{"type":["number","null"]},"created_at":{"type":"string","description":"ISO 8601 timestamp"},"last_used_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"expiry":{"type":"string","enum":["expires","expired","never_expires","no_expiry"],"description":"expires: on expires_at; never_expires: an owner chose no expiry; no_expiry: made before keys expired by default (set an expiry or roll it)"},"never_expires":{"type":"boolean"},"allowed_cidrs":{"type":"array","items":{"type":"string"},"description":"Address ranges the key works from (empty: anywhere)"},"site_id":{"description":"The one site an edge worker's key acts for, or null","type":["string","null"]}},"required":["id","object","name","start","scopes","rate_limit_per_minute","created_at","last_used_at","expires_at","revoked_at","expiry","never_expires","allowed_cidrs","site_id"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["API keys"],"summary":"Change a key's name, address ranges or expiry (from now, at most 365 days; never expiring: owners, with a reason)","x-required-scope":"keys:write","description":"Requires scope `keys:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"allowed_cidrs":{"description":"Replace the address ranges (empty: anywhere)","maxItems":50,"type":"array","items":{"type":"string","maxLength":64}},"expires_in_days":{"description":"Expire this many days from now","type":"integer","minimum":1,"maximum":365},"never_expires":{"type":"boolean","const":true},"never_expires_reason":{"type":"string","minLength":10,"maxLength":500,"description":"Why this key must never expire (recorded in the audit log)"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"api_key"},"name":{"type":"string"},"start":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"rate_limit_per_minute":{"type":["number","null"]},"created_at":{"type":"string","description":"ISO 8601 timestamp"},"last_used_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"expiry":{"type":"string","enum":["expires","expired","never_expires","no_expiry"],"description":"expires: on expires_at; never_expires: an owner chose no expiry; no_expiry: made before keys expired by default (set an expiry or roll it)"},"never_expires":{"type":"boolean"},"allowed_cidrs":{"type":"array","items":{"type":"string"},"description":"Address ranges the key works from (empty: anywhere)"},"site_id":{"description":"The one site an edge worker's key acts for, or null","type":["string","null"]}},"required":["id","object","name","start","scopes","rate_limit_per_minute","created_at","last_used_at","expires_at","revoked_at","expiry","never_expires","allowed_cidrs","site_id"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/api-keys/{id}/roll":{"post":{"tags":["API keys"],"summary":"Replace a key's secret. The old secret stops working immediately; the new one is shown once.","x-required-scope":"keys:write","description":"Requires scope `keys:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"api_key"},"name":{"type":"string"},"start":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"rate_limit_per_minute":{"type":["number","null"]},"created_at":{"type":"string","description":"ISO 8601 timestamp"},"last_used_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"expires_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"revoked_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"expiry":{"type":"string","enum":["expires","expired","never_expires","no_expiry"],"description":"expires: on expires_at; never_expires: an owner chose no expiry; no_expiry: made before keys expired by default (set an expiry or roll it)"},"never_expires":{"type":"boolean"},"allowed_cidrs":{"type":"array","items":{"type":"string"},"description":"Address ranges the key works from (empty: anywhere)"},"site_id":{"description":"The one site an edge worker's key acts for, or null","type":["string","null"]},"secret":{"type":"string"}},"required":["id","object","name","start","scopes","rate_limit_per_minute","created_at","last_used_at","expires_at","revoked_at","expiry","never_expires","allowed_cidrs","site_id","secret"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/audit-logs":{"get":{"tags":["Audit log"],"summary":"Every query and action in the organization, newest first (owner)","x-required-scope":"audit:read","description":"Requires scope `audit:read`.","security":[{"apiKey":[]},{"oauth2":["audit:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":true,"schema":{"default":"-created_at","type":"string","enum":["created_at","-created_at"]}},{"name":"created_after","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"created_before","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["query","action"]}},{"name":"actor_type","in":"query","required":false,"schema":{"type":"string","enum":["user","api_key","oauth_app","agent","system"]}},{"name":"resource_type","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"resource_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"audit_entry"},"kind":{"type":"string","enum":["query","action"]},"actor_type":{"type":"string"},"actor_id":{"type":["string","null"]},"actor_name":{"type":["string","null"]},"via":{"type":"string"},"action":{"type":"string"},"resource_type":{"type":["string","null"]},"resource_id":{"type":["string","null"]},"status":{"type":["number","null"]},"request_id":{"type":["string","null"]},"ip":{"type":["string","null"]},"metadata":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"created_at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["id","object","kind","actor_type","actor_id","actor_name","via","action","resource_type","resource_id","status","request_id","ip","metadata","created_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/credential-uses":{"get":{"tags":["Audit log"],"summary":"Each use of a connected account's stored credentials: which connection, for which request or job, by which person, key, app or agent, newest first (owner)","x-required-scope":"audit:read","description":"Requires scope `audit:read`.","security":[{"apiKey":[]},{"oauth2":["audit:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":true,"schema":{"default":"-created_at","type":"string","enum":["created_at","-created_at"]}},{"name":"created_after","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"created_before","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"connection_id","in":"query","required":false,"schema":{"type":"string","maxLength":80}},{"name":"credential","in":"query","required":false,"schema":{"type":"string","enum":["connection","vendor","secret","model_key","sso","ops_grant"]}},{"name":"actor_type","in":"query","required":false,"schema":{"type":"string","enum":["user","api_key","oauth_app","agent","system"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"credential_use"},"credential":{"type":"string","enum":["connection","vendor","secret","model_key","sso","ops_grant"],"description":"A connected account, an organization's own vendor account, an organization secret (an MCP server's, an agent step's, a vendor key), its own model key, or its SSO client secret"},"connection_id":{"description":"The connection id, the vendor's name, the secret's name, `llm_api_key`, or the SSO connection id; `*` for the summary of uses past a request's or job's first 500 distinct ones","type":["string","null"]},"overflow":{"type":"boolean","description":"This entry sums the uses past the first 500 distinct ones in its request or job"},"distinct":{"description":"For a summary: how many distinct uses it covers (at least)","type":["number","null"]},"provider":{"type":["string","null"]},"uses":{"type":"number","description":"Times it was opened in that request or job"},"actor_type":{"type":"string"},"actor_id":{"type":["string","null"]},"actor_name":{"type":["string","null"]},"on_behalf_of":{"type":["string","null"]},"via":{"type":"string"},"request_id":{"type":["string","null"]},"job":{"type":["string","null"]},"job_id":{"type":["string","null"]},"where":{"type":["string","null"]},"first_at":{"type":["string","null"]},"last_at":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","object","credential","connection_id","overflow","distinct","provider","uses","actor_type","actor_id","actor_name","on_behalf_of","via","request_id","job","job_id","where","first_at","last_at","created_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agents":{"get":{"tags":["Agents"],"summary":"Agents: built-in ones and your organization's, with state, version, triggers, integrations and run counters","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"id":{"type":["string","null"]},"builtin":{"type":"boolean"},"startable":{"type":"boolean"},"name":{"type":"string"},"description":{"type":"string"},"steps":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"effect":{"type":"string"},"tool":{"type":["string","null"]},"external":{"type":"boolean"}},"required":["name","effect","tool","external"],"additionalProperties":false}}},"required":["key","id","builtin","name","description","steps"],"additionalProperties":{}}},"live":{"type":"number"}},"required":["object","data","live"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Agent platform"],"summary":"Create a draft agent, from a template or a spec","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","maxLength":80},"title":{"type":"string","maxLength":80},"job_description":{"type":"string","maxLength":2000},"manager_user_id":{"type":["string","null"]},"template_key":{"type":"string","maxLength":80},"template_version":{"type":"integer","minimum":1,"maximum":9007199254740991},"spec":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/runs":{"post":{"tags":["Agents"],"summary":"Start an agent run","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"agent":{"type":"string","description":"A built-in agent key (system.demo) or an agent id (agt_…)"},"version_id":{"description":"Run a specific published version (default: the current one)","type":"string","format":"starts_with","pattern":"^agv_.*"},"dry_run":{"description":"Writes return their change set without happening","type":"boolean"},"input":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["agent","input"],"additionalProperties":false}}}},"responses":{"202":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"run"},"agent":{"type":"string"},"agent_id":{"type":["string","null"]},"agent_version_id":{"type":["string","null"]},"status":{"type":"string"},"display_status":{"type":"string","description":"Starting, Working, Waiting on you, Done, Failed or Cancelled"},"tainted":{"type":"boolean","description":"The run read content from outside the company"},"started_by":{"type":["string","null"]},"trigger":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"output":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"error":{"type":["string","null"]},"attempt":{"type":"number"},"replay_of":{"type":["string","null"]},"created_at":{"type":"string","description":"ISO 8601 timestamp"},"started_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"finished_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"number"},"name":{"type":"string"},"effect":{"type":"string","enum":["read","reason","write"]},"tool":{"type":["string","null"]},"status":{"type":"string"},"note":{"type":["string","null"]},"input":{},"output":{},"record_ids":{"type":"array","items":{"type":"string"}},"flags":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"message":{"type":"string"},"source":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}},"usage":{},"started_at":{"type":"string","description":"ISO 8601 timestamp"},"finished_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]}},"required":["id","seq","name","effect","tool","status","note","input","output","record_ids","flags","usage","started_at","finished_at"],"additionalProperties":false}}},"required":["id","object","agent","agent_id","agent_version_id","status","display_status","tainted","started_by","trigger","input","output","error","attempt","replay_of","created_at","started_at","finished_at"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Agents"],"summary":"List runs, newest first","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":true,"schema":{"default":"-created_at","type":"string","enum":["created_at","-created_at"]}},{"name":"created_after","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"created_before","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":32}},{"name":"agent","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"run"},"agent":{"type":"string"},"agent_id":{"type":["string","null"]},"agent_version_id":{"type":["string","null"]},"status":{"type":"string"},"display_status":{"type":"string","description":"Starting, Working, Waiting on you, Done, Failed or Cancelled"},"tainted":{"type":"boolean","description":"The run read content from outside the company"},"started_by":{"type":["string","null"]},"trigger":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"output":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"error":{"type":["string","null"]},"attempt":{"type":"number"},"replay_of":{"type":["string","null"]},"created_at":{"type":"string","description":"ISO 8601 timestamp"},"started_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"finished_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"number"},"name":{"type":"string"},"effect":{"type":"string","enum":["read","reason","write"]},"tool":{"type":["string","null"]},"status":{"type":"string"},"note":{"type":["string","null"]},"input":{},"output":{},"record_ids":{"type":"array","items":{"type":"string"}},"flags":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"message":{"type":"string"},"source":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}},"usage":{},"started_at":{"type":"string","description":"ISO 8601 timestamp"},"finished_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]}},"required":["id","seq","name","effect","tool","status","note","input","output","record_ids","flags","usage","started_at","finished_at"],"additionalProperties":false}}},"required":["id","object","agent","agent_id","agent_version_id","status","display_status","tainted","started_by","trigger","input","output","error","attempt","replay_of","created_at","started_at","finished_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/runs/{id}":{"get":{"tags":["Agents"],"summary":"Get a run with its effect-tagged step trace","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"run"},"agent":{"type":"string"},"agent_id":{"type":["string","null"]},"agent_version_id":{"type":["string","null"]},"status":{"type":"string"},"display_status":{"type":"string","description":"Starting, Working, Waiting on you, Done, Failed or Cancelled"},"tainted":{"type":"boolean","description":"The run read content from outside the company"},"started_by":{"type":["string","null"]},"trigger":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"output":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"error":{"type":["string","null"]},"attempt":{"type":"number"},"replay_of":{"type":["string","null"]},"created_at":{"type":"string","description":"ISO 8601 timestamp"},"started_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"finished_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"number"},"name":{"type":"string"},"effect":{"type":"string","enum":["read","reason","write"]},"tool":{"type":["string","null"]},"status":{"type":"string"},"note":{"type":["string","null"]},"input":{},"output":{},"record_ids":{"type":"array","items":{"type":"string"}},"flags":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"message":{"type":"string"},"source":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}},"usage":{},"started_at":{"type":"string","description":"ISO 8601 timestamp"},"finished_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]}},"required":["id","seq","name","effect","tool","status","note","input","output","record_ids","flags","usage","started_at","finished_at"],"additionalProperties":false}}},"required":["id","object","agent","agent_id","agent_version_id","status","display_status","tainted","started_by","trigger","input","output","error","attempt","replay_of","created_at","started_at","finished_at"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/runs/{id}/approve":{"post":{"tags":["Agents"],"summary":"Approve the run's pending action and resume it","x-required-scope":"approvals:write","description":"Requires scope `approvals:write`.","security":[{"apiKey":[]},{"oauth2":["approvals:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"resumed":{"type":"boolean","const":true}},"required":["id","resumed"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/runs/{id}/reject":{"post":{"tags":["Agents"],"summary":"Reject the run's pending action; the run ends","x-required-scope":"approvals:write","description":"Requires scope `approvals:write`.","security":[{"apiKey":[]},{"oauth2":["approvals:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"reason":{"type":"string","maxLength":500}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"run"},"agent":{"type":"string"},"agent_id":{"type":["string","null"]},"agent_version_id":{"type":["string","null"]},"status":{"type":"string"},"display_status":{"type":"string","description":"Starting, Working, Waiting on you, Done, Failed or Cancelled"},"tainted":{"type":"boolean","description":"The run read content from outside the company"},"started_by":{"type":["string","null"]},"trigger":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"output":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"error":{"type":["string","null"]},"attempt":{"type":"number"},"replay_of":{"type":["string","null"]},"created_at":{"type":"string","description":"ISO 8601 timestamp"},"started_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"finished_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"number"},"name":{"type":"string"},"effect":{"type":"string","enum":["read","reason","write"]},"tool":{"type":["string","null"]},"status":{"type":"string"},"note":{"type":["string","null"]},"input":{},"output":{},"record_ids":{"type":"array","items":{"type":"string"}},"flags":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"message":{"type":"string"},"source":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}},"usage":{},"started_at":{"type":"string","description":"ISO 8601 timestamp"},"finished_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]}},"required":["id","seq","name","effect","tool","status","note","input","output","record_ids","flags","usage","started_at","finished_at"],"additionalProperties":false}}},"required":["id","object","agent","agent_id","agent_version_id","status","display_status","tainted","started_by","trigger","input","output","error","attempt","replay_of","created_at","started_at","finished_at"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/runs/{id}/cancel":{"post":{"tags":["Agents"],"summary":"Cancel a run that hasn't finished","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"run"},"agent":{"type":"string"},"agent_id":{"type":["string","null"]},"agent_version_id":{"type":["string","null"]},"status":{"type":"string"},"display_status":{"type":"string","description":"Starting, Working, Waiting on you, Done, Failed or Cancelled"},"tainted":{"type":"boolean","description":"The run read content from outside the company"},"started_by":{"type":["string","null"]},"trigger":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"output":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"error":{"type":["string","null"]},"attempt":{"type":"number"},"replay_of":{"type":["string","null"]},"created_at":{"type":"string","description":"ISO 8601 timestamp"},"started_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"finished_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"number"},"name":{"type":"string"},"effect":{"type":"string","enum":["read","reason","write"]},"tool":{"type":["string","null"]},"status":{"type":"string"},"note":{"type":["string","null"]},"input":{},"output":{},"record_ids":{"type":"array","items":{"type":"string"}},"flags":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"message":{"type":"string"},"source":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}},"usage":{},"started_at":{"type":"string","description":"ISO 8601 timestamp"},"finished_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]}},"required":["id","seq","name","effect","tool","status","note","input","output","record_ids","flags","usage","started_at","finished_at"],"additionalProperties":false}}},"required":["id","object","agent","agent_id","agent_version_id","status","display_status","tainted","started_by","trigger","input","output","error","attempt","replay_of","created_at","started_at","finished_at"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/runs/{id}/replay":{"post":{"tags":["Agents"],"summary":"Start a new run with the same agent and input","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"version_id":{"description":"Replay on another version of the agent","type":"string","format":"starts_with","pattern":"^agv_.*"}},"additionalProperties":false}}}},"responses":{"202":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"run"},"agent":{"type":"string"},"agent_id":{"type":["string","null"]},"agent_version_id":{"type":["string","null"]},"status":{"type":"string"},"display_status":{"type":"string","description":"Starting, Working, Waiting on you, Done, Failed or Cancelled"},"tainted":{"type":"boolean","description":"The run read content from outside the company"},"started_by":{"type":["string","null"]},"trigger":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"output":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"error":{"type":["string","null"]},"attempt":{"type":"number"},"replay_of":{"type":["string","null"]},"created_at":{"type":"string","description":"ISO 8601 timestamp"},"started_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"finished_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"steps":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"seq":{"type":"number"},"name":{"type":"string"},"effect":{"type":"string","enum":["read","reason","write"]},"tool":{"type":["string","null"]},"status":{"type":"string"},"note":{"type":["string","null"]},"input":{},"output":{},"record_ids":{"type":"array","items":{"type":"string"}},"flags":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string"},"message":{"type":"string"},"source":{"type":"string"}},"required":["kind","message"],"additionalProperties":false}},"usage":{},"started_at":{"type":"string","description":"ISO 8601 timestamp"},"finished_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]}},"required":["id","seq","name","effect","tool","status","note","input","output","record_ids","flags","usage","started_at","finished_at"],"additionalProperties":false}}},"required":["id","object","agent","agent_id","agent_version_id","status","display_status","tainted","started_by","trigger","input","output","error","attempt","replay_of","created_at","started_at","finished_at"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/policy-decisions":{"get":{"tags":["Agents"],"summary":"Policy engine decisions on agent actions, newest first","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":true,"schema":{"default":"-created_at","type":"string","enum":["created_at","-created_at"]}},{"name":"created_after","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"created_before","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"run_id","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"policy_decision"},"run_id":{"type":["string","null"]},"action_type":{"type":"string"},"effect":{"type":"string"},"decision":{"type":"string","enum":["allow","deny","require_approval"]},"reasons":{"type":"array","items":{"type":"object","properties":{"rule":{"type":"string"},"outcome":{"type":"string"},"message":{"type":"string"}},"required":["rule","outcome","message"],"additionalProperties":false}},"reviewer_id":{"type":["string","null"]},"reviewed_at":{"anyOf":[{"type":"string","description":"ISO 8601 timestamp"},{"type":"null"}]},"review_outcome":{"anyOf":[{"type":"string","enum":["approved","rejected"]},{"type":"null"}]},"created_at":{"type":"string","description":"ISO 8601 timestamp"}},"required":["id","object","run_id","action_type","effect","decision","reasons","reviewer_id","reviewed_at","review_outcome","created_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent-templates":{"get":{"tags":["Agent platform"],"summary":"Browse templates: built-in, shared by your team and imported, by category, role and search","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"category","in":"query","required":false,"schema":{"type":"string","enum":["content","campaigns","research","reporting","operations","other"]}},{"name":"role","in":"query","required":false,"schema":{"type":"string","enum":["founder","marketing","content","growth","ops"]}},{"name":"q","in":"query","required":false,"schema":{"type":"string","maxLength":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["object","data"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent-templates/{key}":{"get":{"tags":["Agent platform"],"summary":"A template: goal, steps, best for, inputs, outputs, integrations with access, approvals, when it runs, what it replaces, FAQ","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","maxLength":80}},{"name":"version","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Agent platform"],"summary":"Archive a team or imported template (agents made from it keep working)","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"archived":{"type":"boolean","const":true}},"required":["archived"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent-templates/{key}/export":{"get":{"tags":["Agent platform"],"summary":"Export a template as a package (spec and its skills) to reuse in another organization or install","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent-templates/import":{"post":{"tags":["Agent platform"],"summary":"Import a template package; its skills are added when missing","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"package":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["package"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/template-catalogs":{"get":{"tags":["Agent platform"],"summary":"Community template catalogs this organization subscribes to (signed feeds, publisher key pinned)","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":200}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"template_catalog"},"name":{"type":"string"},"url":{"type":"string"},"feed_name":{"type":["string","null"]},"key_fingerprint":{"type":"string"},"templates":{"type":"number"},"generated_at":{"type":["string","null"]},"expires_at":{"type":["string","null"]},"expired":{"type":"boolean"},"last_fetched_at":{"type":["string","null"]},"last_error":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","object","name","url","feed_name","key_fingerprint","templates","generated_at","expires_at","expired","last_fetched_at","last_error","created_at"],"additionalProperties":false}},"next_cursor":{"type":["string","null"]}},"required":["object","data","next_cursor"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Agent platform"],"summary":"Subscribe to a signed template catalog (owner): its URL and the publisher's Ed25519 public key; it must verify now","x-required-scope":"integrations:write","description":"Requires scope `integrations:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"url":{"type":"string","maxLength":500,"format":"uri"},"public_key":{"type":"string","minLength":40,"maxLength":1000,"description":"The publisher's Ed25519 public key: base64 of the 32-byte key, or PEM"}},"required":["name","url","public_key"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"template_catalog"},"name":{"type":"string"},"url":{"type":"string"},"feed_name":{"type":["string","null"]},"key_fingerprint":{"type":"string"},"templates":{"type":"number"},"generated_at":{"type":["string","null"]},"expires_at":{"type":["string","null"]},"expired":{"type":"boolean"},"last_fetched_at":{"type":["string","null"]},"last_error":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","object","name","url","feed_name","key_fingerprint","templates","generated_at","expires_at","expired","last_fetched_at","last_error","created_at"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/template-catalogs/{id}/refresh":{"post":{"tags":["Agent platform"],"summary":"Fetch and verify the catalog now (owner)","x-required-scope":"integrations:write","description":"Requires scope `integrations:write`.","security":[{"apiKey":[]},{"oauth2":["integrations:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"template_catalog"},"name":{"type":"string"},"url":{"type":"string"},"feed_name":{"type":["string","null"]},"key_fingerprint":{"type":"string"},"templates":{"type":"number"},"generated_at":{"type":["string","null"]},"expires_at":{"type":["string","null"]},"expired":{"type":"boolean"},"last_fetched_at":{"type":["string","null"]},"last_error":{"type":["string","null"]},"created_at":{"type":"string"}},"required":["id","object","name","url","feed_name","key_fingerprint","templates","generated_at","expires_at","expired","last_fetched_at","last_error","created_at"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/template-catalogs/{id}":{"delete":{"tags":["Agent platform"],"summary":"Unsubscribe (owner); templates already installed stay","x-required-scope":"integrations:write","description":"Requires scope `integrations:write`.","security":[{"apiKey":[]},{"oauth2":["integrations:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/template-catalogs/{id}/templates":{"get":{"tags":["Agent platform"],"summary":"A catalog's templates, with which are installed here and which have updates","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/template-catalogs/{id}/templates/{key}/install":{"post":{"tags":["Agent platform"],"summary":"Install (or update) a catalog template as an imported template; agents made from it start as drafts","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":64}},{"name":"key","in":"path","required":true,"schema":{"type":"string","maxLength":80}}],"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent-org-chart":{"get":{"tags":["Agent platform"],"summary":"Agents by the teammate they report to","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agents/{id}":{"get":{"tags":["Agent platform"],"summary":"An agent: profile, draft spec, integrations and access it needs, current version","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Agent platform"],"summary":"Edit an agent's profile or draft (published versions don't change)","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","maxLength":80},"title":{"type":"string","maxLength":80},"job_description":{"type":"string","maxLength":2000},"manager_user_id":{"type":["string","null"]},"spec":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Agent platform"],"summary":"Archive an agent (its versions and runs are kept)","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agents/{id}/publish":{"post":{"tags":["Agent platform"],"summary":"Publish the draft as a new immutable version, granting the access levels listed (default: everything its tools need)","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"notes":{"type":"string","maxLength":1000},"grants":{"type":"object","propertyNames":{"type":"string","maxLength":40},"additionalProperties":{"type":"array","items":{"type":"string","enum":["reads","writes_new","modifies_existing"]}}}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agents/{id}/versions":{"get":{"tags":["Agent platform"],"summary":"Published versions, newest first","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["object","data"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agents/{id}/diff":{"get":{"tags":["Agent platform"],"summary":"What changed between two versions (or a version and the draft: to=draft)","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}},{"name":"from","in":"query","required":true,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"to","in":"query","required":true,"schema":{"anyOf":[{"type":"string","const":"draft"},{"type":"integer","minimum":1,"maximum":9007199254740991}]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agents/{id}/rollback":{"post":{"tags":["Agent platform"],"summary":"Roll back: publish an earlier version again as the newest","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"version":{"type":"integer","minimum":1,"maximum":9007199254740991},"discard_draft":{"description":"Required when the draft has unpublished changes","type":"boolean"}},"required":["version"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agents/{id}/state":{"post":{"tags":["Agent platform"],"summary":"Set the agent live, pause it, or take it back to ready","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"state":{"type":"string","enum":["ready","live","paused"]}},"required":["state"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agents/{id}/share":{"post":{"tags":["Agent platform"],"summary":"Share the agent's current version as a template for the team","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","maxLength":80},"description":{"type":"string","maxLength":500},"category":{"type":"string","enum":["content","campaigns","research","reporting","operations","other"]},"roles":{"maxItems":5,"type":"array","items":{"type":"string","enum":["founder","marketing","content","growth","ops"]}}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/tools":{"get":{"tags":["Agent platform"],"summary":"Every tool agents (and MCP clients) can call: effect, integration, access level, and the organization's gates","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"compact","in":"query","required":false,"schema":{"description":"true: name, title, effect, description and input names only","type":"string","enum":["true","false"]}},{"name":"integration","in":"query","required":false,"schema":{"description":"Only one area's tools, like social or research","type":"string","pattern":"^[a-z_]{2,40}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["object","data"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/tools/{name}":{"patch":{"tags":["Agent platform"],"summary":"Turn a tool off, require approval before each use, or restrict it to owners","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","maxLength":80}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean"},"require_approval":{"type":"boolean"},"admin_only":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/tools/{name}/history":{"get":{"tags":["Agent platform"],"summary":"Recent changes to a tool's gates","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["object","data"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/skills":{"get":{"tags":["Agent platform"],"summary":"The organization's skills (SKILL.md)","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["object","data"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Agent platform"],"summary":"Add a skill from SKILL.md text or a zip of its directory (replace: true adds a revision)","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"skill_md":{"type":"string","maxLength":200000},"zip_base64":{"description":"Base64 of the zipped skill directory (requests are limited to 1 MB)","type":"string","maxLength":1000000},"replace":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/skills/{name}":{"get":{"tags":["Agent platform"],"summary":"A skill with its current revision","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Agent platform"],"summary":"Archive a skill (agents using it can't be published until it's removed from them)","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"archived":{"type":"boolean","const":true}},"required":["archived"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/skills/{name}/export":{"get":{"tags":["Agent platform"],"summary":"Export as SKILL.md or a zip of the skill directory (base64)","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","maxLength":64}},{"name":"format","in":"query","required":true,"schema":{"default":"md","type":"string","enum":["md","zip"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agents/{id}/triggers":{"get":{"tags":["Agent platform"],"summary":"When the agent runs: schedules, events and webhook URLs","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["object","data"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Agent platform"],"summary":"Add a trigger. Webhook triggers return their URL and secret once.","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"type":"string","enum":["schedule","event","webhook"]},"name":{"type":"string","maxLength":80},"enabled":{"type":"boolean"},"cron":{"description":"Schedules: 5-field cron, read in `timezone`","type":"string","maxLength":100},"timezone":{"description":"IANA time zone, default UTC","type":"string","maxLength":64},"event":{"description":"Events: run.finished, approval.needed, connection.created, connection.failed","type":"string","maxLength":64},"conditions":{"description":"{ all: [...], any: [...] } of { path, op, value } over event.* and record.*","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"input":{"description":"Run input: literals or { \"$ref\": \"event.record_id\" } / body.* / record.values.*","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"dedupe":{"description":"A path whose value makes two firings the same (e.g. event.record_id)","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"max_concurrent":{"type":"integer","minimum":1,"maximum":20},"skill":{"description":"A skill slot of the agent this trigger runs (its instructions lead the run)","anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"dedupe_window_minutes":{"description":"How long a dedupe key holds (default 24 h)","type":"integer","minimum":1,"maximum":10080}},"required":["type"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/triggers/{id}":{"patch":{"tags":["Agent platform"],"summary":"Change a trigger (or turn it off)","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^trg_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"type":{"type":"string","enum":["schedule","event","webhook"]},"name":{"type":"string","maxLength":80},"enabled":{"type":"boolean"},"cron":{"description":"Schedules: 5-field cron, read in `timezone`","type":"string","maxLength":100},"timezone":{"description":"IANA time zone, default UTC","type":"string","maxLength":64},"event":{"description":"Events: run.finished, approval.needed, connection.created, connection.failed","type":"string","maxLength":64},"conditions":{"description":"{ all: [...], any: [...] } of { path, op, value } over event.* and record.*","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"input":{"description":"Run input: literals or { \"$ref\": \"event.record_id\" } / body.* / record.values.*","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"dedupe":{"description":"A path whose value makes two firings the same (e.g. event.record_id)","anyOf":[{"type":"string","maxLength":200},{"type":"null"}]},"max_concurrent":{"type":"integer","minimum":1,"maximum":20},"skill":{"description":"A skill slot of the agent this trigger runs (its instructions lead the run)","anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"dedupe_window_minutes":{"description":"How long a dedupe key holds (default 24 h)","type":"integer","minimum":1,"maximum":10080}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Agent platform"],"summary":"Remove a trigger","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^trg_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/triggers/{id}/rotate-secret":{"post":{"tags":["Agent platform"],"summary":"New secret for a webhook trigger (the old one stops working)","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^trg_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"secret":{"type":"string"}},"required":["secret"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/triggers/{id}/fires":{"get":{"tags":["Agent platform"],"summary":"Recent firings: started, duplicate, busy or agent not live","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^trg_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["object","data"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/events":{"get":{"tags":["Agent platform"],"summary":"Recent platform events (what triggers and webhooks see)","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"type","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["object","data"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/webhooks":{"get":{"tags":["Agent platform"],"summary":"Outbound webhook endpoints","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["object","data"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Agent platform"],"summary":"Add an endpoint. The signing secret (whsec_…) is returned once.","x-required-scope":"security:write","description":"Requires scope `security:write`.","security":[{"apiKey":[]},{"oauth2":["security:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"events":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","maxLength":64}},"description":{"type":"string","maxLength":200}},"required":["url","events"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/webhooks/{id}":{"patch":{"tags":["Agent platform"],"summary":"Change an endpoint, or pause it (enabled: false)","x-required-scope":"security:write","description":"Requires scope `security:write`.","security":[{"apiKey":[]},{"oauth2":["security:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^whe_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"url":{"type":"string","maxLength":2000,"format":"uri"},"events":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"string","maxLength":64}},"description":{"type":"string","maxLength":200},"enabled":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Agent platform"],"summary":"Remove an endpoint and its delivery log","x-required-scope":"security:write","description":"Requires scope `security:write`.","security":[{"apiKey":[]},{"oauth2":["security:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^whe_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/webhooks/{id}/rotate-secret":{"post":{"tags":["Agent platform"],"summary":"New signing secret; the old one also signs for 24 hours (force: true drops it now)","x-required-scope":"security:write","description":"Requires scope `security:write`.","security":[{"apiKey":[]},{"oauth2":["security:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^whe_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"force":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"secret":{"type":"string"}},"required":["secret"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/webhooks/{id}/test":{"post":{"tags":["Agent platform"],"summary":"Send a test event (webhook.test)","x-required-scope":"security:write","description":"Requires scope `security:write`.","security":[{"apiKey":[]},{"oauth2":["security:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^whe_.*"}}],"responses":{"202":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/webhooks/{id}/deliveries":{"get":{"tags":["Agent platform"],"summary":"Deliveries of the last 30 days, newest first","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^whe_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["object","data"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/webhook-deliveries/{id}/resend":{"post":{"tags":["Agent platform"],"summary":"Send a delivery again","x-required-scope":"security:write","description":"Requires scope `security:write`.","security":[{"apiKey":[]},{"oauth2":["security:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^whd_.*"}}],"responses":{"202":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agents/draft-from-goal":{"post":{"tags":["Agent platform"],"summary":"Describe a goal; the model drafts an agent from the registered tools (validated). It's saved as a draft for you to review, test and publish.","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"goal":{"type":"string","minLength":10,"maxLength":2000}},"required":["goal"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agents/{id}/test-run":{"post":{"tags":["Agent platform"],"summary":"Run the draft once now, step by step. Every write it would make waits for your approval.","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"input":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["input"],"additionalProperties":false}}}},"responses":{"202":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/approvals":{"get":{"tags":["Agent platform"],"summary":"The approval inbox: pending (default) or completed items, by agent, kind or assignee (assignee=me)","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"status","in":"query","required":true,"schema":{"default":"pending","type":"string","enum":["pending","completed"]}},{"name":"run_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"agent_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","enum":["action","decision"]}},{"name":"assignee","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"limit","in":"query","required":true,"schema":{"default":100,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/approvals/{id}":{"get":{"tags":["Agent platform"],"summary":"One approval item","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^apr_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/approvals/{id}/decide":{"post":{"tags":["Agent platform"],"summary":"Approve (all calls, some, or edited) or reject an item. People in the web app only; send the version you saw.","x-required-scope":"approvals:write","description":"Requires scope `approvals:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^apr_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"type":"string","enum":["approve","reject"]},"approve":{"maxItems":25,"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}},"edits":{"type":"object","propertyNames":{"type":"string","pattern":"^\\d+$"},"additionalProperties":{}},"choice":{"type":"string","maxLength":200},"reason":{"type":"string","maxLength":1000},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The item's version you saw (optimistic lock)"}},"required":["action","version"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/approvals/{id}/assign":{"post":{"tags":["Agent platform"],"summary":"Give a pending item to someone else to decide","x-required-scope":"approvals:write","description":"Requires scope `approvals:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^apr_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"user_id":{"type":"string","maxLength":64}},"required":["user_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agents/{id}/autonomy":{"put":{"tags":["Agent platform"],"summary":"How much the agent does without a person: approve_all, approve_first, auto_named (with tools), autopilot. Guardrails, outside-content holds and destructive changes apply at every level.","x-required-scope":"agents:write","description":"Requires scope `agents:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"level":{"type":"string","enum":["approve_all","approve_first","auto_named","autopilot"]},"tools":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":80}}},"required":["level"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agents/{id}/code-steps":{"post":{"tags":["Agent platform"],"summary":"Have the model write a code step for a repeated task: it's test-run in the sandbox on your sample input and added to the draft (a person publishes it; then it runs without the model)","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"task":{"type":"string","minLength":5,"maxLength":2000},"language":{"default":"python","type":"string","enum":["python","javascript"]},"sample_input":{},"input_ref":{"type":"string","maxLength":200},"after":{"type":"string","maxLength":80}},"required":["name","task","language","sample_input"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/sandbox/try":{"post":{"tags":["Agent platform"],"summary":"Run code once in the sandbox on an input (no network, no secrets), e.g. to check a code step while editing it (web app)","x-required-scope":"agents:write","description":"Requires scope `agents:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"language":{"type":"string","enum":["python","javascript"]},"source":{"type":"string","minLength":1,"maxLength":20000},"input":{},"timeout_s":{"default":20,"type":"integer","minimum":1,"maximum":60}},"required":["language","source","timeout_s"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agents/{id}/experiment":{"put":{"tags":["Agent platform"],"summary":"A/B test two versions on live runs: the split, the metric (outcome or qa_score), runs needed, and whether the winner is promoted","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"version_a":{"type":"string","format":"starts_with","pattern":"^agv_.*"},"version_b":{"type":"string","format":"starts_with","pattern":"^agv_.*"},"split":{"type":"number","minimum":0.05,"maximum":0.95},"metric":{"type":"string","enum":["outcome","qa_score"]},"min_runs":{"type":"integer","minimum":5,"maximum":10000},"auto_promote":{"type":"boolean"}},"required":["version_a","version_b"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Agent platform"],"summary":"The running (or decided) experiment and each version's metric so far","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Agent platform"],"summary":"Stop the experiment (new runs use the current version)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"stopped":{"type":"boolean","const":true}},"required":["stopped"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/runs/{id}/scorecard":{"get":{"tags":["Agent platform"],"summary":"The run's QA scorecard: checks and the model judge's score against the spec's rubric","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^run_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agents/{id}/evals":{"get":{"tags":["Agent platform"],"summary":"The agent's eval cases and recent suite runs","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Agent platform"],"summary":"Add (or replace, by name) an eval case: an input and what the run must do (owners: cases are the publish gate)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":120},"input":{"default":{},"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"expect":{"default":{},"type":"object","properties":{"status":{"type":"string","enum":["succeeded","failed","waiting_approval"]},"waits_for_approval":{"type":"boolean"},"steps":{"type":"object","propertyNames":{"type":"string","maxLength":80},"additionalProperties":{"type":"object","properties":{"status":{"type":"string","enum":["succeeded","failed","skipped"]},"output_contains":{"type":"string","maxLength":500},"output_lacks":{"type":"string","maxLength":500},"min_calls":{"type":"integer","minimum":0,"maximum":9007199254740991},"max_calls":{"type":"integer","minimum":0,"maximum":9007199254740991}},"additionalProperties":false}}},"additionalProperties":false}},"required":["name","input","expect"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agents/{id}/evals/{caseId}":{"delete":{"tags":["Agent platform"],"summary":"Remove an eval case (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}},{"name":"caseId","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^evc_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agents/{id}/evals/run":{"post":{"tags":["Agent platform"],"summary":"Run the eval suite as dry runs (nothing is written or sent) on the draft, the current version, or a version","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"target":{"default":"draft","type":"string","enum":["draft","current"]},"version_id":{"type":"string","format":"starts_with","pattern":"^agv_.*"},"background":{"default":false,"description":"Queue it (GET /v1/agents/:id/evals lists the result when done)","type":"boolean"}},"required":["target","background"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/telemetry":{"get":{"tags":["Agent platform"],"summary":"Agent telemetry: per agent, runs by status, cost per run and per task, an outcome rate, running now; usage by category","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":true,"schema":{"default":7,"type":"integer","minimum":1,"maximum":90}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agents/{id}/telemetry":{"get":{"tags":["Agent platform"],"summary":"One agent's telemetry per version (compare versions)","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}},{"name":"days","in":"query","required":true,"schema":{"default":30,"type":"integer","minimum":1,"maximum":90}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agents/{id}/budget":{"put":{"tags":["Agent platform"],"summary":"This agent's own daily and monthly model budgets (USD; null removes one). Over budget, its runs pause.","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"daily_usd":{"anyOf":[{"type":"number","minimum":0,"maximum":10000},{"type":"null"}]},"monthly_usd":{"anyOf":[{"type":"number","minimum":0,"maximum":100000},{"type":"null"}]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/settings/approvals":{"put":{"tags":["Agent platform"],"summary":"How long items wait before they expire (1–90 days, or null for never)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expiry_days":{"anyOf":[{"type":"integer","minimum":1,"maximum":90},{"type":"null"}]}},"required":["expiry_days"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expiry_days":{"type":["number","null"]}},"required":["expiry_days"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Agent platform"],"summary":"Approval settings","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"expiry_days":{"type":["number","null"]}},"required":["expiry_days"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agents/{id}/examples":{"get":{"tags":["Agent platform"],"summary":"What the agent learned from people's edits and rejections","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agt_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["object","data"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent-examples/{id}":{"delete":{"tags":["Agent platform"],"summary":"Forget an example","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^agex_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/runs/{id}/steps/{stepId}/revert":{"post":{"tags":["Agent platform"],"summary":"Undo a write step's changes (values changed since are left alone and listed)","x-required-scope":"agents:write","description":"Requires scope `agents:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^run_.*"}},{"name":"stepId","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^stp_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/today":{"get":{"tags":["Agent platform"],"summary":"Today: approvals waiting (tap to decide) and what happened while I was away","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"since","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/push/key":{"get":{"tags":["Agent platform"],"summary":"The Web Push public key (VAPID), or null when push isn't set up","security":[{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/push/subscriptions":{"post":{"tags":["Agent platform"],"summary":"Subscribe this device to push for approvals (the browser's push endpoint only)","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"endpoint":{"type":"string","maxLength":1000,"format":"uri"}},"required":["endpoint"],"additionalProperties":{}}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Agent platform"],"summary":"Unsubscribe this device","security":[{"session":[]}],"parameters":[{"name":"endpoint","in":"query","required":true,"schema":{"type":"string","maxLength":1000,"format":"uri"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/home":{"get":{"tags":["Agent platform"],"summary":"Home: approvals waiting, my agents' recent runs and how many agents are live","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/secrets":{"get":{"tags":["Agent platform"],"summary":"Secret names for workflow HTTP blocks (values are never returned)","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["object","data"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/secrets/{name}":{"put":{"tags":["Agent platform"],"summary":"Set a secret; agents use it as {\"$secret\": \"name\"} and only the call sees its value","x-required-scope":"security:write","description":"Requires scope `security:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,40}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"value":{"type":"string","minLength":1,"maxLength":4000}},"required":["value"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Agent platform"],"summary":"Remove a secret","x-required-scope":"security:write","description":"Requires scope `security:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","maxLength":41}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent/requests":{"post":{"tags":["Your agent"],"summary":"Ask your marketing agent to do something, in your own words","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"text":{"type":"string","minLength":1,"maxLength":20000},"context":{"type":"string","maxLength":20000},"source_id":{"type":"string","minLength":1,"maxLength":200},"wait_s":{"type":"integer","minimum":0,"maximum":25}},"required":["text"],"additionalProperties":false}}}},"responses":{"202":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent/requests/{id}":{"get":{"tags":["Your agent"],"summary":"Where a request to your agent stands: its answer, question, or what waits for a person","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^areq_.*"}},{"name":"wait_s","in":"query","required":false,"schema":{"type":"integer","minimum":0,"maximum":25}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent/requests/{id}/answer":{"post":{"tags":["Your agent"],"summary":"Answer your agent's question; it carries on","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^areq_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"answer":{"type":"string","minLength":1,"maxLength":2000},"wait_s":{"type":"integer","minimum":0,"maximum":25}},"required":["answer"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent/requests/{id}/stop":{"post":{"tags":["Your agent"],"summary":"Stop a request; anything of it still waiting is withdrawn","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^areq_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent/thread":{"get":{"tags":["Your agent"],"summary":"Your conversation with your agent, newest last (30 a page)","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"before","in":"query","required":false,"schema":{"type":"string","pattern":"^areq_[0-9a-z]{26}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent/skills":{"get":{"tags":["Your agent"],"summary":"The jobs your agent knows how to do (its skills)","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent/skills/{name}":{"get":{"tags":["Your agent"],"summary":"One of your agent's skills, with its instructions","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","pattern":"^(org:)?[A-Za-z0-9 _.-]{1,64}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent/standing":{"get":{"tags":["Your agent"],"summary":"Your standing requests (repeating work you asked your agent for)","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent/standing/{id}/start":{"post":{"tags":["Your agent"],"summary":"Start a standing request your agent proposed","x-required-scope":"agents:write","description":"Requires scope `agents:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^asr_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent/standing/{id}/stop":{"post":{"tags":["Your agent"],"summary":"Pause or stop a standing request","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^asr_.*"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"action":{"default":"stop","type":"string","enum":["pause","stop"]}},"required":["action"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent/conversations":{"post":{"tags":["Your agent"],"summary":"Start a conversation with the assistant","x-required-scope":"agents:read","description":"Requires scope `agents:read`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"mode":{"type":"string","enum":["plan","ask","auto"]}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Your agent"],"summary":"Your conversations with the assistant, newest activity first","x-required-scope":"agents:read","description":"Requires scope `agents:read`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":20,"type":"integer","minimum":1,"maximum":50}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","minLength":1,"maxLength":300}},{"name":"archived","in":"query","required":true,"schema":{"default":"false","type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent/conversations/search":{"post":{"tags":["Your agent"],"summary":"Look for your conversations by title (read only; the words stay out of the address)","x-required-scope":"agents:read","description":"Requires scope `agents:read`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"q":{"type":"string","minLength":1,"maxLength":100},"archived":{"default":false,"type":"boolean"},"limit":{"default":20,"type":"integer","minimum":1,"maximum":50},"cursor":{"type":"string","minLength":1,"maxLength":300}},"required":["q","archived","limit"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent/conversations/{id}":{"get":{"tags":["Your agent"],"summary":"One page of a conversation","x-required-scope":"agents:read","description":"Requires scope `agents:read`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"before","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":9007199254740991}},{"name":"limit","in":"query","required":true,"schema":{"default":200,"type":"integer","minimum":1,"maximum":500}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Your agent"],"summary":"Rename, change the mode or credit limit of, make repeat, archive or bring back a conversation","x-required-scope":"agents:read","description":"Requires scope `agents:read`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9_-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"mode":{"type":"string","enum":["plan","ask","auto"]},"credit_limit":{"type":"number","minimum":0,"maximum":1000000000},"archived":{"type":"boolean"},"schedule":{"anyOf":[{"type":"object","properties":{"every":{"type":"string","enum":["day","weekdays","week"]},"days":{"default":[],"maxItems":7,"type":"array","items":{"type":"integer","minimum":0,"maximum":6}},"time":{"type":"string","pattern":"^([01]\\d|2[0-3]):[0-5]\\d$"},"tz":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[A-Za-z0-9_+\\-/]+$"},"text":{"type":"string","minLength":1,"maxLength":2000}},"required":["every","days","time","tz","text"],"additionalProperties":false},{"type":"null"}]},"schedule_paused":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent/conversations/{id}/messages":{"post":{"tags":["Your agent"],"summary":"Send the assistant a message","x-required-scope":"agents:read","description":"Requires scope `agents:read`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9_-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"client_id":{"type":"string","pattern":"^[A-Za-z0-9_-]{8,64}$"},"text":{"type":"string","minLength":1,"maxLength":20000},"context":{"type":"object","properties":{"path":{"type":"string"},"item_id":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9_-]+$"}},"required":["path"],"additionalProperties":false},"attachments":{"maxItems":10,"type":"array","items":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9_-]+$"}},"edits":{"maxItems":10,"type":"array","items":{"type":"object","properties":{"path":{"type":"string"},"label":{"type":"string","minLength":1,"maxLength":200},"fields":{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"value":{"type":"string","maxLength":4000}},"required":["name","value"],"additionalProperties":false}}},"required":["path","label","fields"],"additionalProperties":false}}},"required":["client_id","text"],"additionalProperties":false}}}},"responses":{"202":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent/conversations/{id}/stop":{"post":{"tags":["Your agent"],"summary":"Stop: nothing new starts; a call already running finishes and is reported","x-required-scope":"agents:read","description":"Requires scope `agents:read`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9_-]+$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"202":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/agent/conversations/{id}/events":{"get":{"tags":["Your agent"],"summary":"A conversation's events as they happen (server-sent events, resumable)","x-required-scope":"agents:read","description":"Requires scope `agents:read`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":80,"pattern":"^[A-Za-z0-9_-]+$"}},{"name":"after","in":"query","required":true,"schema":{"default":0,"type":"integer","minimum":0,"maximum":9007199254740991}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/docs/search":{"get":{"tags":["Docs"],"summary":"Search the product's docs and guides: titles, what each covers, and the path to read it with GET /v1/docs/page","security":[{"apiKey":[]},{"oauth2":[]},{"session":[]}],"parameters":[{"name":"q","in":"query","required":true,"schema":{"type":"string","minLength":1,"maxLength":200}},{"name":"limit","in":"query","required":true,"schema":{"default":8,"type":"integer","minimum":1,"maximum":20}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/docs/page":{"get":{"tags":["Docs"],"summary":"One page of the product's docs or guides, as Markdown (a path from GET /v1/docs/search)","security":[{"apiKey":[]},{"oauth2":[]},{"session":[]}],"parameters":[{"name":"path","in":"query","required":true,"schema":{"type":"string","pattern":"^\\/[a-z0-9/_-]{0,200}\\.md$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/settings/ai":{"get":{"tags":["Settings"],"summary":"Model routing per task, bring-your-own key status, outbound switch","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"ai_settings"},"monthly_budget_usd":{"type":["number","null"]},"daily_budget_usd":{"type":["number","null"]},"confirm_step_cost_over_usd":{"type":["number","null"]},"routes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"model":{"type":"string"},"effort":{"type":"string"}},"required":["model","effort"],"additionalProperties":false}},"overrides":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"model":{"type":"string"},"effort":{"type":"string"}},"additionalProperties":false}},"agent_models":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your marketing agent's model by area (lifecycle) or playbook (skill:plan-a-campaign), once that playbook is loaded; unset ones use the agent task's model"},"agent_models_default":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"The installation's own per-area agent models, used where the organization sets none"},"has_own_key":{"type":"boolean"},"outbound_enabled":{"type":"boolean"},"semantic_search":{"type":"object","properties":{"available":{"type":"boolean"},"on":{"type":"boolean"}},"required":["available","on"],"additionalProperties":false},"data_use":{"type":"object","properties":{"data_region":{"type":"string"},"zero_retention_required":{"type":"boolean"},"providers_denied":{"type":"array","items":{"type":"string"}},"no_training":{"type":"string"},"providers":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"label":{"type":"string"},"regions":{"type":"array","items":{"type":"string"}},"zero_retention_arrangement":{"type":"boolean"},"used":{"type":"boolean"},"refusal":{"type":["string","null"]}},"required":["provider","label","regions","zero_retention_arrangement","used","refusal"],"additionalProperties":false}}},"required":["data_region","zero_retention_required","providers_denied","no_training","providers"],"additionalProperties":false},"spend_guard":{"type":"object","properties":{"daily_budget_default_usd":{"type":"number"},"daily_budget_default_per_person_usd":{"type":"number"},"daily_budget_effective_usd":{"type":"number"},"daily_budget_covers":{"type":"string","enum":["all_ai","model_calls"]},"spent_today_usd":{"type":"number"},"over_daily_budget":{"type":"boolean"},"resets_at":{"type":"string"},"background_paused":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","const":"spike"},"calls_per_minute":{"type":["number","null"]},"since":{"type":"string"},"until":{"type":"string"}},"required":["reason","calls_per_minute","since","until"],"additionalProperties":false},{"type":"null"}]},"spike_calls_per_minute":{"type":"number"}},"required":["daily_budget_default_usd","daily_budget_default_per_person_usd","daily_budget_effective_usd","daily_budget_covers","spent_today_usd","over_daily_budget","resets_at","background_paused","spike_calls_per_minute"],"additionalProperties":false},"local_model":{"type":"object","properties":{"offered":{"type":"boolean"},"running":{"type":["boolean","null"]},"status":{"type":["string","null"]},"fallback_to_claude":{"type":"boolean"}},"required":["offered","running","status","fallback_to_claude"],"additionalProperties":false}},"required":["object","monthly_budget_usd","daily_budget_usd","confirm_step_cost_over_usd","routes","overrides","agent_models","agent_models_default","has_own_key","outbound_enabled","semantic_search","data_use","spend_guard","local_model"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Settings"],"summary":"Update model routing, your own Anthropic key, or the outbound switch (owner)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"overrides":{"type":"object","propertyNames":{"type":"string","enum":["classify","extract","draft","research","agent","assistant","plan","live"]},"additionalProperties":{"type":"object","properties":{"model":{"description":"A Claude model, or \"local\" for the deployment's local model (when it offers one)","type":"string","enum":["claude-opus-5-5","claude-opus-5","claude-sonnet-5-5","claude-sonnet-5","claude-haiku-5-5","claude-fable-5-1","local"]},"effort":{"type":"string","enum":["low","medium","high","xhigh","max"]}},"additionalProperties":false}},"agent_models":{"description":"Your marketing agent's model by area (\"lifecycle\") or playbook (\"skill:plan-a-campaign\"); replaces the whole map. Applies from the turn after that playbook is loaded","type":"object","propertyNames":{"type":"string","pattern":"^(?:[a-z]{2,20}|skill:(?:org:)?[a-z0-9-]{1,64})$"},"additionalProperties":{"type":"string","enum":["claude-opus-5-5","claude-opus-5","claude-sonnet-5-5","claude-sonnet-5","claude-haiku-5-5","claude-fable-5-1","local"]}},"agent_name":{"description":"What your marketing agent is called (null goes back to the suggested name)","anyOf":[{"type":"string","minLength":1,"maxLength":40,"pattern":"^[\\p{L}\\p{N} .'-]+$"},{"type":"null"}]},"anthropic_api_key":{"description":"Set to null to remove your own key","anyOf":[{"type":"string","minLength":20,"maxLength":300},{"type":"null"}]},"outbound_enabled":{"type":"boolean"},"monthly_budget_usd":{"description":"Monthly model spend cap in USD; null removes the cap","anyOf":[{"type":"number","minimum":0,"maximum":100000},{"type":"null"}]},"daily_budget_usd":{"description":"Daily model spend cap in USD (UTC day); AI work over it pauses until the next day. null goes back to the default: $5 a day for each person in the organization, for model calls","anyOf":[{"type":"number","minimum":0,"maximum":10000},{"type":"null"}]},"confirm_step_cost_over_usd":{"description":"A reasoning step estimated to cost more than this waits for a person to confirm","anyOf":[{"type":"number","minimum":0.01,"maximum":1000},{"type":"null"}]},"semantic_search":{"description":"Semantic search: document and knowledge base text is embedded by Voyage AI. Off removes stored embeddings","type":"boolean"},"zero_retention_required":{"description":"Send text only to providers with a zero-data-retention arrangement (or your own key); others are refused","type":"boolean"},"providers_denied":{"description":"Model providers this organization's data must never go to","maxItems":10,"type":"array","items":{"type":"string","enum":["anthropic","voyage"]}},"local_fallback_to_claude":{"description":"When a task routed to the local model can't run there (not running, or it needs web search, images or a longer context), send it to Claude instead (billed). Off: the task fails and says why","type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"ai_settings"},"monthly_budget_usd":{"type":["number","null"]},"daily_budget_usd":{"type":["number","null"]},"confirm_step_cost_over_usd":{"type":["number","null"]},"routes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"model":{"type":"string"},"effort":{"type":"string"}},"required":["model","effort"],"additionalProperties":false}},"overrides":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"model":{"type":"string"},"effort":{"type":"string"}},"additionalProperties":false}},"agent_models":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your marketing agent's model by area (lifecycle) or playbook (skill:plan-a-campaign), once that playbook is loaded; unset ones use the agent task's model"},"agent_models_default":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"The installation's own per-area agent models, used where the organization sets none"},"has_own_key":{"type":"boolean"},"outbound_enabled":{"type":"boolean"},"semantic_search":{"type":"object","properties":{"available":{"type":"boolean"},"on":{"type":"boolean"}},"required":["available","on"],"additionalProperties":false},"data_use":{"type":"object","properties":{"data_region":{"type":"string"},"zero_retention_required":{"type":"boolean"},"providers_denied":{"type":"array","items":{"type":"string"}},"no_training":{"type":"string"},"providers":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"label":{"type":"string"},"regions":{"type":"array","items":{"type":"string"}},"zero_retention_arrangement":{"type":"boolean"},"used":{"type":"boolean"},"refusal":{"type":["string","null"]}},"required":["provider","label","regions","zero_retention_arrangement","used","refusal"],"additionalProperties":false}}},"required":["data_region","zero_retention_required","providers_denied","no_training","providers"],"additionalProperties":false},"spend_guard":{"type":"object","properties":{"daily_budget_default_usd":{"type":"number"},"daily_budget_default_per_person_usd":{"type":"number"},"daily_budget_effective_usd":{"type":"number"},"daily_budget_covers":{"type":"string","enum":["all_ai","model_calls"]},"spent_today_usd":{"type":"number"},"over_daily_budget":{"type":"boolean"},"resets_at":{"type":"string"},"background_paused":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","const":"spike"},"calls_per_minute":{"type":["number","null"]},"since":{"type":"string"},"until":{"type":"string"}},"required":["reason","calls_per_minute","since","until"],"additionalProperties":false},{"type":"null"}]},"spike_calls_per_minute":{"type":"number"}},"required":["daily_budget_default_usd","daily_budget_default_per_person_usd","daily_budget_effective_usd","daily_budget_covers","spent_today_usd","over_daily_budget","resets_at","background_paused","spike_calls_per_minute"],"additionalProperties":false},"local_model":{"type":"object","properties":{"offered":{"type":"boolean"},"running":{"type":["boolean","null"]},"status":{"type":["string","null"]},"fallback_to_claude":{"type":"boolean"}},"required":["offered","running","status","fallback_to_claude"],"additionalProperties":false}},"required":["object","monthly_budget_usd","daily_budget_usd","confirm_step_cost_over_usd","routes","overrides","agent_models","agent_models_default","has_own_key","outbound_enabled","semantic_search","data_use","spend_guard","local_model"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/settings/ai/resume-background":{"post":{"tags":["Settings"],"summary":"Resume background AI paused after a spike in model calls (owner)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"ai_settings"},"monthly_budget_usd":{"type":["number","null"]},"daily_budget_usd":{"type":["number","null"]},"confirm_step_cost_over_usd":{"type":["number","null"]},"routes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"model":{"type":"string"},"effort":{"type":"string"}},"required":["model","effort"],"additionalProperties":false}},"overrides":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"model":{"type":"string"},"effort":{"type":"string"}},"additionalProperties":false}},"agent_models":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"Your marketing agent's model by area (lifecycle) or playbook (skill:plan-a-campaign), once that playbook is loaded; unset ones use the agent task's model"},"agent_models_default":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"},"description":"The installation's own per-area agent models, used where the organization sets none"},"has_own_key":{"type":"boolean"},"outbound_enabled":{"type":"boolean"},"semantic_search":{"type":"object","properties":{"available":{"type":"boolean"},"on":{"type":"boolean"}},"required":["available","on"],"additionalProperties":false},"data_use":{"type":"object","properties":{"data_region":{"type":"string"},"zero_retention_required":{"type":"boolean"},"providers_denied":{"type":"array","items":{"type":"string"}},"no_training":{"type":"string"},"providers":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"label":{"type":"string"},"regions":{"type":"array","items":{"type":"string"}},"zero_retention_arrangement":{"type":"boolean"},"used":{"type":"boolean"},"refusal":{"type":["string","null"]}},"required":["provider","label","regions","zero_retention_arrangement","used","refusal"],"additionalProperties":false}}},"required":["data_region","zero_retention_required","providers_denied","no_training","providers"],"additionalProperties":false},"spend_guard":{"type":"object","properties":{"daily_budget_default_usd":{"type":"number"},"daily_budget_default_per_person_usd":{"type":"number"},"daily_budget_effective_usd":{"type":"number"},"daily_budget_covers":{"type":"string","enum":["all_ai","model_calls"]},"spent_today_usd":{"type":"number"},"over_daily_budget":{"type":"boolean"},"resets_at":{"type":"string"},"background_paused":{"anyOf":[{"type":"object","properties":{"reason":{"type":"string","const":"spike"},"calls_per_minute":{"type":["number","null"]},"since":{"type":"string"},"until":{"type":"string"}},"required":["reason","calls_per_minute","since","until"],"additionalProperties":false},{"type":"null"}]},"spike_calls_per_minute":{"type":"number"}},"required":["daily_budget_default_usd","daily_budget_default_per_person_usd","daily_budget_effective_usd","daily_budget_covers","spent_today_usd","over_daily_budget","resets_at","background_paused","spike_calls_per_minute"],"additionalProperties":false},"local_model":{"type":"object","properties":{"offered":{"type":"boolean"},"running":{"type":["boolean","null"]},"status":{"type":["string","null"]},"fallback_to_claude":{"type":"boolean"}},"required":["offered","running","status","fallback_to_claude"],"additionalProperties":false}},"required":["object","monthly_budget_usd","daily_budget_usd","confirm_step_cost_over_usd","routes","overrides","agent_models","agent_models_default","has_own_key","outbound_enabled","semantic_search","data_use","spend_guard","local_model"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/settings/notifications":{"get":{"tags":["Settings"],"summary":"Organization notification defaults","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email_owners_on_run_failed":{"type":"boolean"},"email_owners_on_approval_needed":{"type":"boolean"},"daily_digest":{"type":"boolean"},"object":{"type":"string","const":"notification_settings"}},"required":["email_owners_on_run_failed","email_owners_on_approval_needed","daily_digest","object"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Settings"],"summary":"Update organization notification defaults (owner)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email_owners_on_run_failed":{"type":"boolean"},"email_owners_on_approval_needed":{"type":"boolean"},"daily_digest":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email_owners_on_run_failed":{"type":"boolean"},"email_owners_on_approval_needed":{"type":"boolean"},"daily_digest":{"type":"boolean"},"object":{"type":"string","const":"notification_settings"}},"required":["email_owners_on_run_failed","email_owners_on_approval_needed","daily_digest","object"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/usage/llm":{"get":{"tags":["Settings"],"summary":"Model usage and estimated cost this calendar month (UTC)","x-required-scope":"billing:read","description":"Requires scope `billing:read`.","security":[{"apiKey":[]},{"oauth2":["billing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"llm_usage"},"period_start":{"type":"string"},"by_model":{"type":"array","items":{"type":"object","properties":{"model":{"type":"string"},"input_tokens":{"type":"number"},"output_tokens":{"type":"number"},"cost_usd":{"type":"number"}},"required":["model","input_tokens","output_tokens","cost_usd"],"additionalProperties":false}},"total_cost_usd":{"type":"number"},"budget_usd":{"type":["number","null"]}},"required":["object","period_start","by_model","total_cost_usd","budget_usd"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/notifications":{"get":{"tags":["Notifications"],"summary":"Your notifications (in-app), newest first, with the unread count","security":[{"session":[]}],"parameters":[{"name":"unread","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/notifications/read":{"post":{"tags":["Notifications"],"summary":"Mark notifications read (ids, or all)","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ids":{"maxItems":200,"type":"array","items":{"type":"string","format":"starts_with","pattern":"^ntf_.*"}},"all":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"unread":{"type":"number"}},"required":["unread"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/me/notification-preferences":{"get":{"tags":["Notifications"],"summary":"Each event × channel for you: on or off, and whether your organization decides it","security":[{"apiKey":[]},{"oauth2":[]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Notifications"],"summary":"Turn one event × channel on or off for yourself (never past your organization's lock)","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"event":{"type":"string","maxLength":64},"channel":{"type":"string","enum":["in_app","email","slack"]},"enabled":{"type":"boolean"}},"required":["event","channel","enabled"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/settings/notification-policy":{"get":{"tags":["Notifications"],"summary":"The organization's notification policy: events, channels, on by default and force off","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"events":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"channels":{"type":"array","items":{"type":"string"}},"matrix":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"slack_alerts":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"slack_alerts_available":{"type":"boolean"}},"required":["events","channels","matrix","slack_alerts","slack_alerts_available"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Notifications"],"summary":"Set the organization's defaults and locks per event × channel (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"matrix":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"object","propertyNames":{"type":"string","enum":["in_app","email","slack"]},"additionalProperties":{"type":"object","properties":{"default_on":{"type":"boolean"},"force_off":{"type":"boolean"}},"additionalProperties":false}}}},"required":["matrix"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"matrix":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["matrix"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/settings/slack-alerts":{"put":{"tags":["Notifications"],"summary":"The chat channel team-wide alerts go to once a chat app is connected (owners): run failed, webhook failing, approval waiting","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel":{"anyOf":[{"type":"string","pattern":"^[CG][A-Z0-9]{6,20}$"},{"type":"null"}]},"events":{"maxItems":10,"type":"array","items":{"type":"string","enum":["run_failed","webhook_failing","approval_waiting"]}}},"required":["channel","events"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/me/settings":{"get":{"tags":["Notifications"],"summary":"Your time zone and morning brief time","security":[{"apiKey":[]},{"oauth2":[]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"timezone":{"type":"string"},"brief_time":{"type":"string"},"brief_enabled":{"type":"boolean"}},"required":["timezone","brief_time","brief_enabled"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Notifications"],"summary":"Set your time zone and morning brief time (HH:MM, your time)","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"timezone":{"type":"string","maxLength":64},"brief_time":{"type":"string","pattern":"^([01][0-9]|2[0-3]):[0-5][0-9]$"},"brief_enabled":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/kb":{"get":{"tags":["Knowledge base"],"summary":"The company knowledge base: sections (positioning, products, proof points, voice, audience, claims, playbooks…) and the suggested ones not written yet","x-required-scope":"knowledge:read","description":"Requires scope `knowledge:read`.","security":[{"apiKey":[]},{"oauth2":["knowledge:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/kb/{key}":{"get":{"tags":["Knowledge base"],"summary":"One section with its revisions","x-required-scope":"knowledge:read","description":"Requires scope `knowledge:read`.","security":[{"apiKey":[]},{"oauth2":["knowledge:read"]},{"session":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9_-]{1,40}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Knowledge base"],"summary":"Write a section (owners: every agent reads it; each save is a new version; send the version you edited)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9_-]{1,40}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","maxLength":120},"body":{"type":"string","maxLength":50000},"version":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"audience":{"description":"public: replies to customers and the website chat may answer from it; internal (the default): agents only","type":"string","enum":["internal","public"]}},"required":["body"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Knowledge base"],"summary":"Archive a section: agents stop reading it, its revisions stay, and saving it again brings it back (not a permanent delete)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-z][a-z0-9_-]{1,40}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"type":"string"},"archived":{"type":"boolean","const":true}},"required":["key","archived"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/schemas":{"get":{"tags":["Meta"],"summary":"List resources that have a JSON Schema","security":[{"apiKey":[]},{"oauth2":[]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"resource":{"type":"string"},"url":{"type":"string"}},"required":["resource","url"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/schemas/{resource}":{"get":{"tags":["Meta"],"summary":"JSON Schema for one resource","security":[{"apiKey":[]},{"oauth2":[]},{"session":[]}],"parameters":[{"name":"resource","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"resource":{"type":"string"},"object":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"create":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"update":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["resource","object","create","update"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/me/limits":{"get":{"tags":["Account"],"summary":"Your plan's limits before you reach them: how much of each is used, when it resets, what stops when it's reached and what still works","security":[{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/jobs/{id}":{"get":{"tags":["Jobs"],"summary":"Read a long call's job: running, or its answer (a draft, a set of drafts, a plan) once it finished","security":[{"apiKey":[]},{"oauth2":[]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^job_[a-z0-9]{26}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/oauth-apps":{"get":{"tags":["OAuth apps"],"summary":"List partner OAuth apps registered for this organization (owner)","x-required-scope":"keys:write","description":"Requires scope `keys:write`.","security":[{"apiKey":[]},{"oauth2":["keys:write"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}},{"name":"sort","in":"query","required":true,"schema":{"default":"-created_at","type":"string","enum":["created_at","-created_at"]}},{"name":"created_after","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}},{"name":"created_before","in":"query","required":false,"schema":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z|([+-](?:[01]\\d|2[0-3]):[0-5]\\d)))$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"oauth_app"},"dynamic":{"type":"boolean"},"name":{"type":"string"},"client_id":{"type":"string"},"confidential":{"type":"boolean"},"redirect_uris":{"type":"array","items":{"type":"string"}},"scopes":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string"},"revoked_at":{"type":["string","null"]}},"required":["id","object","dynamic","name","client_id","confidential","redirect_uris","scopes","created_at","revoked_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["OAuth apps"],"summary":"Register a partner OAuth app. A confidential app's secret is shown once.","x-required-scope":"keys:write","description":"Requires scope `keys:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80},"redirect_uris":{"minItems":1,"maxItems":10,"type":"array","items":{"type":"string","format":"uri"}},"scopes":{"minItems":1,"maxItems":60,"type":"array","items":{"type":"string","maxLength":64}},"confidential":{"default":true,"type":"boolean"}},"required":["name","redirect_uris","scopes","confidential"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"oauth_app"},"dynamic":{"type":"boolean"},"name":{"type":"string"},"client_id":{"type":"string"},"confidential":{"type":"boolean"},"redirect_uris":{"type":"array","items":{"type":"string"}},"scopes":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string"},"revoked_at":{"type":["string","null"]},"client_secret":{"type":["string","null"]}},"required":["id","object","dynamic","name","client_id","confidential","redirect_uris","scopes","created_at","revoked_at","client_secret"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/oauth-apps/{id}":{"delete":{"tags":["OAuth apps"],"summary":"Revoke a partner app and every token it holds","x-required-scope":"keys:write","description":"Requires scope `keys:write`.","security":[{"apiKey":[]},{"oauth2":["keys:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"oauth_app"},"dynamic":{"type":"boolean"},"name":{"type":"string"},"client_id":{"type":"string"},"confidential":{"type":"boolean"},"redirect_uris":{"type":"array","items":{"type":"string"}},"scopes":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string"},"revoked_at":{"type":["string","null"]}},"required":["id","object","dynamic","name","client_id","confidential","redirect_uris","scopes","created_at","revoked_at"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/oauth/authorize-info":{"get":{"tags":["OAuth apps"],"summary":"Describe a pending authorization request (for the consent screen)","security":[{"session":[]}],"parameters":[{"name":"client_id","in":"query","required":true,"schema":{"type":"string"}},{"name":"redirect_uri","in":"query","required":true,"schema":{"type":"string"}},{"name":"scope","in":"query","required":true,"schema":{"default":"","type":"string"}},{"name":"resource","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"app_name":{"type":"string"},"organization_id":{"type":"string"},"verified":{"type":"boolean"},"client_uri":{"type":["string","null"]},"redirect_host":{"type":"string"},"scopes":{"type":"array","items":{"type":"object","properties":{"scope":{"type":"string"},"description":{"type":"string"}},"required":["scope","description"],"additionalProperties":false}},"ops_host":{"description":"For scopes granted only on another host, the host to consent on instead","type":["string","null"]}},"required":["app_name","organization_id","verified","client_uri","redirect_host","scopes"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/oauth/decision":{"post":{"tags":["OAuth apps"],"summary":"Approve or deny an authorization request; returns where to send the browser","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"client_id":{"type":"string"},"redirect_uri":{"type":"string"},"scope":{"default":"","type":"string"},"state":{"type":"string","maxLength":500},"code_challenge":{"type":"string","pattern":"^[A-Za-z0-9_-]{43,128}$"},"code_challenge_method":{"type":"string","const":"S256"},"approve":{"type":"boolean"},"resource":{"description":"RFC 8707: the MCP server's URL for MCP clients","type":"string","format":"uri"},"organization_id":{"description":"The organization the consent screen showed (authorize-info's organization_id); refused if the active organization has changed since","type":"string","minLength":1,"maxLength":80}},"required":["client_id","redirect_uri","scope","code_challenge","code_challenge_method","approve"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"redirect_to":{"type":"string"}},"required":["redirect_to"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/oauth/grants":{"get":{"tags":["OAuth apps"],"summary":"Apps you've connected to this organization","security":[{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"client_id":{"type":"string"},"app_name":{"type":"string"},"scopes":{"type":"array","items":{"type":"string"}},"created_at":{"type":"string"},"last_used_at":{"type":["string","null"]}},"required":["client_id","app_name","scopes","created_at","last_used_at"],"additionalProperties":false}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data","has_more","next_cursor"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/oauth/grants/{client_id}":{"delete":{"tags":["OAuth apps"],"summary":"Disconnect an app you authorized (revokes your tokens for it)","security":[{"session":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"client_id":{"type":"string"},"revoked":{"type":"boolean","const":true}},"required":["client_id","revoked"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/oauth/connected-apps":{"get":{"tags":["OAuth apps"],"summary":"Apps people in this organization have connected (owners), with who and when","x-required-scope":"keys:write","description":"Requires scope `keys:write`.","security":[{"apiKey":[]},{"oauth2":["keys:write"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"client_id":{"type":"string"},"app_name":{"type":"string"},"verified":{"type":"boolean"},"people":{"type":"number"},"scopes":{"type":"array","items":{"type":"string"}},"last_used_at":{"type":["string","null"]}},"required":["client_id","app_name","verified","people","scopes","last_used_at"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/oauth/connected-apps/{client_id}":{"delete":{"tags":["OAuth apps"],"summary":"Disconnect an app for everyone in this organization (revokes its tokens here)","x-required-scope":"keys:write","description":"Requires scope `keys:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"client_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"client_id":{"type":"string"},"revoked":{"type":"number"}},"required":["client_id","revoked"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/settings/oauth":{"put":{"tags":["OAuth apps"],"summary":"Whether people may authorize self-registered (dynamic) apps such as MCP clients (owners; on by default)","x-required-scope":"security:write","description":"Requires scope `security:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"dynamic_clients":{"type":"boolean"}},"required":["dynamic_clients"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"dynamic_clients":{"type":"boolean"}},"required":["dynamic_clients"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/oauth/device":{"get":{"tags":["OAuth apps"],"summary":"The CLI sign-in waiting for this code: the app, where and when it was asked for, and the scopes you'd grant in the active organization","security":[{"session":[]}],"parameters":[{"name":"user_code","in":"query","required":true,"schema":{"type":"string","maxLength":20}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"device_request"},"app_name":{"type":"string"},"user_code":{"type":"string"},"organization_id":{"type":"string"},"expires_at":{"type":"string"},"requested_from":{"description":"The address the sign-in was requested from (IPv6 as its /64)","type":["string","null"]},"requested_at":{"type":"string"},"requested_ago":{"type":"string"},"user_agent":{"type":["string","null"]},"scopes":{"type":"array","items":{"type":"object","properties":{"scope":{"type":"string"},"description":{"type":"string"}},"required":["scope","description"],"additionalProperties":false},"description":"Granted on approval"},"elevated":{"type":"array","items":{"type":"object","properties":{"scope":{"type":"string"},"description":{"type":"string"}},"required":["scope","description"],"additionalProperties":false},"description":"Sending and owner scopes: granted only if you opt in (allow_elevated) with a recent sign-in"},"not_granted":{"type":"array","items":{"type":"string"},"description":"Requested scopes you don't hold here (left out)"}},"required":["object","app_name","user_code","organization_id","expires_at","requested_from","requested_at","requested_ago","user_agent","scopes","elevated","not_granted"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/oauth/device/decision":{"post":{"tags":["OAuth apps"],"summary":"Approve or deny a CLI sign-in for the active organization (signed in, in the web app). Sending and owner scopes need allow_elevated and your password again. Audited.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"user_code":{"type":"string","maxLength":20},"approve":{"type":"boolean"},"allow_elevated":{"default":false,"description":"Also grant the sending and owner scopes it asked for (with password)","type":"boolean"},"password":{"description":"Your password, again: required with allow_elevated","type":"string","minLength":1,"maxLength":200},"organization_id":{"description":"The organization the consent screen showed (authorize-info's organization_id); refused if the active organization has changed since","type":"string","minLength":1,"maxLength":80}},"required":["user_code","approve","allow_elevated"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"device_decision"},"status":{"type":"string","enum":["approved","denied"]},"scopes":{"type":"array","items":{"type":"string"}}},"required":["object","status","scopes"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mcp-servers":{"get":{"tags":["MCP servers"],"summary":"Remote MCP servers your agents may use, with their tools and how each is classified","x-required-scope":"agents:read","description":"Requires scope `agents:read`.","security":[{"apiKey":[]},{"oauth2":["agents:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["object","data"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["MCP servers"],"summary":"Connect a remote MCP server (Streamable HTTP, https), optionally sending an organization secret in a header; its tools are discovered","x-required-scope":"security:write","description":"Requires scope `security:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"slug":{"type":"string","maxLength":31},"name":{"type":"string","minLength":1,"maxLength":80},"url":{"type":"string","maxLength":2000,"format":"uri"},"auth_header":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"secret_name":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]}},"required":["slug","name","url"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mcp-servers/{id}/discover":{"post":{"tags":["MCP servers"],"summary":"Read the server's tools again (new tools start as writes that need a person)","x-required-scope":"security:write","description":"Requires scope `security:write`.","security":[{"apiKey":[]},{"oauth2":["security:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^msv_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mcp-servers/{id}/tools/{tool}":{"patch":{"tags":["MCP servers"],"summary":"Classify a tool (read: agents may call it through mcp.read without review) or turn it off","x-required-scope":"security:write","description":"Requires scope `security:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^msv_.*"}},{"name":"tool","in":"path","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"effect":{"type":"string","enum":["read","write"]},"enabled":{"type":"boolean"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/mcp-servers/{id}":{"delete":{"tags":["MCP servers"],"summary":"Disconnect an MCP server","x-required-scope":"security:write","description":"Requires scope `security:write`.","security":[{"apiKey":[]},{"oauth2":["security:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","format":"starts_with","pattern":"^msv_.*"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"deleted":{"type":"boolean","const":true}},"required":["id","deleted"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/integrations":{"get":{"tags":["Integrations"],"summary":"Available integrations (and whether each is available) plus your organization's connections","x-required-scope":"connections:read","description":"Requires scope `connections:read`.","security":[{"apiKey":[]},{"oauth2":["connections:read"]},{"session":[]}],"parameters":[{"name":"view","in":"query","required":false,"schema":{"description":"compact (the default for assistants over MCP): the connections and what can be connected here, short; full (the default otherwise): the whole catalog with scopes, cards and setup","type":"string","enum":["compact","full"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","anyOf":[{"type":"object","properties":{"providers":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"},"scope":{"type":"string","enum":["user","org"]},"auth":{"type":"string"},"configured":{"type":"boolean"},"pulls":{"type":"boolean","description":"true when the server pulls on a schedule (Sync now applies); false for push/webhook-only"},"calendars":{"type":"boolean","description":"true when you can choose which calendars sync"},"webhook":{"type":"boolean","description":"true when the provider can push events to the connection's webhook URL"},"sandbox":{"type":"boolean","description":"Connect completes against this provider's stand-in on this machine (development installations only)"},"before":{"anyOf":[{"type":"object","properties":{"label":{"type":"string"},"help":{"type":["string","null"]},"placeholder":{"type":["string","null"]}},"required":["label","help","placeholder"],"additionalProperties":false},{"type":"null"}],"description":"Asked before the sign-in, when the provider's address depends on it (a Shopify shop): send it as account_before"},"credentials":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"label":{"type":"string"},"hint":{"type":["string","null"]},"required":{"type":"boolean"},"multiline":{"type":"boolean"},"secret":{"type":"boolean"},"options":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["key","label","hint","required","multiline","secret","options"],"additionalProperties":false},"description":"Secrets the connection takes. Key/webhook providers: what the connect form asks for. OAuth providers connect through sign-in; any fields here are optional extras (such as a webhook secret) added after connecting with PUT /v1/connections/:id/secrets"},"description":{"type":"string"}},"required":["key","name","category","scope","auth","configured","pulls","calendars","webhook","sandbox","before","credentials","description"],"additionalProperties":false}},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"connection"},"provider":{"type":"string"},"provider_name":{"type":"string"},"category":{"type":"string"},"scope":{"type":"string","enum":["user","org"]},"spend_checks":{"description":"An ad platform's connection: paid media's spending checks and the automatic pause at a ceiling keep using it while syncing is paused","type":"boolean"},"user_id":{"type":["string","null"]},"external_account":{"type":["string","null"]},"status":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"last_synced_at":{"type":["string","null"]},"last_error":{"type":["string","null"]},"created_at":{"type":"string"},"sync_paused_until":{"description":"The provider asked us to slow down: syncing resumes on its own at this time (nothing is lost)","type":["string","null"]},"hidden_settings":{"description":"Settings that decide where a saved secret is sent (such as a webhook address): shown to owners in the app only","type":"array","items":{"type":"string"}},"sandbox":{"type":"boolean","description":"A sandbox connection: made against the provider's stand-in on a development installation, never the real account"},"webhook_url":{"description":"Where the provider sends this connection's events (give it to the provider, with the signing secret it shows); null when it pushes nothing here","type":["string","null"]}},"required":["id","object","provider","provider_name","category","scope","user_id","external_account","status","settings","last_synced_at","last_error","created_at","sync_paused_until","sandbox"],"additionalProperties":false}},"cards":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"kind":{"type":"string","enum":["ads","search","analytics","store","messaging","social","content","planning"]},"method":{"type":"string","enum":["oauth","key","own","builtin","none"]},"state":{"type":"string","enum":["connect","not_set_up","connected","paused","own","builtin","held"],"description":"connect: can be connected; not_set_up: not offered on this installation; own: connected elsewhere in the product (href); builtin: nothing to connect; held: not offered for now"},"description":{"type":"string"},"setup":{"description":"Always null: a connector is set up for this installation, not from here","type":["string","null"]},"sandbox":{"type":"boolean"},"href":{"type":["string","null"]},"account_label":{"description":"What the account step asks for; null when there is nothing to choose","type":["string","null"]},"accounts":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"sandbox":{"type":"boolean"}},"required":["id","name","sandbox"],"additionalProperties":false}}},"required":["key","name","kind","method","state","description","setup","sandbox","href","account_label","accounts"],"additionalProperties":false},"description":"One card per marketing connector, grouped by kind (ads, search, analytics, store, messaging, social, content, planning), not-set-up ones last in each group"},"sandbox":{"type":"boolean","description":"This installation connects to providers' stand-ins (development only)"}},"required":["providers","connections","cards","sandbox"],"additionalProperties":false},{"type":"object","properties":{"view":{"type":"string","const":"compact"},"connections":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"provider":{"type":"string"},"name":{"type":"string"},"status":{"type":"string"},"account":{"type":["string","null"]},"last_synced_at":{"type":["string","null"]},"last_error":{"type":["string","null"]}},"required":["id","provider","name","status","account","last_synced_at","last_error"],"additionalProperties":false}},"available":{"type":"array","items":{"type":"object","properties":{"key":{"type":"string"},"name":{"type":"string"},"category":{"type":"string"}},"required":["key","name","category"],"additionalProperties":false},"description":"Providers that can be connected here now"},"note":{"type":"string"}},"required":["view","connections","available","note"],"additionalProperties":false}]}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/integrations/{provider}/connect":{"post":{"tags":["Integrations"],"summary":"Start connecting an account. OAuth providers return a URL to send the browser to; API-key providers connect immediately.","x-required-scope":"connections:write","description":"Requires scope `connections:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"provider","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"sandbox":{"description":"Connect the provider's stand-in instead (development installations only; refused elsewhere)","type":"boolean"},"account_before":{"description":"The account the provider's address depends on, asked before the sign-in (see before in GET /v1/integrations)","type":"string","maxLength":200},"allow_sending":{"description":"Also ask for the scopes to send or publish as you (default: when the organization's outbound is on)","type":"boolean"},"api_key":{"type":"string","minLength":8,"maxLength":500},"secrets":{"description":"The provider's credential fields (see credentials in GET /v1/integrations)","type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"string","maxLength":20000}},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"account":{"type":"string","maxLength":200},"return_to":{"type":"string","maxLength":200}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"authorize_url":{"type":["string","null"]},"connection":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"connection"},"provider":{"type":"string"},"provider_name":{"type":"string"},"category":{"type":"string"},"scope":{"type":"string","enum":["user","org"]},"spend_checks":{"description":"An ad platform's connection: paid media's spending checks and the automatic pause at a ceiling keep using it while syncing is paused","type":"boolean"},"user_id":{"type":["string","null"]},"external_account":{"type":["string","null"]},"status":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"last_synced_at":{"type":["string","null"]},"last_error":{"type":["string","null"]},"created_at":{"type":"string"},"sync_paused_until":{"description":"The provider asked us to slow down: syncing resumes on its own at this time (nothing is lost)","type":["string","null"]},"hidden_settings":{"description":"Settings that decide where a saved secret is sent (such as a webhook address): shown to owners in the app only","type":"array","items":{"type":"string"}},"sandbox":{"type":"boolean","description":"A sandbox connection: made against the provider's stand-in on a development installation, never the real account"},"webhook_url":{"description":"Where the provider sends this connection's events (give it to the provider, with the signing secret it shows); null when it pushes nothing here","type":["string","null"]}},"required":["id","object","provider","provider_name","category","scope","user_id","external_account","status","settings","last_synced_at","last_error","created_at","sync_paused_until","sandbox"],"additionalProperties":false},{"type":"null"}]},"account_step":{"type":"boolean","description":"Ask which account the connection is for next (GET /v1/connections/:id/account-step)"}},"required":["authorize_url","connection","account_step"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/connections/{id}/account-step":{"get":{"tags":["Integrations"],"summary":"Which account a marketing connection is for: the choices read from the provider, or the field to fill in, and the accounts already filed from it","x-required-scope":"connections:read","description":"Requires scope `connections:read`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"provider":{"type":"string"},"label":{"type":"string"},"help":{"type":["string","null"]},"kind":{"type":"string","enum":["list","field","identity"]},"options":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"field":{"anyOf":[{"type":"object","properties":{"label":{"type":"string"},"help":{"type":["string","null"]},"placeholder":{"type":["string","null"]}},"required":["label","help","placeholder"],"additionalProperties":false},{"type":"null"}]},"filed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"external_id":{"type":"string"},"name":{"type":"string"}},"required":["id","external_id","name"],"additionalProperties":false}},"sandbox":{"type":"boolean"}},"required":["provider","label","help","kind","options","field","filed","sandbox"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/connections/{id}/account":{"post":{"tags":["Integrations"],"summary":"File the account a marketing connection is for (one of the choices, or the field's value): the channel account the areas use. Nothing is read, sent or started","x-required-scope":"connections:write","description":"Requires scope `connections:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"external_id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","maxLength":200},"workspace_id":{"type":"string","maxLength":64}},"required":["external_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"external_id":{"type":"string"},"name":{"type":"string"},"created":{"type":"boolean"}},"required":["id","external_id","name","created"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Integrations"],"summary":"Change the account a marketing connection is for (one of the choices, or the field's value): the new one is filed and becomes the connection's account; each other account filed from it is removed when it has nothing yet, or set aside with its figures kept (nothing reads or changes it). Also while the connection is paused. Nothing is read, sent or started","x-required-scope":"connections:write","description":"Requires scope `connections:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"external_id":{"type":"string","minLength":1,"maxLength":200},"name":{"type":"string","maxLength":200},"workspace_id":{"type":"string","maxLength":64}},"required":["external_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"external_id":{"type":"string"},"name":{"type":"string"},"created":{"type":"boolean"},"previous":{"type":["string","null"]},"removed":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}},"set_aside":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"}},"required":["id","name"],"additionalProperties":false}}},"required":["id","external_id","name","created","previous","removed","set_aside"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/connections/{id}/accounts/{account_id}":{"delete":{"tags":["Integrations"],"summary":"Remove an account filed from a marketing connection that has nothing yet (no figures, campaigns or other work); one that has is refused (account_has_history): change the connection's account instead. When it was the connection's account, the next one filed from it takes its place","x-required-scope":"connections:write","description":"Requires scope `connections:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"account_id","in":"path","required":true,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"removed":{"type":"boolean","const":true},"connection_account":{"type":["string","null"]}},"required":["id","removed","connection_account"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/connections/{id}":{"patch":{"tags":["Integrations"],"summary":"Change a connection's settings, or pause syncing","x-required-scope":"connections:write","description":"Requires scope `connections:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"paused":{"type":"boolean"}},"additionalProperties":{}}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"connection"},"provider":{"type":"string"},"provider_name":{"type":"string"},"category":{"type":"string"},"scope":{"type":"string","enum":["user","org"]},"spend_checks":{"description":"An ad platform's connection: paid media's spending checks and the automatic pause at a ceiling keep using it while syncing is paused","type":"boolean"},"user_id":{"type":["string","null"]},"external_account":{"type":["string","null"]},"status":{"type":"string"},"settings":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"last_synced_at":{"type":["string","null"]},"last_error":{"type":["string","null"]},"created_at":{"type":"string"},"sync_paused_until":{"description":"The provider asked us to slow down: syncing resumes on its own at this time (nothing is lost)","type":["string","null"]},"hidden_settings":{"description":"Settings that decide where a saved secret is sent (such as a webhook address): shown to owners in the app only","type":"array","items":{"type":"string"}},"sandbox":{"type":"boolean","description":"A sandbox connection: made against the provider's stand-in on a development installation, never the real account"},"webhook_url":{"description":"Where the provider sends this connection's events (give it to the provider, with the signing secret it shows); null when it pushes nothing here","type":["string","null"]}},"required":["id","object","provider","provider_name","category","scope","user_id","external_account","status","settings","last_synced_at","last_error","created_at","sync_paused_until","sandbox"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Integrations"],"summary":"Disconnect: stops syncing and deletes the saved credentials. What was already synced stays, unless an owner passes delete_data=true: then everything that came only from this source is deleted in the background","x-required-scope":"connections:write","description":"Requires scope `connections:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"delete_data","in":"query","required":false,"schema":{"type":"string","enum":["true","false"]}},{"name":"revoke_all_access","in":"query","required":false,"schema":{"description":"The connection's own person only: also end the whole grant at the provider now, when other connections share it (several products of one provider on the same account). Those connections then need reconnecting. Without it a shared grant is kept until its last connection is disconnected","type":"string","enum":["true","false"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"revoked":{"type":"boolean","const":true},"data_deletion":{"type":"string","enum":["kept","queued"]},"grant":{"type":"string","enum":["revoked","kept","failed","none"],"description":"What happened at the provider: revoked; kept (other connections on the same grant still use it: shared_with); failed (the revoke call failed; the saved sign-in is deleted anyway); none (the provider has no revoke)"},"shared_with":{"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"provider":{"type":"string"},"provider_name":{"type":"string"},"organization":{"anyOf":[{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["id","name"],"additionalProperties":false},{"type":"null"}],"description":"null: this organization; id and name null: an organization the person no longer belongs to"}},"required":["id","provider","provider_name","organization"],"additionalProperties":false},"description":"The other connections on the same grant. Ones in the person's other organizations are listed only to that person"}},"required":["id","revoked","data_deletion","grant","shared_with"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/connections/{id}/sync":{"post":{"tags":["Integrations"],"summary":"Sync now","x-required-scope":"connections:write","description":"Requires scope `connections:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"queued":{"type":"boolean","const":true}},"required":["queued"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/connections/{id}/runs":{"get":{"tags":["Integrations"],"summary":"Recent sync runs with stats and errors","x-required-scope":"connections:read","description":"Requires scope `connections:read`.","security":[{"apiKey":[]},{"oauth2":["connections:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"kind":{"type":"string"},"status":{"type":"string"},"stats":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"number"}},"error":{"type":["string","null"]},"started_at":{"type":"string"},"finished_at":{"type":["string","null"]}},"required":["id","kind","status","stats","error","started_at","finished_at"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/connections/{id}/secrets":{"put":{"tags":["Integrations"],"summary":"Add or replace a connection's declared secrets (e.g. the webhook signing secret shown after setup; on OAuth connections only declared extras such as a webhook secret, never the sign-in tokens). Values are stored encrypted and never returned; empty values keep the current one.","x-required-scope":"connections:write","description":"Requires scope `connections:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"secrets":{"type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{"type":"string","maxLength":20000}},"settings":{"description":"Only settings that decide where the secret is sent (e.g. a warehouse URL), changed together with the secret","type":"object","propertyNames":{"type":"string","maxLength":64},"additionalProperties":{}}},"required":["secrets"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"updated":{"type":"array","items":{"type":"string"}}},"required":["id","updated"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/connections/{id}/calendars":{"get":{"tags":["Integrations"],"summary":"Calendars this account can see, and which ones sync (settings.calendars; none chosen means the primary calendar)","x-required-scope":"connections:read","description":"Requires scope `connections:read`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"primary":{"type":"boolean"},"access":{"type":"string"},"color":{"type":["string","null"]},"selected":{"type":"boolean"}},"required":["id","name","primary","access","color","selected"],"additionalProperties":false}}},"required":["object","data"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/connections/{id}/grant":{"get":{"tags":["Integrations"],"summary":"The person's other connections that share this connection's grant at the provider (several products of one provider on the same account), so a disconnect can say what removing all access would also stop. The connection's own person only","x-required-scope":"connections:read","description":"Requires scope `connections:read`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"id":{"type":"string"},"grant_wide_revoke":{"type":"boolean"},"shared_with":{"type":"array","items":{"type":"object","properties":{"id":{"type":["string","null"]},"provider":{"type":"string"},"provider_name":{"type":"string"},"organization":{"anyOf":[{"type":"object","properties":{"id":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["id","name"],"additionalProperties":false},{"type":"null"}],"description":"null: this organization; id and name null: an organization the person no longer belongs to"}},"required":["id","provider","provider_name","organization"],"additionalProperties":false},"description":"In this organization and in the person's other organizations (named there by the organization's name only)"}},"required":["id","grant_wide_revoke","shared_with"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/integrations/search_visibility_events/pair":{"post":{"tags":["Integrations"],"summary":"Connect Karlsense's product events without copying a secret: returns the Karlsense page where its owner approves; Karlsense then gives this connection its signing secret directly (owners, in the web app; needs the Karlsense connection first)","x-required-scope":"connections:write","description":"Requires scope `connections:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"connection_id":{"type":"string"},"approve_url":{"type":"string"},"expires_at":{"type":"string"}},"required":["connection_id","approve_url","expires_at"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/billing":{"get":{"tags":["Billing"],"summary":"The organization's plan, subscription, seats and this month's usage against the plan's allowance (AI credits)","x-required-scope":"billing:read","description":"Requires scope `billing:read`.","security":[{"apiKey":[]},{"oauth2":["billing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/billing/checkout":{"post":{"tags":["Billing"],"summary":"Start a Stripe checkout for a paid plan (owners). Returns the checkout URL to open; the plan applies when Stripe confirms the subscription","x-required-scope":"billing:write","description":"Requires scope `billing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"plan":{"type":"string","enum":["starter","growth"]},"interval":{"type":"string","enum":["month","year"]},"seats":{"type":"integer","minimum":1,"maximum":10000}},"required":["plan","interval"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/billing/plan":{"post":{"tags":["Billing"],"summary":"Change to another paid plan or billing interval now, prorated (owners)","x-required-scope":"billing:write","description":"Requires scope `billing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"plan":{"type":"string","enum":["starter","growth"]},"interval":{"type":"string","enum":["month","year"]}},"required":["plan","interval"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/billing/seats/sync":{"post":{"tags":["Billing"],"summary":"Set the subscription's seats to the current member count, prorated (owners; also runs daily)","x-required-scope":"billing:write","description":"Requires scope `billing:write`.","security":[{"apiKey":[]},{"oauth2":["billing:write"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/billing/portal":{"post":{"tags":["Billing"],"summary":"Short-lived links to Stripe's customer portal: update the payment method, cancel, billing details (owners)","x-required-scope":"billing:write","description":"Requires scope `billing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/billing/invoices":{"get":{"tags":["Billing"],"summary":"Invoices from Stripe, newest first, with tax shown separately (owners)","x-required-scope":"billing:write","description":"Requires scope `billing:write`.","security":[{"apiKey":[]},{"oauth2":["billing:write"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/billing/invoices/{id}/pdf":{"get":{"tags":["Billing"],"summary":"A short-lived link to one invoice's PDF (owners)","x-required-scope":"billing:write","description":"Requires scope `billing:write`.","security":[{"apiKey":[]},{"oauth2":["billing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":80}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/billing/prices":{"get":{"tags":["Billing"],"summary":"Plan prices for a location, before sales tax (we sell to businesses in the United States; tax is added at checkout where it applies)","x-required-scope":"billing:read","description":"Requires scope `billing:read`.","security":[{"apiKey":[]},{"oauth2":["billing:read"]},{"session":[]}],"parameters":[{"name":"country","in":"query","required":true,"schema":{}},{"name":"postal_code","in":"query","required":false,"schema":{"type":"string","maxLength":16}},{"name":"seats","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":10000}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/billing/upgrade-link":{"post":{"tags":["Billing"],"summary":"For agents: suggest a paid plan to the organization's owners. Returns a link to the billing page with the plan filled in, for an owner to review and pay; nothing is bought here, and the owners are notified (naming the key or app that asked)","x-required-scope":"agents:write","description":"Requires scope `agents:write`.","security":[{"apiKey":[]},{"oauth2":["agents:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"plan":{"type":"string","enum":["starter","growth"]},"interval":{"default":"year","type":"string","enum":["month","year"]},"seats":{"type":"integer","minimum":1,"maximum":10000}},"required":["plan","interval"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/billing/upgrade-link/check":{"get":{"tags":["Billing"],"summary":"Whether an agent suggested this plan to the organization in the last 7 days (the billing page checks before showing it)","x-required-scope":"billing:read","description":"Requires scope `billing:read`.","security":[{"apiKey":[]},{"oauth2":["billing:read"]},{"session":[]}],"parameters":[{"name":"plan","in":"query","required":true,"schema":{"type":"string","enum":["starter","growth"]}},{"name":"interval","in":"query","required":true,"schema":{"type":"string","enum":["month","year"]}},{"name":"seats","in":"query","required":true,"schema":{"type":"integer","minimum":1,"maximum":10000}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/billing/run-costs":{"get":{"tags":["Billing"],"summary":"What runs cost before you start them: credits per unit and the most one AI request can cost; with billing access, credits left this month, today's AI spend and budget, and what an agent's runs or your agent's requests cost on average","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"agent_id","in":"query","required":false,"schema":{"type":"string","pattern":"^agt_[0-9a-z]{26}$"}},{"name":"requests","in":"query","required":false,"schema":{"type":"string","enum":["1"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/billing/request-costs":{"get":{"tags":["Billing"],"summary":"What your requests to your agent cost: AI spend and credits used, per request (your own, at most 50)","x-required-scope":"billing:read","description":"Requires scope `billing:read`.","security":[{"apiKey":[]},{"oauth2":["billing:read"]},{"session":[]}],"parameters":[{"name":"ids","in":"query","required":true,"schema":{"type":"string","maxLength":2000}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/first-run":{"get":{"tags":["Organization"],"summary":"Your first-run checklist: invite a teammate, connect an account, run your first agent","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/sandbox":{"post":{"tags":["Sandbox"],"summary":"For AI agents: create a sandbox organization and get an API key for it, without an account. Send a solved sign-up challenge (GET /api/auth/signup-challenge) as x-ma-pow. Until a person claims it by email it can't send anything or connect accounts, and it's deleted after 7 days","security":[],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"agent_name":{"description":"Who is creating it, e.g. the assistant's name","type":"string","maxLength":80},"claim_email":{"description":"The person who will claim it; we email them a claim link (once)","type":"string","maxLength":320}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"sandbox"},"organization_id":{"type":"string"},"api_key":{"type":"string","description":"Shown once. Scopes: org:read, connections:read, agents:read, agents:write"},"api_key_scopes":{"type":"array","items":{"type":"string"}},"expires_at":{"type":"string"},"claim_email_sent":{"type":"boolean"},"next_steps":{"type":"array","items":{"type":"string"}}},"required":["object","organization_id","api_key","api_key_scopes","expires_at","claim_email_sent","next_steps"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Sandbox"],"summary":"This sandbox's state: unclaimed or claimed, when it expires, whether the claim email went out","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/sandbox/claim-email":{"post":{"tags":["Sandbox"],"summary":"Email the person who should claim this sandbox a claim link (fixed text; at most 3 times, once per 10 minutes)","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"email":{"type":"string","maxLength":320}},"required":["email"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/sandbox/claim":{"post":{"tags":["Sandbox"],"summary":"Claim a sandbox with the token from the claim email (signed in with the address it was sent to). You become its owner","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"token":{"type":"string","maxLength":200}},"required":["token"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/settings/ai-disclosure":{"get":{"tags":["Settings"],"summary":"The line added to emails an agent sends on its own (EU AI Act Art. 50); emails a person approves don't carry it","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Settings"],"summary":"Turn the disclosure on or off, or reword it (owners; it must still say an AI wrote the message)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean"},"text":{"anyOf":[{"type":"string","minLength":10,"maxLength":300},{"type":"null"}]}},"required":["enabled"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/settings/outside-deletes":{"get":{"tags":["Settings"],"summary":"Whether connected assistants and apps may delete, merge or remove things on their own; off by default","x-required-scope":"settings:read","description":"Requires scope `settings:read`.","security":[{"apiKey":[]},{"oauth2":["settings:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"put":{"tags":["Settings"],"summary":"Let outside assistants delete, merge or remove things on their own, or stop them (owners, in the app)","x-required-scope":"settings:write","description":"Requires scope `settings:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/governance/agents":{"get":{"tags":["Governance"],"summary":"Every agent: who answers for it, its autonomy, tools granted, data sources it's kept from, and its last 30 days (owner)","x-required-scope":"audit:read","description":"Requires scope `audit:read`.","security":[{"apiKey":[]},{"oauth2":["audit:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/governance/agents/{id}/decisions":{"get":{"tags":["Governance"],"summary":"An agent's decision history: approvals by people and policy decisions, oldest first (owner; JSON, JSONL or CSV)","x-required-scope":"audit:read","description":"Requires scope `audit:read`.","security":[{"apiKey":[]},{"oauth2":["audit:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":64}},{"name":"since","in":"query","required":false,"schema":{"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))$"}},{"name":"until","in":"query","required":false,"schema":{"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))$"}},{"name":"format","in":"query","required":true,"schema":{"default":"json","type":"string","enum":["json","jsonl","csv"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/governance/incidents":{"get":{"tags":["Governance"],"summary":"Incident reports: runs that failed, were cancelled or were refused by policy, each with its timeline (owner)","x-required-scope":"audit:read","description":"Requires scope `audit:read`.","security":[{"apiKey":[]},{"oauth2":["audit:read"]},{"session":[]}],"parameters":[{"name":"since","in":"query","required":false,"schema":{"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))$"}},{"name":"agent_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/source-access":{"get":{"tags":["Governance"],"summary":"Each connected data source with who may see what came from it and which AI surfaces may read it (owner)","x-required-scope":"security:write","description":"Requires scope `security:write`.","security":[{"apiKey":[]},{"oauth2":["security:write"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/source-access/{connection_id}":{"put":{"tags":["Governance"],"summary":"Limit a data source to roles and teams, and choose whether Ask, MCP clients and agents (all or named) may read it; null clears the rule (owner)","x-required-scope":"security:write","description":"Requires scope `security:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"connection_id","in":"path","required":true,"schema":{"type":"string","maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"rule":{"anyOf":[{"type":"object","properties":{"roles":{"maxItems":3,"type":"array","items":{"type":"string","enum":["owner","member","viewer"]}},"team_ids":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":64}},"allow_ask":{"type":"boolean"},"allow_mcp":{"type":"boolean"},"allow_agents":{"type":"boolean"},"agent_ids":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":64}}},"additionalProperties":false},{"type":"null"}]}},"required":["rule"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/audit-logs/export":{"get":{"tags":["Audit log"],"summary":"The audit log for a period (at most a year), 10,000 entries a page (pass next_cursor for the next), each entry with its place in the hash chain and whether it checks out (owner; JSONL or CSV)","x-required-scope":"audit:read","description":"Requires scope `audit:read`.","security":[{"apiKey":[]},{"oauth2":["audit:read"]},{"session":[]}],"parameters":[{"name":"since","in":"query","required":false,"schema":{"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))$"}},{"name":"until","in":"query","required":false,"schema":{"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))$"}},{"name":"format","in":"query","required":true,"schema":{"default":"jsonl","type":"string","enum":["jsonl","csv"]}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","pattern":"^\\d{1,18}$|^[A-Za-z0-9_]{1,64}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/compliance/reports/{kind}":{"get":{"tags":["Audit log"],"summary":"A report for auditors over a period: access changes, administrative changes, agent actions or data exports, with totals by action and actor (owner; JSON, JSONL or CSV)","x-required-scope":"audit:read","description":"Requires scope `audit:read`.","security":[{"apiKey":[]},{"oauth2":["audit:read"]},{"session":[]}],"parameters":[{"name":"kind","in":"path","required":true,"schema":{"type":"string","enum":["access_changes","admin_actions","agent_actions","data_exports"]}},{"name":"since","in":"query","required":false,"schema":{"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))$"}},{"name":"until","in":"query","required":false,"schema":{"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))$"}},{"name":"format","in":"query","required":true,"schema":{"default":"json","type":"string","enum":["json","jsonl","csv"]}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/organization/exports":{"post":{"tags":["Organization"],"summary":"Export everything this organization holds (every table, as gzipped JSON lines, secrets left out); ready to download for 7 days (owner)","x-required-scope":"security:write","description":"Requires scope `security:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Organization"],"summary":"Your exports of this organization (owner; each holds what its requester could read, so it's theirs alone)","x-required-scope":"security:write","description":"Requires scope `security:write`.","security":[{"apiKey":[]},{"oauth2":["security:write"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/sso":{"get":{"tags":["Single sign-on"],"summary":"This organization's identity providers and email domains (owner)","x-required-scope":"security:write","description":"Requires scope `security:write`.","security":[{"apiKey":[]},{"oauth2":["security:write"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/sso/connections":{"post":{"tags":["Single sign-on"],"summary":"Connect an OpenID Connect identity provider (checked against its discovery document) (owner)","x-required-scope":"security:write","description":"Requires scope `security:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"issuer":{"type":"string","maxLength":500,"format":"uri"},"client_id":{"type":"string","minLength":1,"maxLength":300},"client_secret":{"type":"string","minLength":1,"maxLength":500},"default_role":{"type":"string","enum":["member","viewer"]}},"required":["issuer","client_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/sso/connections/{id}":{"patch":{"tags":["Single sign-on"],"summary":"Turn a provider on or off, or change its default role or secret (owner)","x-required-scope":"security:write","description":"Requires scope `security:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":64}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean"},"default_role":{"type":"string","enum":["member","viewer"]},"client_secret":{"type":"string","minLength":1,"maxLength":500}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Single sign-on"],"summary":"Remove a provider (its domains stop sending people to it) (owner)","x-required-scope":"security:write","description":"Requires scope `security:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/sso/domains":{"post":{"tags":["Single sign-on"],"summary":"Add an email domain to verify (a DNS TXT record) and send its people to a provider (owner)","x-required-scope":"security:write","description":"Requires scope `security:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"domain":{"type":"string","maxLength":253,"pattern":"^(?=.{3,253}$)([a-z0-9]([a-z0-9-]{0,61}[a-z0-9])?\\.)+[a-z]{2,}$"},"connection_id":{"type":"string","maxLength":64}},"required":["domain","connection_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/sso/domains/{domain}/verify":{"post":{"tags":["Single sign-on"],"summary":"Check the domain's DNS TXT record; once it's there, the domain is this organization's for sign-in (owner)","x-required-scope":"security:write","description":"Requires scope `security:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","maxLength":253}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/sso/domains/{domain}":{"patch":{"tags":["Single sign-on"],"summary":"Require single sign-on for this domain's people (owners keep their password, to get back in if the provider fails) (owner)","x-required-scope":"security:write","description":"Requires scope `security:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","maxLength":253}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enforce":{"type":"boolean"}},"required":["enforce"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"delete":{"tags":["Single sign-on"],"summary":"Remove a domain (owner)","x-required-scope":"security:write","description":"Requires scope `security:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"domain","in":"path","required":true,"schema":{"type":"string","maxLength":253}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/scim/tokens":{"post":{"tags":["Single sign-on"],"summary":"A directory token for SCIM provisioning (shown once) (owner)","x-required-scope":"security:write","description":"Requires scope `security:write`. Web sessions only.","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":80}},"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/scim/tokens/{id}":{"delete":{"tags":["Single sign-on"],"summary":"Revoke a directory token (owner)","x-required-scope":"security:write","description":"Requires scope `security:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/session-replay":{"get":{"tags":["Account"],"summary":"Whether this browser session is recorded for session replay (masked; off unless an owner turned it on), the pages never recorded, and how long recordings are kept","security":[{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/settings/session-replay":{"put":{"tags":["Settings"],"summary":"Turn session replay on or off for the organization (owners). It's off by default; turning it off deletes the organization's recordings","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/me/session-replay":{"patch":{"tags":["Account"],"summary":"Opt yourself out of session replay (your recordings are deleted), or back in","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"opt_out":{"type":"boolean"}},"required":["opt_out"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/session-replay/events":{"post":{"tags":["Account"],"summary":"The session replay recorder's batch (masked snapshots, navigation, clicks, scrolls). Refused whole if any text isn't masked; events on sensitive pages are dropped","security":[{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"session":{"type":"string","pattern":"^[a-z0-9]{16,40}$"},"events":{"minItems":1,"maxItems":200,"type":"array","items":{"oneOf":[{"type":"object","properties":{"kind":{"type":"string","const":"nav"},"t":{"type":"integer","minimum":0,"maximum":9007199254740991},"path":{"type":"string","minLength":1,"maxLength":200}},"required":["kind","t","path"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"snapshot"},"t":{"type":"integer","minimum":0,"maximum":9007199254740991},"path":{"type":"string","minLength":1,"maxLength":200},"tree":{},"w":{"type":"integer","minimum":0,"maximum":20000},"h":{"type":"integer","minimum":0,"maximum":20000}},"required":["kind","t","path","tree","w","h"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"click"},"t":{"type":"integer","minimum":0,"maximum":9007199254740991},"path":{"type":"string","minLength":1,"maxLength":200},"node":{"maxItems":60,"type":"array","items":{"type":"integer","minimum":0,"maximum":6000}},"x":{"type":"number","minimum":0,"maximum":1},"y":{"type":"number","minimum":0,"maximum":1}},"required":["kind","t","path","node","x","y"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"scroll"},"t":{"type":"integer","minimum":0,"maximum":9007199254740991},"path":{"type":"string","minLength":1,"maxLength":200},"y":{"type":"number","minimum":0,"maximum":1}},"required":["kind","t","path","y"],"additionalProperties":false},{"type":"object","properties":{"kind":{"type":"string","const":"resize"},"t":{"type":"integer","minimum":0,"maximum":9007199254740991},"path":{"type":"string","minLength":1,"maxLength":200},"w":{"type":"integer","minimum":0,"maximum":20000},"h":{"type":"integer","minimum":0,"maximum":20000}},"required":["kind","t","path","w","h"],"additionalProperties":false}]}}},"required":["session","events"],"additionalProperties":false}}}},"responses":{"202":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/brands":{"get":{"tags":["Marketing"],"summary":"List brands","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Marketing"],"summary":"Create a brand","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"name":{"type":"string","minLength":1,"maxLength":200},"slug":{"type":"string","pattern":"^[a-z0-9][a-z0-9-]{0,62}$"},"kit":{"type":"object","properties":{"voice":{"type":"string","maxLength":4000},"tone":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":80}},"audiences":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":500}},"products":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":500}},"claims":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":500},"evidence":{"type":"string","maxLength":1000},"approved":{"default":true,"type":"boolean"}},"required":["text","approved"],"additionalProperties":false}},"banned_phrases":{"maxItems":200,"type":"array","items":{"type":"string","maxLength":200}},"legal_lines":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":1000}},"visual":{"type":"object","properties":{"colors":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"fonts":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":100}},"logo_asset_id":{"type":"string","pattern":"^ast_[0-9a-z]{26}$"},"rules":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":500}}},"additionalProperties":false},"personas":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"description":{"type":"string","maxLength":2000},"pains":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":300}},"language":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":200}},"objections":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":300}}},"required":["name"],"additionalProperties":false}}},"additionalProperties":false}},"required":["workspace_id","name","slug"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/brands/{id}":{"get":{"tags":["Marketing"],"summary":"Get a brand","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Marketing"],"summary":"Change a brand","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["active","archived"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/markets":{"get":{"tags":["Marketing"],"summary":"List markets","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"country","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Marketing"],"summary":"Create a market","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"name":{"type":"string","minLength":1,"maxLength":200},"country":{"type":"string"},"language":{"type":"string"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"timezone":{"type":"string","maxLength":64},"legal_lines":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":1000}},"overrides":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["workspace_id","name","country","language","currency","timezone"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/markets/{id}":{"get":{"tags":["Marketing"],"summary":"Get a market","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Marketing"],"summary":"Change a market","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"legal_lines":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":1000}},"overrides":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"timezone":{"type":"string","maxLength":64}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/products":{"get":{"tags":["Marketing"],"summary":"List products","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"provider","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Marketing"],"summary":"Create a product","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"provider":{"type":"string","pattern":"^[a-z0-9_]{2,40}$"},"external_id":{"type":"string","maxLength":200},"title":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","maxLength":2000,"format":"uri"},"price":{"type":"number","minimum":0,"maximum":1000000000000},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"cost":{"type":"number","minimum":0,"maximum":100000000000},"cost_currency":{"type":"string","pattern":"^[A-Z]{3}$"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["workspace_id","title"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/products/{id}":{"get":{"tags":["Marketing"],"summary":"Get a product","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Marketing"],"summary":"Change a product","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"title":{"type":"string","minLength":1,"maxLength":200},"url":{"type":"string","maxLength":2000,"format":"uri"},"price":{"type":"number","minimum":0,"maximum":1000000000000},"cost":{"anyOf":[{"type":"number","minimum":0,"maximum":100000000000},{"type":"null"}]},"cost_currency":{"type":"string","pattern":"^[A-Z]{3}$"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/channel-accounts":{"get":{"tags":["Marketing"],"summary":"List channel accounts","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"provider","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Marketing"],"summary":"Create a channel account","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"provider":{"type":"string","pattern":"^[a-z0-9_]{2,40}$"},"external_id":{"type":"string","maxLength":200},"name":{"type":"string","minLength":1,"maxLength":200},"connection_id":{"type":"string","pattern":"^con_[0-9a-z]{26}$"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"timezone":{"type":"string","maxLength":64}},"required":["workspace_id","provider","external_id","name"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/channel-accounts/{id}":{"get":{"tags":["Marketing"],"summary":"Get a channel account","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Marketing"],"summary":"Change a channel account","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/plans":{"get":{"tags":["Marketing"],"summary":"List plans","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Marketing"],"summary":"Create a plan","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"name":{"type":"string","minLength":1,"maxLength":200},"goal":{"type":"string","maxLength":4000},"budget":{"type":"number","minimum":0,"maximum":1000000000000},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"kpis":{"maxItems":50,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"starts_on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"ends_on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["workspace_id","name"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/plans/{id}":{"get":{"tags":["Marketing"],"summary":"Get a plan","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Marketing"],"summary":"Change a plan","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"goal":{"type":"string","maxLength":4000},"budget":{"type":"number","minimum":0,"maximum":1000000000000},"kpis":{"maxItems":50,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"status":{"type":"string","enum":["draft","active","done","archived"]},"starts_on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"ends_on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/campaigns":{"get":{"tags":["Marketing"],"summary":"List campaigns","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"plan_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Marketing"],"summary":"Create a campaign","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"plan_id":{"type":"string","pattern":"^pln_[0-9a-z]{26}$"},"name":{"type":"string","minLength":1,"maxLength":200},"objective":{"type":"string","maxLength":2000},"budget":{"type":"number","minimum":0,"maximum":1000000000000},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"kpis":{"maxItems":50,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"starts_on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"ends_on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"required":["workspace_id","name"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/campaigns/{id}":{"get":{"tags":["Marketing"],"summary":"Get a campaign","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Marketing"],"summary":"Change a campaign","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"objective":{"type":"string","maxLength":2000},"budget":{"type":"number","minimum":0,"maximum":1000000000000},"kpis":{"maxItems":50,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"status":{"type":"string","enum":["draft","ready","done","archived"]},"starts_on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"ends_on":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/channel-campaigns":{"get":{"tags":["Marketing"],"summary":"List channel campaigns","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"campaign_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"channel_account_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Marketing"],"summary":"Create a channel campaign","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"campaign_id":{"type":"string","pattern":"^cmp_[0-9a-z]{26}$"},"channel_account_id":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"},"kind":{"type":"string","maxLength":40},"name":{"type":"string","minLength":1,"maxLength":200},"daily_budget":{"type":"number","minimum":0,"maximum":1000000000000},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["campaign_id","channel_account_id","name"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/channel-campaigns/{id}":{"get":{"tags":["Marketing"],"summary":"Get a channel campaign","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Marketing"],"summary":"Change a channel campaign","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/channel-entities":{"get":{"tags":["Marketing"],"summary":"List channel entities","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"channel_campaign_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Marketing"],"summary":"Create a channel entity","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel_campaign_id":{"type":"string","pattern":"^chc_[0-9a-z]{26}$"},"parent_id":{"type":"string","pattern":"^che_[0-9a-z]{26}$"},"kind":{"type":"string","pattern":"^[a-z_]{2,40}$"},"name":{"type":"string","maxLength":200},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["channel_campaign_id","kind"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/channel-entities/{id}":{"get":{"tags":["Marketing"],"summary":"Get a channel entity","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Marketing"],"summary":"Change a channel entity","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","maxLength":200},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/assets":{"get":{"tags":["Marketing"],"summary":"List assets","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Marketing"],"summary":"Create an asset","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"name":{"type":"string","minLength":1,"maxLength":200},"kind":{"type":"string","enum":["image","video","audio","copy","document","other"]},"brand_version":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"tags":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":60}}},"required":["workspace_id","name","kind"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/assets/{id}":{"get":{"tags":["Marketing"],"summary":"Get an asset","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Marketing"],"summary":"Change an asset","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"status":{"type":"string","enum":["draft","in_review","archived"]},"tags":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":60}}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/asset-rights":{"get":{"tags":["Marketing"],"summary":"List asset rights","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"asset_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Marketing"],"summary":"Create an asset right","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"asset_id":{"type":"string","pattern":"^ast_[0-9a-z]{26}$"},"kind":{"type":"string","enum":["license","model_release","likeness","music","stock","other"]},"holder":{"type":"string","maxLength":200},"terms":{"type":"string","maxLength":4000},"territories":{"maxItems":250,"type":"array","items":{"type":"string","pattern":"^[A-Z]{2}$"}},"expires_at":{"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))$"},"consent_ref":{"type":"string","maxLength":200}},"required":["asset_id","kind"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/asset-rights/{id}":{"get":{"tags":["Marketing"],"summary":"Get an asset right","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/asset-usage":{"get":{"tags":["Marketing"],"summary":"List asset usage","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"asset_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"channel_account_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Marketing"],"summary":"Create an asset usage","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"asset_id":{"type":"string","pattern":"^ast_[0-9a-z]{26}$"},"asset_version_id":{"type":"string","pattern":"^asv_[0-9a-z]{26}$"},"channel_account_id":{"type":"string","pattern":"^cha_[0-9a-z]{26}$"},"channel_entity_id":{"type":"string","pattern":"^che_[0-9a-z]{26}$"},"location":{"type":"string","maxLength":2000}},"required":["asset_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/asset-usage/{id}":{"get":{"tags":["Marketing"],"summary":"Get an asset usage","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Marketing"],"summary":"Change an asset usage","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"status":{"type":"string","enum":["live","removed"]},"live_until":{"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))$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/segments":{"get":{"tags":["Marketing"],"summary":"List segments","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"brand_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"status","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Marketing"],"summary":"Create a segment","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"brand_id":{"type":"string","pattern":"^brd_[0-9a-z]{26}$"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"kind":{"type":"string","enum":["rules","static"]},"definition":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["workspace_id","name"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/segments/{id}":{"get":{"tags":["Marketing"],"summary":"Get a segment","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Marketing"],"summary":"Change a segment","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string","maxLength":2000},"definition":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"status":{"type":"string","enum":["active","archived"]}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/profiles":{"get":{"tags":["Marketing"],"summary":"List profiles","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Marketing"],"summary":"Create a profile","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"display_name":{"type":"string","maxLength":200},"email":{},"phone":{"type":"string","pattern":"^\\+[1-9]\\d{6,14}$"},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"timezone":{"type":"string","maxLength":64},"locale":{"type":"string","maxLength":20},"attributes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["workspace_id"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/profiles/{id}":{"get":{"tags":["Marketing"],"summary":"Get a profile","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Marketing"],"summary":"Change a profile","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"display_name":{"type":"string","maxLength":200},"country":{"type":"string","pattern":"^[A-Z]{2}$"},"timezone":{"type":"string","maxLength":64},"locale":{"type":"string","maxLength":20},"attributes":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/identities":{"get":{"tags":["Marketing"],"summary":"List identities","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"profile_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Marketing"],"summary":"Create an identity","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"profile_id":{"type":"string","pattern":"^prf_[0-9a-z]{26}$"},"kind":{"type":"string","enum":["email","phone","customer_id","device","external"]},"value":{"type":"string","maxLength":320},"provider":{"type":"string","pattern":"^[a-z0-9_]{0,40}$"},"verified":{"type":"boolean"}},"required":["profile_id","kind","value"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/identities/{id}":{"get":{"tags":["Marketing"],"summary":"Get an identity","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/companies":{"get":{"tags":["Marketing"],"summary":"List companies","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"workspace_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Marketing"],"summary":"Create a company","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"},"domain":{"type":"string","pattern":"^[a-z0-9.-]{3,253}$"},"name":{"type":"string","maxLength":200},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["domain"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/companies/{id}":{"get":{"tags":["Marketing"],"summary":"Get a company","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"patch":{"tags":["Marketing"],"summary":"Change a company","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"name":{"type":"string","maxLength":200},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/account-signals":{"get":{"tags":["Marketing"],"summary":"List account signals","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"company_id","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"kind","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"source","in":"query","required":false,"schema":{"type":"string","maxLength":64}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Marketing"],"summary":"Create an account signal","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"company_id":{"type":"string","pattern":"^cpy_[0-9a-z]{26}$"},"kind":{"type":"string","pattern":"^[a-z_]{2,40}$"},"topic":{"type":"string","maxLength":200},"score":{"type":"number","minimum":-10000,"maximum":10000},"source":{"type":"string","pattern":"^[a-z0-9_]{2,40}$"},"external_id":{"type":"string","maxLength":200},"observed_at":{"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))$"},"data":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["company_id","kind","source","observed_at"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/account-signals/{id}":{"get":{"tags":["Marketing"],"summary":"Get an account signal","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/brands/{id}/versions":{"get":{"tags":["Marketing"],"summary":"List a brand's kit versions, newest first (at most 50)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"description":"How many of the newest (1: the current kit)","type":"integer","minimum":1,"maximum":50}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Marketing"],"summary":"Save a new version of a brand's kit (earlier versions stay as they were)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"kit":{"type":"object","properties":{"voice":{"type":"string","maxLength":4000},"tone":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":80}},"audiences":{"maxItems":30,"type":"array","items":{"type":"string","maxLength":500}},"products":{"maxItems":100,"type":"array","items":{"type":"string","maxLength":500}},"claims":{"maxItems":200,"type":"array","items":{"type":"object","properties":{"text":{"type":"string","maxLength":500},"evidence":{"type":"string","maxLength":1000},"approved":{"default":true,"type":"boolean"}},"required":["text","approved"],"additionalProperties":false}},"banned_phrases":{"maxItems":200,"type":"array","items":{"type":"string","maxLength":200}},"legal_lines":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":1000}},"visual":{"type":"object","properties":{"colors":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^#[0-9a-fA-F]{6}$"}},"fonts":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":100}},"logo_asset_id":{"type":"string","pattern":"^ast_[0-9a-z]{26}$"},"rules":{"maxItems":50,"type":"array","items":{"type":"string","maxLength":500}}},"additionalProperties":false},"personas":{"maxItems":20,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":100},"description":{"type":"string","maxLength":2000},"pains":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":300}},"language":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":200}},"objections":{"maxItems":10,"type":"array","items":{"type":"string","maxLength":300}}},"required":["name"],"additionalProperties":false}}},"additionalProperties":false},"note":{"type":"string","maxLength":500},"base_version":{"description":"The version this change was made on: refused if a newer one was saved since (0: the brand had none)","type":"integer","minimum":0,"maximum":9007199254740991}},"required":["kit"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/channel-accounts/{id}/limits":{"put":{"tags":["Marketing"],"summary":"Set a channel account's autonomy ceiling, spend ceilings and restrictions, or pause it (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"autonomy_ceiling":{"type":"string","enum":["L0","L1","L2","L3","L4"]},"spend_ceiling_daily":{"anyOf":[{"type":"number","minimum":0,"maximum":1000000000},{"type":"null"}]},"spend_ceiling_monthly":{"anyOf":[{"type":"number","minimum":0,"maximum":10000000000},{"type":"null"}]},"paused":{"type":"boolean"},"platform_restrictions":{"type":"object","properties":{"read_only":{"type":"boolean"},"blocked_operations":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,60}$"}}},"additionalProperties":false}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/campaigns/{id}/links":{"get":{"tags":["Marketing"],"summary":"A campaign's assets and audiences","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/campaigns/{id}/assets":{"post":{"tags":["Marketing"],"summary":"Attach an asset to a campaign","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"asset_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ast_.*"}},"required":["asset_id"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/campaigns/{id}/audiences":{"post":{"tags":["Marketing"],"summary":"Include or exclude a segment in a campaign","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"segment_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^seg_.*"},"role":{"default":"include","type":"string","enum":["include","exclude"]}},"required":["segment_id","role"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"ok":{"type":"boolean","const":true}},"required":["ok"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/assets/{id}/versions":{"get":{"tags":["Marketing"],"summary":"List an asset's versions with how each was made","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Marketing"],"summary":"Add a version to an asset, labeled with how it was made","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"storage_key":{"type":"string","maxLength":500},"mime":{"type":"string","maxLength":100},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"sha256":{"type":"string","pattern":"^[0-9a-f]{64}$"},"width":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"height":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"duration_ms":{"type":"integer","minimum":0,"maximum":9007199254740991},"text_body":{"type":"string","maxLength":100000},"origin":{"type":"string","enum":["human","ai_generated","ai_edited","composite"]},"model":{"type":"string","maxLength":100},"provider":{"type":"string","maxLength":60},"consent_ref":{"type":"string","maxLength":200}},"required":["origin"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/profiles/{id}/consents":{"get":{"tags":["Marketing"],"summary":"A profile's consent: the current state per channel and purpose, and the history","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"post":{"tags":["Marketing"],"summary":"Record a consent change for a profile (kept as history; the latest one counts)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"channel":{"type":"string","enum":["email","sms","push","whatsapp","voice","web_tracking","chat","ads"]},"purpose":{"type":"string","enum":["marketing","transactional","analytics","personalization","ads","sales_handoff","ads_measurement"]},"status":{"type":"string","enum":["granted","withdrawn","denied"]},"source":{"type":"string","minLength":1,"maxLength":200},"text_shown":{"type":"string","maxLength":4000},"captured_at":{"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))$"}},"required":["channel","purpose","status","source"],"additionalProperties":false}}}},"responses":{"201":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/profiles/{id}/traits":{"put":{"tags":["Marketing"],"summary":"Set a computed trait on a profile","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"key":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},"value":{},"source":{"type":"string","minLength":1,"maxLength":80}},"required":["key","value","source"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/profiles/{id}/events":{"get":{"tags":["Marketing"],"summary":"A profile's events, newest first","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","minLength":3,"maxLength":40}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":200}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/events":{"post":{"tags":["Marketing"],"summary":"Record events (up to 500; repeats of the same source and id are ignored)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"events":{"minItems":1,"maxItems":500,"type":"array","items":{"type":"object","properties":{"workspace_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^ws_.*"},"profile_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^prf_.*"},"name":{"type":"string","pattern":"^[a-z][a-z0-9_.]{0,79}$"},"source":{"type":"string","pattern":"^[a-z0-9_]{2,40}$"},"external_id":{"type":"string","maxLength":200},"occurred_at":{"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))$"},"properties":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["workspace_id","name","source","occurred_at"],"additionalProperties":false}}},"required":["events"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"inserted":{"type":"number"},"duplicates":{"type":"number"}},"required":["inserted","duplicates"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/metrics":{"post":{"tags":["Marketing"],"summary":"Write daily metrics (up to 1,000 facts; the same fact again replaces its value)","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"facts":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"object","properties":{"day":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"},"channel_account_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cha_.*"},"campaign_id":{"type":"string","maxLength":40,"format":"starts_with","pattern":"^cmp_.*"},"level":{"type":"string","enum":["account","campaign","channel_campaign","entity","asset","page","site"]},"entity_ref":{"type":"string","minLength":1,"maxLength":300},"metric":{"type":"string","pattern":"^[a-z][a-z0-9_]{0,63}$"},"value":{"type":"number"},"currency":{"type":"string","pattern":"^[A-Z]{3}$"},"attribution_window":{"type":"string","maxLength":40},"source":{"type":"string","pattern":"^[a-z0-9_]{2,40}$"}},"required":["day","level","entity_ref","metric","value","source"],"additionalProperties":false}}},"required":["facts"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"written":{"type":"number"}},"required":["written"],"additionalProperties":false}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}},"get":{"tags":["Marketing"],"summary":"Read daily metrics for a date range, by campaign, channel account, metric or level","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"from","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"to","in":"query","required":true,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$"}},{"name":"campaign_id","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"channel_account_id","in":"query","required":false,"schema":{"type":"string","maxLength":40}},{"name":"metric","in":"query","required":false,"schema":{"type":"string","maxLength":64}},{"name":"level","in":"query","required":false,"schema":{"type":"string","enum":["account","campaign","channel_campaign","entity","asset","page","site"]}},{"name":"limit","in":"query","required":true,"schema":{"default":1000,"type":"integer","minimum":1,"maximum":5000}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/connectors":{"get":{"tags":["Marketing"],"summary":"Each marketing connector before you connect it: what it reads, writes and can spend, its permissions and whether it's ready","x-required-scope":"connections:read","description":"Requires scope `connections:read`.","security":[{"apiKey":[]},{"oauth2":["connections:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/autonomy":{"get":{"tags":["Marketing"],"summary":"The kinds of marketing action, their checks and ceilings, and the autonomy levels each allows","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/credits":{"get":{"tags":["Marketing"],"summary":"Credits used this month and the monthly limit","x-required-scope":"billing:read","description":"Requires scope `billing:read`.","security":[{"apiKey":[]},{"oauth2":["billing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/credits/limit":{"put":{"tags":["Marketing"],"summary":"Set the monthly credit limit (owners; at most the plan's allowance; empty for the plan's allowance)","x-required-scope":"billing:write","description":"Requires scope `billing:write`.","security":[{"apiKey":[]},{"oauth2":["billing:write"]},{"session":[]}],"parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"monthly_limit":{"anyOf":[{"type":"number","minimum":0,"maximum":1000000000000},{"type":"null"}]}},"required":["monthly_limit"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/handoff/outbox":{"get":{"tags":["Marketing"],"summary":"Events waiting for or sent to your sales team (qualified leads, lead-ad leads, suppressions)","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"status","in":"query","required":false,"schema":{"type":"string","enum":["pending","sent","failed","held"]}},{"name":"limit","in":"query","required":true,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/modules":{"get":{"tags":["Marketing"],"summary":"The product's areas and which ones are on for your organization","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/switched-off":{"get":{"tags":["Marketing"],"summary":"The abilities that stay off in your areas until an owner turns them on, what each does and where it's turned on","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"has_more":{"type":"boolean"},"next_cursor":{"type":["string","null"]}},"required":["object","data"],"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/modules/{key}/preview":{"get":{"tags":["Marketing"],"summary":"What turning an area on would do outside the product and what it may cost, before you turn it on","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","maxLength":40}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/modules/{key}":{"put":{"tags":["Marketing"],"summary":"Turn an area of the product on or off for your organization (owners)","x-required-scope":"settings:write","description":"Requires scope `settings:write`.","security":[{"apiKey":[]},{"oauth2":["settings:write"]},{"session":[]}],"parameters":[{"name":"key","in":"path","required":true,"schema":{"type":"string","maxLength":40}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"enabled":{"type":"boolean"},"seen":{"type":"string","maxLength":64},"confirm":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/visibility":{"get":{"tags":["AI visibility"],"summary":"Your AI visibility from Karlsense: how often answers name you against your competitors, and what's suggested from it, each with its Karlsense page","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/visibility/suggestions":{"get":{"tags":["AI visibility"],"summary":"Suggestions from your AI visibility in Karlsense: outreach to sources answer engines cite, a brief per topic where competitors are named and you aren't, listening keywords, and Karlsense's recommendations","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"kind","in":"query","required":false,"schema":{"description":"One kind, or several separated by commas","type":"string","maxLength":60,"pattern":"^(outreach|brief|keyword|recommendation)(,(outreach|brief|keyword|recommendation)){0,3}$"}},{"name":"status","in":"query","required":true,"schema":{"default":"open","type":"string","enum":["open","accepted","dismissed","closed"]}},{"name":"limit","in":"query","required":true,"schema":{"default":25,"type":"integer","minimum":1,"maximum":100}},{"name":"cursor","in":"query","required":false,"schema":{"type":"string","maxLength":60,"pattern":"^\\d{1,7}(\\.\\d{1,2})?:aivs_[0-9a-z]{26}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/visibility/targeting":{"get":{"tags":["AI visibility"],"summary":"Where to target ads from your AI visibility in Karlsense: the questions where competitors are named and you aren't, and the sources answers cite without you, with how often","x-required-scope":"marketing:read","description":"Requires scope `marketing:read`.","security":[{"apiKey":[]},{"oauth2":["marketing:read"]},{"session":[]}],"parameters":[{"name":"days","in":"query","required":true,"schema":{"default":28,"type":"integer","minimum":7,"maximum":90}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/visibility/suggestions/{id}/accept":{"post":{"tags":["AI visibility"],"summary":"Accept a suggestion (a signed-in person): outreach or a brief becomes a draft in the content studio, a keyword a listening query in Social. Nothing is sent, posted or published","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`. Web sessions only.","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^aivs_[0-9a-z]{26}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"workspace_id":{"type":"string","pattern":"^ws_[0-9a-z]{26}$"}},"additionalProperties":false}}}},"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/marketing/visibility/suggestions/{id}/dismiss":{"post":{"tags":["AI visibility"],"summary":"Dismiss a suggestion; it isn't suggested again","x-required-scope":"marketing:write","description":"Requires scope `marketing:write`.","security":[{"apiKey":[]},{"oauth2":["marketing:write"]},{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^aivs_[0-9a-z]{26}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/me/ops-replies":{"get":{"tags":["Me"],"summary":"Replies the team sent you about your feedback that you haven't dismissed","security":[{"session":[]}],"parameters":[],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}},"/v1/me/ops-replies/{id}/seen":{"post":{"tags":["Me"],"summary":"Dismiss a reply the team sent you (it won't show again)","security":[{"session":[]}],"parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^oir_[0-9a-z]{26}$"}}],"responses":{"200":{"description":"OK","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema"}}}},"429":{"description":"Rate limited. Retry after the number of seconds in Retry-After.","headers":{"X-RateLimit-Limit":{"schema":{"type":"integer"},"description":"Requests allowed per minute for this key or user"},"X-RateLimit-Remaining":{"schema":{"type":"integer"},"description":"Requests left in the current window"},"X-RateLimit-Reset":{"schema":{"type":"integer"},"description":"Unix time (seconds) when the window resets"},"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait"}},"content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}},"default":{"description":"Error","content":{"application/json":{"schema":{"$schema":"https://json-schema.org/draft/2020-12/schema","type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"},"details":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["code","message"],"additionalProperties":false}},"required":["error"],"additionalProperties":false}}}}}}}}}