{"openapi":"3.1.0","info":{"title":"Shots API","version":"1.0.0","summary":"Public HTTP API for Shots.","description":"Shots turns a software release into a reviewed launch: a cited brief, on-brand visuals, and channel posts that a person approves before anything is scheduled. This API exposes the same workspace operations the app uses.\n\n## Quickstart\n\n1. Create a workspace API key in **Settings → Developer API** (`https://shots.playbookmedia.io/workspace/developers`). Give it only the scopes it needs. The key is shown once.\n2. Send it in the `X-API-Key` header:\n\n```bash\nexport SHOTS_API_KEY=\"ss_...\"\ncurl https://shots.playbookmedia.io/api/v1/releases -H \"X-API-Key: $SHOTS_API_KEY\"\n```\n\n3. Create a draft campaign. Every post starts as a draft; nothing is scheduled until a person approves it:\n\n```bash\ncurl -X POST https://shots.playbookmedia.io/api/v1/campaigns \\\n  -H \"X-API-Key: $SHOTS_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -H \"Idempotency-Key: recurring-invoices-launch\" \\\n  -d '{\"name\":\"Recurring invoices\",\"objective\":\"Announce recurring invoices\",\"posts\":[{\"channel\":\"linkedin\",\"copy\":\"Recurring invoices are here.\"}]}'\n```\n\n4. Submit the drafts for review with `POST /api/v1/campaigns/{campaignId}/review-requests`. Approvers decide in the app.\n\n### Typed TypeScript client\n\nThe document is OpenAPI 3.1. Generate types from it and call the API with full request and response typing:\n\n```bash\nnpx openapi-typescript https://shots.playbookmedia.io/openapi.json -o shots.d.ts\nnpm install openapi-fetch\n```\n\n```ts\nimport createClient from 'openapi-fetch'\nimport type { paths } from './shots'\n\nconst shots = createClient<paths>({\n  baseUrl: 'https://shots.playbookmedia.io',\n  headers: { 'X-API-Key': process.env.SHOTS_API_KEY! },\n})\nconst { data, error } = await shots.GET('/api/v1/campaigns/{campaignId}', {\n  params: { path: { campaignId: 'c...' } },\n})\n```\n\n## Authentication\n\n| Credential | How to send it | For |\n| --- | --- | --- |\n| Workspace API key | `X-API-Key: ss_...` | Scripts, CI, and agents. A key belongs to one workspace and carries scopes. |\n| Signed-in session | The `better-auth.session_token` cookie | Same-origin browser calls, checked against the member's role. |\n\nEach operation lists the scope it needs in its security requirement. A key can never choose another workspace: the workspace is the key's own.\n\n| Scope | Allows |\n| --- | --- |\n| `artifact:read` | Read releases, campaigns, the review queue, the publishing schedule, and link previews; sign asset downloads; use the editor utilities. |\n| `asset:write` | Complete and delete asset uploads. |\n| `draft:write` | Create, update, and delete content drafts. Only a person schedules a draft. |\n| `onboarding:run` | Read a product site into its profile and follow the run. |\n| `post:schedule` | Schedule campaign posts and visuals a person approved, and cancel scheduled posts. It never approves anything. |\n| `release:create` | Create releases and draft campaigns, and submit drafts for review. |\n| `source:write` | Register and update release-intake sources. |\n| `upload:sign` | Sign asset uploads. |\n\nApproving, rejecting, or requesting changes on posts is a person's decision and takes a session only. Those operations refuse API keys with `403`, whatever the key's scopes.\n\nA key with `post:schedule` may schedule campaign posts and visuals a person approved, and cancel scheduled posts. Nothing unapproved can be scheduled, by a key or a person. A session that schedules a variant or cancels a post needs a sign-in under 15 minutes old with two-factor enabled.\n\nShell operations (`/api/v1/me`, `/api/v1/bootstrap`, `/api/v1/organizations`) describe the signed-in user and refuse API keys.\n\n## Plans and limits\n\nThere is no free plan. Every workspace operation needs an active subscription. Each gated operation publishes its gate in `x-shots-entitlement`: the `feature` it needs, the `minimumPlan` that includes it, and the `quota` it consumes.\n\n- A workspace without the feature gets `403` with code `workspace_feature_not_entitled`, plus `feature`, `currentPlan`, and `requiredPlan`.\n- A metered write past its quota gets `429` with code `workspace_quota_exceeded`, plus `Retry-After` and `X-RateLimit-*` headers.\n- Each API key is also limited to 60 requests per minute.\n\n## Idempotency\n\nCreating a release, campaign, or scheduled post accepts an `Idempotency-Key` header of up to 128 characters. A retry with the same key returns the original result with `200` instead of creating a duplicate. Status changes (campaign transitions, review requests, approvals, cancellations) apply only from the current status, so a repeated request returns `409` and changes nothing.\n\n## Errors\n\nEvery failure returns one JSON envelope with a stable `code`, a human-readable `message`, and a `hint`. Branch on `code`; it is stable within `v1`. Every response carries `X-Request-Id`; send your own to correlate logs.","contact":{"name":"Shots","url":"https://shots.playbookmedia.io/contact"},"license":{"name":"Apache-2.0","url":"https://www.apache.org/licenses/LICENSE-2.0"},"termsOfService":"https://shots.playbookmedia.io/terms"},"servers":[{"url":"https://shots.playbookmedia.io","description":"Production"}],"externalDocs":{"description":"Interactive Shots API reference","url":"https://shots.playbookmedia.io/api-reference"},"security":[],"tags":[{"name":"Screenshots","description":"Capture live web pages as images."},{"name":"Images","description":"Optimize and proxy image bytes."},{"name":"Social","description":"Resolve social media content."},{"name":"Workspace","description":"Authenticated workspace release and source configuration operations."},{"name":"Assets","description":"Authenticated workspace asset upload and download operations."},{"name":"Shell","description":"Signed-in user context for Playbook shells: bootstrap, organizations, membership, and capabilities. Rendering hints only; every mutation is re-authorized server-side."},{"name":"Discovery","description":"Machine-readable descriptions of the site and this API."}],"paths":{"/api/screenshot":{"post":{"operationId":"captureScreenshot","summary":"Capture a web page screenshot","description":"Renders the page at the given URL and returns the screenshot as a base64-encoded PNG. Results are cached per URL, device type, and color scheme; set `forceRefresh` to bypass the cache. Limited to 20 requests per minute per IP address.","tags":["Screenshots"],"security":[{"workspaceSession":[]},{"workspaceApiKey":["artifact:read"]}],"x-shots-entitlement":{"feature":"workspace:use","minimumPlan":"pro"},"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenshotRequest"}}}},"responses":{"200":{"description":"Screenshot captured or served from cache.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScreenshotResponse"}}}},"400":{"description":"The URL or an option value is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No signed-in session or workspace API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The workspace has no active paid plan, or the key lacks artifact:read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"408":{"description":"The target page took too long to load.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Per-IP rate limit exceeded.","headers":{"Retry-After":{"description":"Seconds to wait before retrying.","schema":{"type":"integer"}},"X-RateLimit-Limit":{"description":"Requests allowed per window.","schema":{"type":"integer"}},"X-RateLimit-Remaining":{"description":"Requests remaining in the current window.","schema":{"type":"integer"}},"X-RateLimit-Reset":{"description":"Unix epoch milliseconds when the window resets.","schema":{"type":"integer"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RateLimitError"}}}},"500":{"description":"The screenshot could not be produced.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"The upstream screenshot service is down.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"captureScreenshotMethodProbe","summary":"Method probe for the screenshot endpoint","description":"The screenshot endpoint only accepts POST. GET returns a 405 with the same JSON error envelope and an `Allow` header.","tags":["Screenshots"],"responses":{"405":{"description":"Method not allowed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/export":{"post":{"operationId":"optimizeExportImage","summary":"Recompress an image","description":"Accepts a raw image as multipart form data and returns an optimized image in the requested format. JPEG uses the MozJPEG encoder, WebP uses libwebp, and PNG uses adaptive filtering. The response body is the image bytes, not JSON.","tags":["Images"],"security":[{"workspaceSession":[]},{"workspaceApiKey":["artifact:read"]}],"x-shots-entitlement":{"feature":"workspace:use","minimumPlan":"pro"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/ExportRequest"},"encoding":{"image":{"contentType":"image/png, image/jpeg, image/webp"}}}}},"responses":{"200":{"description":"Optimized image bytes.","content":{"image/png":{"schema":{"type":"string","format":"binary"}},"image/jpeg":{"schema":{"type":"string","format":"binary"}},"image/webp":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"Missing image, or invalid format/quality preset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No signed-in session or workspace API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The workspace has no active paid plan, or the key lacks artifact:read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"405":{"description":"Method not allowed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The image could not be processed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"operationId":"optimizeExportImageMethodProbe","summary":"Method probe for the export endpoint","description":"The export endpoint only accepts POST. GET returns a 405 with the same JSON error envelope and an `Allow` header.","tags":["Images"],"responses":{"405":{"description":"Method not allowed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/tweet/{id}":{"get":{"operationId":"getTweet","summary":"Fetch a tweet by ID","description":"Returns the public tweet payload used to render a tweet as an image. The `id` is the numeric status ID from the tweet URL.","tags":["Social"],"security":[{"workspaceSession":[]},{"workspaceApiKey":["artifact:read"]}],"x-shots-entitlement":{"feature":"workspace:use","minimumPlan":"pro"},"parameters":[{"name":"id","in":"path","required":true,"description":"Numeric tweet status ID, for example 1234567890123456789.","schema":{"type":"string","pattern":"^[0-9]+$"}}],"responses":{"200":{"description":"Tweet payload.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TweetResponse"}}}},"401":{"description":"No signed-in session or workspace API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The workspace has no active paid plan, or the key lacks artifact:read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No tweet exists with that ID.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The tweet could not be fetched.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/image-proxy":{"get":{"operationId":"proxyTwitterImage","summary":"Proxy a Twitter media file","description":"Streams a Twitter-hosted image through this origin so it can be drawn onto a canvas without tainting it. Only pbs.twimg.com, abs.twimg.com, ton.twitter.com, and video.twimg.com are allowed.","tags":["Images"],"security":[{"workspaceSession":[]},{"workspaceApiKey":["artifact:read"]}],"x-shots-entitlement":{"feature":"workspace:use","minimumPlan":"pro"},"parameters":[{"name":"url","in":"query","required":true,"description":"Absolute URL of the Twitter-hosted media file.","schema":{"type":"string","format":"uri"}}],"responses":{"200":{"description":"Image bytes.","content":{"image/*":{"schema":{"type":"string","format":"binary"}}}},"400":{"description":"The `url` query parameter is missing.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"No signed-in session or workspace API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The host is not on the allowlist, the workspace has no active paid plan, or the key lacks artifact:read.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"500":{"description":"The image could not be fetched.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"The upstream host refused the request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/api/v1/releases":{"get":{"x-shots-entitlement":{"feature":"workspace:use","minimumPlan":"pro"},"description":"Lists releases in the API key workspace. Requires the `artifact:read` scope.","operationId":"listReleases","parameters":[{"in":"query","name":"limit","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Workspace releases.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseListResponse"}}}},"400":{"description":"The list query is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["artifact:read"]},{"workspaceSession":[]}],"summary":"List workspace releases","tags":["Workspace"]},"post":{"x-shots-entitlement":{"feature":"release:create","minimumPlan":"pro","quota":"api:write:minute"},"description":"Creates a release in the API key workspace. Accepts `Idempotency-Key` and requires the `release:create` scope.","operationId":"createRelease","parameters":[{"in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string","maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReleaseCreateRequest"}}}},"responses":{"200":{"description":"An existing idempotent result.","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"boolean"},"release":{"type":"object","properties":{"id":{"type":"string"},"productSurfaceId":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","READY","ARCHIVED","CANCELLED"]},"title":{"type":"string"}},"required":["id","productSurfaceId","status","title"],"additionalProperties":false}},"required":["created","release"],"additionalProperties":false}}}},"201":{"description":"Release created.","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"boolean"},"release":{"type":"object","properties":{"id":{"type":"string"},"productSurfaceId":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","READY","ARCHIVED","CANCELLED"]},"title":{"type":"string"}},"required":["id","productSurfaceId","status","title"],"additionalProperties":false}},"required":["created","release"],"additionalProperties":false}}}},"400":{"description":"The release input is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["release:create"]},{"workspaceSession":[]}],"summary":"Create a workspace release","tags":["Workspace"]}},"/api/v1/source-apps":{"post":{"x-shots-entitlement":{"feature":"source-app:create","minimumPlan":"pro","quota":"api:write:minute"},"description":"Registers a release-intake source in the API key workspace and returns its webhook URL. Without a `secretReference`, the response also carries the webhook secret, shown only this once. Requires the `source:write` scope.","operationId":"createSourceApp","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceAppCreateRequest"}}}},"responses":{"201":{"description":"Source app created.","content":{"application/json":{"schema":{"type":"object","properties":{"sourceApp":{"type":"object","properties":{"allowedHosts":{"type":"array","items":{"type":"string"}},"branch":{"type":["string","null"]},"createdAt":{"type":"string"},"externalId":{"type":["string","null"]},"id":{"type":"string"},"ignoreBotPullRequests":{"type":"boolean"},"ignoredPullRequestAuthors":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"organizationId":{"type":"string"},"provider":{"type":"string"},"secretReference":{"type":["string","null"]},"skipPrereleases":{"type":"boolean"},"status":{"type":"string","enum":["DRAFT","ACTIVE","ARCHIVED"]},"updatedAt":{"type":"string"}},"required":["allowedHosts","branch","createdAt","externalId","id","ignoreBotPullRequests","ignoredPullRequestAuthors","name","organizationId","provider","secretReference","skipPrereleases","status","updatedAt"],"additionalProperties":false},"webhook":{"type":"object","properties":{"secret":{"type":["string","null"]},"url":{"type":"string","format":"uri"}},"required":["secret","url"],"additionalProperties":false}},"required":["sourceApp","webhook"],"additionalProperties":false}}}},"400":{"description":"The source app input is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["source:write"]},{"workspaceSession":[]}],"summary":"Create a workspace source app","tags":["Workspace"]}},"/api/v1/source-apps/{sourceAppId}":{"patch":{"x-shots-entitlement":{"feature":"workspace:use","minimumPlan":"pro","quota":"api:write:minute"},"description":"Changes which webhook deliveries a source turns into releases: the watched branch, the bot and author filters, and pre-release handling. Requires the `source:write` scope.","operationId":"updateSourceApp","parameters":[{"in":"path","name":"sourceAppId","required":true,"schema":{"type":"string","minLength":1}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SourceAppUpdateRequest"}}}},"responses":{"200":{"description":"Source app updated.","content":{"application/json":{"schema":{"type":"object","properties":{"sourceApp":{"type":"object","properties":{"allowedHosts":{"type":"array","items":{"type":"string"}},"branch":{"type":["string","null"]},"createdAt":{"type":"string"},"externalId":{"type":["string","null"]},"id":{"type":"string"},"ignoreBotPullRequests":{"type":"boolean"},"ignoredPullRequestAuthors":{"type":"array","items":{"type":"string"}},"name":{"type":"string"},"organizationId":{"type":"string"},"provider":{"type":"string"},"secretReference":{"type":["string","null"]},"skipPrereleases":{"type":"boolean"},"status":{"type":"string","enum":["DRAFT","ACTIVE","ARCHIVED"]},"updatedAt":{"type":"string"}},"required":["allowedHosts","branch","createdAt","externalId","id","ignoreBotPullRequests","ignoredPullRequestAuthors","name","organizationId","provider","secretReference","skipPrereleases","status","updatedAt"],"additionalProperties":false}},"required":["sourceApp"],"additionalProperties":false}}}},"400":{"description":"The rules are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No source app with that ID exists in the workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["source:write"]},{"workspaceSession":[]}],"summary":"Update a workspace source app","tags":["Workspace"]}},"/api/v1/link-preview":{"get":{"x-shots-entitlement":{"feature":"workspace:use","minimumPlan":"pro"},"description":"Reads a public page as the chosen crawler and reports how its links preview: every meta tag, the measured preview images, robots.txt access for each platform crawler, the redirect chain, a 0 to 100 score, and each issue with its fix. Run it in CI to fail a deploy whose links would preview badly. Requires the `artifact:read` scope.","operationId":"getLinkPreview","parameters":[{"in":"query","name":"url","required":true,"schema":{"type":"string","maxLength":2048,"format":"uri"}},{"in":"query","name":"agent","required":false,"schema":{"default":"default","type":"string","enum":["default","facebook","x","linkedin","slack","discord","telegram","whatsapp","google"]}}],"responses":{"200":{"description":"The check.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LinkPreviewReport"}}}},"400":{"description":"The URL is invalid, private, or not on a standard web port.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"The page could not be read: it timed out, errored, or is not HTML.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Too many checks for this workspace; retry after the reset.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceQuotaError"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["artifact:read"]},{"workspaceSession":[]}],"summary":"Check how a link previews","tags":["Workspace"]}},"/api/v1/assets/upload-url":{"post":{"x-shots-entitlement":{"feature":"asset:create","minimumPlan":"pro","quota":"api:write:minute"},"description":"Creates an asset record and a short-lived signed upload URL. Upload the bytes with `PUT`, the declared `Content-Type`, and `If-None-Match: *`: the URL is write-once and both headers are part of its signature. Requires the `upload:sign` scope.","operationId":"createAssetUploadUrl","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetUploadRequest"}}}},"responses":{"201":{"description":"Signed upload instructions.","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string"},"objectKey":{"type":"string"},"status":{"type":"string","enum":["PENDING","UPLOADED","FAILED","DELETED"]}},"required":["id","objectKey","status"],"additionalProperties":false},"uploadUrl":{"type":"string"}},"required":["asset","uploadUrl"],"additionalProperties":false}}}},"400":{"description":"The asset metadata is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["upload:sign"]},{"workspaceSession":[]}],"summary":"Create a signed asset upload URL","tags":["Assets"]}},"/api/v1/assets/{assetId}/complete":{"post":{"x-shots-entitlement":{"feature":"workspace:use","minimumPlan":"pro","quota":"api:write:minute"},"description":"Marks a signed upload as complete after storage verification. Requires the `asset:write` scope.","operationId":"completeAssetUpload","parameters":[{"in":"path","name":"assetId","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetCompleteRequest"}}}},"responses":{"200":{"description":"Asset upload completed.","content":{"application/json":{"schema":{"type":"object","properties":{"asset":{"type":"object","properties":{"id":{"type":"string"},"objectKey":{"type":"string"},"status":{"type":"string","enum":["PENDING","UPLOADED","FAILED","DELETED"]}},"required":["id","objectKey","status"],"additionalProperties":false}},"required":["asset"],"additionalProperties":false}}}},"400":{"description":"The completion input is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The asset was not found in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["asset:write"]},{"workspaceSession":[]}],"summary":"Complete an asset upload","tags":["Assets"]}},"/api/v1/assets/{assetId}/download-url":{"get":{"x-shots-entitlement":{"feature":"workspace:use","minimumPlan":"pro"},"description":"Returns a short-lived signed download URL for a workspace asset. Requires the `artifact:read` scope.","operationId":"createAssetDownloadUrl","parameters":[{"in":"path","name":"assetId","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"200":{"description":"Signed asset download URL.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AssetDownloadResponse"}}}},"400":{"description":"The asset identifier is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The asset was not found in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["artifact:read"]},{"workspaceSession":[]}],"summary":"Create a signed asset download URL","tags":["Assets"]}},"/api/v1/assets/{assetId}":{"delete":{"x-shots-entitlement":{"feature":"asset:delete","minimumPlan":"pro","quota":"api:write:minute"},"description":"Queues deletion of an uploaded asset that is not in use. Requires the `asset:write` scope and the asset deletion workspace entitlement (Pro or higher by default).","operationId":"deleteAsset","parameters":[{"in":"path","name":"assetId","required":true,"schema":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"}}],"responses":{"202":{"description":"Asset deletion accepted.","content":{"application/json":{"schema":{"type":"object","properties":{"accepted":{"type":"boolean","const":true}},"required":["accepted"],"additionalProperties":false}}}},"400":{"description":"The asset identifier is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The principal lacks the required workspace permission, scope, or pricing entitlement.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The asset was not found in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The asset is in use or is not ready for deletion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The workspace plan quota has been exceeded.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceQuotaError"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["asset:write"]},{"workspaceSession":[]}],"summary":"Delete a workspace asset","tags":["Assets"]}},"/api/v1/campaigns":{"get":{"x-shots-entitlement":{"feature":"campaign:workflow","minimumPlan":"pro"},"description":"Lists every campaign in the workspace, newest first. Requires the `artifact:read` scope.","operationId":"listCampaigns","responses":{"200":{"description":"Workspace campaigns.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignListResponse"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["artifact:read"]},{"workspaceSession":[]}],"summary":"List campaigns","tags":["Campaigns"]},"post":{"x-shots-entitlement":{"feature":"campaign:workflow","minimumPlan":"pro","quota":"api:write:minute"},"description":"Creates a draft campaign with its angles and channel posts. Every post starts as `DRAFT`; nothing is reviewed, scheduled, or published. Copy is checked against the brand profile. Accepts `Idempotency-Key`: a retry with the same key returns the first campaign with `200`. Requires the `release:create` scope.","operationId":"createCampaign","parameters":[{"in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string","maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCreateRequest"}}}},"responses":{"200":{"description":"An earlier request with this idempotency key created the campaign.","content":{"application/json":{"schema":{"type":"object","properties":{"campaign":{"type":"object","properties":{"audience":{"type":["string","null"]},"createdAt":{"type":"string"},"createdByUserId":{"type":["string","null"]},"feature":{"type":["string","null"]},"id":{"type":"string"},"messaging":{"type":["string","null"]},"name":{"type":"string"},"objective":{"type":"string"},"organizationId":{"type":"string"},"productSurfaceId":{"type":["string","null"]},"releaseId":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","READY_FOR_REVIEW","APPROVED","ARCHIVED"]},"updatedAt":{"type":"string"},"angles":{"type":"array","items":{"type":"object","properties":{"campaignId":{"type":"string"},"createdAt":{"type":"string"},"hook":{"type":"string"},"id":{"type":"string"},"organizationId":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"},"updatedAt":{"type":"string"}},"required":["campaignId","createdAt","hook","id","organizationId","position","title","updatedAt"],"additionalProperties":false}},"assets":{"type":"array","items":{"type":"object","properties":{"asset":{"type":"object","properties":{"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"id":{"type":"string"},"mediaType":{"type":"string"},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["height","id","mediaType","width"],"additionalProperties":false},"assetId":{"type":"string"},"campaignId":{"type":"string"},"caption":{"type":["string","null"]},"createdAt":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"organizationId":{"type":"string"},"planAssetKey":{"type":["string","null"]},"planVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"variantLabel":{"type":["string","null"]}},"required":["asset","assetId","campaignId","caption","createdAt","id","kind","organizationId","planAssetKey","planVersion","variantLabel"],"additionalProperties":false}},"posts":{"type":"array","items":{"type":"object","properties":{"angleId":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"approvedByUserId":{"type":["string","null"]},"callToAction":{"type":["string","null"]},"campaignId":{"type":"string"},"channel":{"type":"string"},"claims":{"anyOf":[{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},{"type":"null"}]},"copy":{"type":"string"},"createdAt":{"type":"string"},"creativeVariantId":{"type":["string","null"]},"id":{"type":"string"},"organizationId":{"type":"string"},"phase":{"type":["string","null"]},"planItemKey":{"type":["string","null"]},"planVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"reviewNote":{"description":"Why a reviewer rejected or asked for changes.","type":["string","null"]},"scheduledAt":{"type":["string","null"]},"scheduledPostId":{"type":["string","null"]},"scheduledPostStatus":{"anyOf":[{"type":"string","enum":["DRAFT","SCHEDULED","PROCESSING","PUBLISHED","FAILED","CANCELLED","UNKNOWN_DELIVERY"]},{"type":"null"}],"description":"Delivery state of `scheduledPostId`."},"specVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"status":{"type":"string","enum":["DRAFT","READY_FOR_REVIEW","APPROVED","REJECTED","NEEDS_CHANGES","SCHEDULED","PUBLISHED"]},"title":{"type":["string","null"]},"updatedAt":{"type":"string"}},"required":["angleId","approvedAt","approvedByUserId","callToAction","campaignId","channel","claims","copy","createdAt","creativeVariantId","id","organizationId","phase","planItemKey","planVersion","reviewNote","scheduledAt","scheduledPostId","scheduledPostStatus","specVersion","status","title","updatedAt"],"additionalProperties":false}},"productSurface":{"anyOf":[{"type":"object","properties":{"environment":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"required":["environment","id","name","url"],"additionalProperties":false},{"type":"null"}]},"release":{"anyOf":[{"type":"object","properties":{"audience":{"type":["string","null"]},"benefitStatement":{"type":"string"},"description":{"type":["string","null"]},"id":{"type":"string"},"sourceUrls":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"title":{"type":"string"},"updatedAt":{"type":"string"}},"required":["audience","benefitStatement","description","id","sourceUrls","status","title","updatedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["audience","createdAt","createdByUserId","feature","id","messaging","name","objective","organizationId","productSurfaceId","releaseId","status","updatedAt","angles","assets","posts","productSurface","release"],"additionalProperties":false},"created":{"type":"boolean"}},"required":["campaign","created"],"additionalProperties":false}}}},"201":{"description":"Campaign created.","content":{"application/json":{"schema":{"type":"object","properties":{"campaign":{"type":"object","properties":{"audience":{"type":["string","null"]},"createdAt":{"type":"string"},"createdByUserId":{"type":["string","null"]},"feature":{"type":["string","null"]},"id":{"type":"string"},"messaging":{"type":["string","null"]},"name":{"type":"string"},"objective":{"type":"string"},"organizationId":{"type":"string"},"productSurfaceId":{"type":["string","null"]},"releaseId":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","READY_FOR_REVIEW","APPROVED","ARCHIVED"]},"updatedAt":{"type":"string"},"angles":{"type":"array","items":{"type":"object","properties":{"campaignId":{"type":"string"},"createdAt":{"type":"string"},"hook":{"type":"string"},"id":{"type":"string"},"organizationId":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"},"updatedAt":{"type":"string"}},"required":["campaignId","createdAt","hook","id","organizationId","position","title","updatedAt"],"additionalProperties":false}},"assets":{"type":"array","items":{"type":"object","properties":{"asset":{"type":"object","properties":{"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"id":{"type":"string"},"mediaType":{"type":"string"},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["height","id","mediaType","width"],"additionalProperties":false},"assetId":{"type":"string"},"campaignId":{"type":"string"},"caption":{"type":["string","null"]},"createdAt":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"organizationId":{"type":"string"},"planAssetKey":{"type":["string","null"]},"planVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"variantLabel":{"type":["string","null"]}},"required":["asset","assetId","campaignId","caption","createdAt","id","kind","organizationId","planAssetKey","planVersion","variantLabel"],"additionalProperties":false}},"posts":{"type":"array","items":{"type":"object","properties":{"angleId":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"approvedByUserId":{"type":["string","null"]},"callToAction":{"type":["string","null"]},"campaignId":{"type":"string"},"channel":{"type":"string"},"claims":{"anyOf":[{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},{"type":"null"}]},"copy":{"type":"string"},"createdAt":{"type":"string"},"creativeVariantId":{"type":["string","null"]},"id":{"type":"string"},"organizationId":{"type":"string"},"phase":{"type":["string","null"]},"planItemKey":{"type":["string","null"]},"planVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"reviewNote":{"description":"Why a reviewer rejected or asked for changes.","type":["string","null"]},"scheduledAt":{"type":["string","null"]},"scheduledPostId":{"type":["string","null"]},"scheduledPostStatus":{"anyOf":[{"type":"string","enum":["DRAFT","SCHEDULED","PROCESSING","PUBLISHED","FAILED","CANCELLED","UNKNOWN_DELIVERY"]},{"type":"null"}],"description":"Delivery state of `scheduledPostId`."},"specVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"status":{"type":"string","enum":["DRAFT","READY_FOR_REVIEW","APPROVED","REJECTED","NEEDS_CHANGES","SCHEDULED","PUBLISHED"]},"title":{"type":["string","null"]},"updatedAt":{"type":"string"}},"required":["angleId","approvedAt","approvedByUserId","callToAction","campaignId","channel","claims","copy","createdAt","creativeVariantId","id","organizationId","phase","planItemKey","planVersion","reviewNote","scheduledAt","scheduledPostId","scheduledPostStatus","specVersion","status","title","updatedAt"],"additionalProperties":false}},"productSurface":{"anyOf":[{"type":"object","properties":{"environment":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"required":["environment","id","name","url"],"additionalProperties":false},{"type":"null"}]},"release":{"anyOf":[{"type":"object","properties":{"audience":{"type":["string","null"]},"benefitStatement":{"type":"string"},"description":{"type":["string","null"]},"id":{"type":"string"},"sourceUrls":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"title":{"type":"string"},"updatedAt":{"type":"string"}},"required":["audience","benefitStatement","description","id","sourceUrls","status","title","updatedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["audience","createdAt","createdByUserId","feature","id","messaging","name","objective","organizationId","productSurfaceId","releaseId","status","updatedAt","angles","assets","posts","productSurface","release"],"additionalProperties":false},"created":{"type":"boolean"}},"required":["campaign","created"],"additionalProperties":false}}}},"400":{"description":"The campaign input is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The release or product page is not in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"A post uses a term the brand profile prohibits.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The workspace write quota is exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceQuotaError"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["release:create"]},{"workspaceSession":[]}],"summary":"Create a draft campaign","tags":["Campaigns"]}},"/api/v1/campaigns/{campaignId}":{"get":{"x-shots-entitlement":{"feature":"campaign:workflow","minimumPlan":"pro"},"description":"Returns a campaign with its angles, channel posts, linked assets, product page, and release. Each post carries its review status and, once scheduled, its delivery status. Requires the `artifact:read` scope.","operationId":"getCampaign","parameters":[{"in":"path","name":"campaignId","required":true,"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"}}],"responses":{"200":{"description":"The campaign.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignDetail"}}}},"400":{"description":"The campaign identifier is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No campaign with that ID exists in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["artifact:read"]},{"workspaceSession":[]}],"summary":"Get a campaign","tags":["Campaigns"]}},"/api/v1/campaigns/{campaignId}/transitions":{"post":{"x-shots-entitlement":{"feature":"campaign:workflow","minimumPlan":"pro","quota":"api:write:minute"},"description":"Moves a campaign through its lifecycle: `DRAFT` to `READY_FOR_REVIEW` or `ARCHIVED`, back to `DRAFT`, or out of the archive. Moving to `APPROVED` needs a signed-in approver; an API key is refused. The transition applies only from the status the campaign has now, so a repeated request returns `409` and changes nothing. Requires the `release:create` scope.","operationId":"transitionCampaign","parameters":[{"in":"path","name":"campaignId","required":true,"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignTransitionRequest"}}}},"responses":{"200":{"description":"The campaign moved to the new status.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string"},"status":{"type":"string","enum":["DRAFT","READY_FOR_REVIEW","APPROVED","ARCHIVED"]}},"required":["id","status"],"additionalProperties":false}}}},"400":{"description":"The status is not a campaign status.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Approving needs a signed-in approver, or the principal lacks the scope or plan.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No campaign with that ID exists in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The campaign cannot move to that status from its current one.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The workspace write quota is exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceQuotaError"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["release:create"]},{"workspaceSession":[]}],"summary":"Change a campaign status","tags":["Campaigns"]}},"/api/v1/approvals":{"get":{"x-shots-entitlement":{"feature":"campaign:workflow","minimumPlan":"pro"},"description":"Lists the review queue: campaign posts in `READY_FOR_REVIEW`, oldest first, each with its campaign. Requires the `artifact:read` scope.","operationId":"listApprovals","parameters":[{"in":"query","name":"cursor","required":false,"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"}},{"in":"query","name":"limit","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Posts waiting for review.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ApprovalListResponse"}}}},"400":{"description":"The list query is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["artifact:read"]},{"workspaceSession":[]}],"summary":"List posts waiting for review","tags":["Approvals"]}},"/api/v1/campaigns/{campaignId}/review-requests":{"post":{"x-shots-entitlement":{"feature":"campaign:workflow","minimumPlan":"pro","quota":"api:write:minute"},"description":"Submits draft and needs-changes posts for review, moving them to `READY_FOR_REVIEW` and notifying approvers. Without `postIds` every eligible post is submitted; with `postIds` exactly those, or nothing when any is not eligible. A repeated request returns `409`. Requires the `release:create` scope. Only a person can approve what is submitted.","operationId":"requestCampaignReview","parameters":[{"in":"path","name":"campaignId","required":true,"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignReviewRequest"}}}},"responses":{"200":{"description":"The posts are waiting for review.","content":{"application/json":{"schema":{"type":"object","properties":{"postIds":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["DRAFT","READY_FOR_REVIEW","APPROVED","REJECTED","NEEDS_CHANGES","SCHEDULED","PUBLISHED"]}},"required":["postIds","status"],"additionalProperties":false}}}},"400":{"description":"The post identifiers are invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No campaign with that ID exists in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"No post, or not every listed post, is a draft or needs changes.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The workspace write quota is exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceQuotaError"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["release:create"]},{"workspaceSession":[]}],"summary":"Submit posts for review","tags":["Approvals"]}},"/api/v1/campaigns/{campaignId}/approvals":{"post":{"x-shots-entitlement":{"feature":"campaign:workflow","minimumPlan":"pro"},"description":"Approves, rejects, or requests changes on posts in `READY_FOR_REVIEW`. Without `postIds` the decision applies to every post waiting for review; with `postIds` it applies to exactly those, and if any is not waiting the whole call fails and nothing changes. A note on a rejection or change request guides the next draft. One audit record covers the batch. A repeated decision returns `409`. Requires a signed-in approver; API keys and agents can never approve.","operationId":"decideCampaignApproval","parameters":[{"in":"path","name":"campaignId","required":true,"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignApprovalRequest"}}}},"responses":{"200":{"description":"The posts moved to the decided status.","content":{"application/json":{"schema":{"type":"object","properties":{"postIds":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["DRAFT","READY_FOR_REVIEW","APPROVED","REJECTED","NEEDS_CHANGES","SCHEDULED","PUBLISHED"]}},"required":["postIds","status"],"additionalProperties":false}}}},"400":{"description":"The decision input is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"A signed-in workspace session is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The member lacks the permission or plan, the sign-in is not fresh enough, or the request sent an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No campaign with that ID exists in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"No post, or not every listed post, is waiting for review.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceSession":[]}],"summary":"Decide on posts waiting for review","tags":["Approvals"]}},"/api/v1/campaigns/{campaignId}/posts/{postId}/schedule":{"post":{"x-shots-entitlement":{"feature":"campaign:workflow","minimumPlan":"pro","quota":"api:write:minute"},"description":"Schedules an approved campaign post on a channel connection that publishes its channel. The post must be `APPROVED` with an approved visual: the one it has, or `creativeVariantId`, an approved variant of this campaign’s designs. Scheduling never approves. The copy is checked again against the brand profile and the channel’s character limit, and every link in the post is read first: a link whose preview is broken stops the schedule unless `skipLinkCheck` is true. Each new post counts against the monthly posts allowance. Repeating the request on the same channel returns the post as scheduled; a cancelled or failed post can be scheduled again. Requires the `post:schedule` scope, or a member who manages publishing.","operationId":"scheduleCampaignPost","parameters":[{"in":"path","name":"campaignId","required":true,"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"}},{"in":"path","name":"postId","required":true,"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignPostScheduleRequest"}}}},"responses":{"200":{"description":"The post is scheduled.","content":{"application/json":{"schema":{"type":"object","properties":{"angleId":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"approvedByUserId":{"type":["string","null"]},"callToAction":{"type":["string","null"]},"campaignId":{"type":"string"},"channel":{"type":"string"},"claims":{"anyOf":[{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},{"type":"null"}]},"copy":{"type":"string"},"createdAt":{"type":"string"},"creativeVariantId":{"type":["string","null"]},"id":{"type":"string"},"organizationId":{"type":"string"},"phase":{"type":["string","null"]},"planItemKey":{"type":["string","null"]},"planVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"reviewNote":{"description":"Why a reviewer rejected or asked for changes.","type":["string","null"]},"scheduledAt":{"type":["string","null"]},"scheduledPostId":{"type":["string","null"]},"scheduledPostStatus":{"anyOf":[{"type":"string","enum":["DRAFT","SCHEDULED","PROCESSING","PUBLISHED","FAILED","CANCELLED","UNKNOWN_DELIVERY"]},{"type":"null"}],"description":"Delivery state of `scheduledPostId`."},"specVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"status":{"type":"string","enum":["DRAFT","READY_FOR_REVIEW","APPROVED","REJECTED","NEEDS_CHANGES","SCHEDULED","PUBLISHED"]},"title":{"type":["string","null"]},"updatedAt":{"type":"string"}},"required":["angleId","approvedAt","approvedByUserId","callToAction","campaignId","channel","claims","copy","createdAt","creativeVariantId","id","organizationId","phase","planItemKey","planVersion","reviewNote","scheduledAt","scheduledPostId","scheduledPostStatus","specVersion","status","title","updatedAt"],"additionalProperties":false}}}},"400":{"description":"The input is invalid, or the channel connection cannot be used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The campaign, post, or variant is not in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The post is not approved, has no approved visual, does not fit the channel, uses a prohibited term, has a link that would preview badly, or may already be live.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The monthly posts allowance or the workspace write quota is exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceQuotaError"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["post:schedule"]},{"workspaceSession":[]}],"summary":"Schedule a campaign post","tags":["Campaigns"]}},"/api/v1/scheduled-posts":{"get":{"x-shots-entitlement":{"feature":"workspace:use","minimumPlan":"pro"},"description":"Lists the workspace publishing schedule, newest first, up to `limit` posts. `pagination.hasMore` is true when the page is full. Requires the `artifact:read` scope, or a member who manages publishing.","operationId":"listScheduledPosts","parameters":[{"in":"query","name":"limit","required":false,"schema":{"default":50,"type":"integer","minimum":1,"maximum":100}}],"responses":{"200":{"description":"Scheduled posts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledPostListResponse"}}}},"400":{"description":"The list query is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["artifact:read"]},{"workspaceSession":[]}],"summary":"List scheduled posts","tags":["Publishing"]},"post":{"x-shots-entitlement":{"feature":"workspace:use","minimumPlan":"pro","quota":"api:write:minute"},"description":"Schedules an approved creative variant, or a content draft, to an active channel connection. Send exactly one of `variantId` and `contentDraftId`. A variant must be `APPROVED` with an approved review; scheduling never approves. Only a signed-in member schedules a content draft; an API key gets `403`. Everything must belong to the workspace. Each new post counts against the monthly posts allowance. Accepts `Idempotency-Key`, unique per channel connection: a retry returns the first post with `200`. Requires the `post:schedule` scope, or a member who manages publishing, signed in within 15 minutes with two-factor.","operationId":"createScheduledPost","parameters":[{"in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string","maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ScheduledPostCreateRequest"}}}},"responses":{"200":{"description":"An earlier request with this idempotency key scheduled the post.","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"boolean"},"scheduledPost":{"type":"object","properties":{"caption":{"type":"string"},"channelConnection":{"type":"object","properties":{"externalAccountId":{"type":"string"},"platform":{"type":"string"},"provider":{"type":"string"}},"required":["externalAccountId","platform","provider"],"additionalProperties":false},"channelConnectionId":{"type":"string"},"createdAt":{"type":"string","description":"RFC 3339 timestamp."},"id":{"type":"string"},"scheduledFor":{"type":"string","description":"RFC 3339 timestamp of the planned publication."},"status":{"type":"string","enum":["DRAFT","SCHEDULED","PROCESSING","PUBLISHED","FAILED","CANCELLED","UNKNOWN_DELIVERY"]},"contentDraftId":{"description":"The content draft the post came from, when it has no variant.","type":["string","null"]},"variantId":{"description":"The approved campaign variant the post came from, when it has no draft.","type":["string","null"]}},"required":["caption","channelConnectionId","createdAt","id","scheduledFor","status","contentDraftId","variantId"],"additionalProperties":false}},"required":["created","scheduledPost"],"additionalProperties":false}}}},"201":{"description":"Post scheduled.","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"boolean"},"scheduledPost":{"type":"object","properties":{"caption":{"type":"string"},"channelConnection":{"type":"object","properties":{"externalAccountId":{"type":"string"},"platform":{"type":"string"},"provider":{"type":"string"}},"required":["externalAccountId","platform","provider"],"additionalProperties":false},"channelConnectionId":{"type":"string"},"createdAt":{"type":"string","description":"RFC 3339 timestamp."},"id":{"type":"string"},"scheduledFor":{"type":"string","description":"RFC 3339 timestamp of the planned publication."},"status":{"type":"string","enum":["DRAFT","SCHEDULED","PROCESSING","PUBLISHED","FAILED","CANCELLED","UNKNOWN_DELIVERY"]},"contentDraftId":{"description":"The content draft the post came from, when it has no variant.","type":["string","null"]},"variantId":{"description":"The approved campaign variant the post came from, when it has no draft.","type":["string","null"]}},"required":["caption","channelConnectionId","createdAt","id","scheduledFor","status","contentDraftId","variantId"],"additionalProperties":false}},"required":["created","scheduledPost"],"additionalProperties":false}}}},"400":{"description":"The input is invalid, or the variant or connection is not eligible.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The variant or channel connection is not in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The monthly posts allowance or the workspace write quota is exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceQuotaError"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["post:schedule"]},{"workspaceSession":[]}],"summary":"Schedule a post","tags":["Publishing"]}},"/api/v1/scheduled-posts/{scheduledPostId}/cancel":{"post":{"x-shots-entitlement":{"feature":"workspace:use","minimumPlan":"pro","quota":"api:write:minute"},"description":"Cancels a post that has not started publishing. Cancelling a cancelled post returns it unchanged. A post that is processing or published cannot be cancelled; remove a published post on the social network. Requires the `post:schedule` scope, or a member who manages publishing, signed in within 15 minutes with two-factor.","operationId":"cancelScheduledPost","parameters":[{"in":"path","name":"scheduledPostId","required":true,"schema":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"}}],"responses":{"200":{"description":"The post is cancelled.","content":{"application/json":{"schema":{"type":"object","properties":{"scheduledPost":{"type":"object","properties":{"caption":{"type":"string"},"channelConnection":{"type":"object","properties":{"externalAccountId":{"type":"string"},"platform":{"type":"string"},"provider":{"type":"string"}},"required":["externalAccountId","platform","provider"],"additionalProperties":false},"channelConnectionId":{"type":"string"},"createdAt":{"type":"string","description":"RFC 3339 timestamp."},"id":{"type":"string"},"scheduledFor":{"type":"string","description":"RFC 3339 timestamp of the planned publication."},"status":{"type":"string","enum":["DRAFT","SCHEDULED","PROCESSING","PUBLISHED","FAILED","CANCELLED","UNKNOWN_DELIVERY"]},"contentDraftId":{"description":"The content draft the post came from, when it has no variant.","type":["string","null"]},"variantId":{"description":"The approved campaign variant the post came from, when it has no draft.","type":["string","null"]}},"required":["caption","channelConnectionId","createdAt","id","scheduledFor","status","contentDraftId","variantId"],"additionalProperties":false}},"required":["scheduledPost"],"additionalProperties":false}}}},"400":{"description":"The scheduled post identifier is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No scheduled post with that ID exists in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The post is already publishing or published.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The workspace write quota is exhausted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceQuotaError"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["post:schedule"]},{"workspaceSession":[]}],"summary":"Cancel a scheduled post","tags":["Publishing"]}},"/api/v1/content-drafts":{"get":{"x-shots-entitlement":{"feature":"content:drafts","minimumPlan":"pro"},"description":"Lists the workspace content drafts, newest first. Requires the `artifact:read` scope and the content drafts entitlement (Pro or higher).","operationId":"listContentDrafts","parameters":[{"in":"query","name":"cursor","required":false,"schema":{"type":"string","maxLength":500}},{"in":"query","name":"limit","required":false,"schema":{"type":"integer","minimum":1,"maximum":100}},{"in":"query","name":"status","required":false,"schema":{"type":"string","enum":["draft","scheduled","archived"]}}],"responses":{"200":{"description":"Workspace content drafts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentDraftListResponse"}}}},"400":{"description":"The list query is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["artifact:read"]},{"workspaceSession":[]}],"summary":"List content drafts","tags":["Workspace"]},"post":{"x-shots-entitlement":{"feature":"content:drafts","minimumPlan":"pro"},"description":"Creates a content draft: a post written in the document editor, kept until it is scheduled. Every attached asset and channel must belong to the workspace. Requires the `draft:write` scope and the content drafts entitlement.","operationId":"createContentDraft","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentDraftCreateRequest"}}}},"responses":{"201":{"description":"Draft created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentDraft"}}}},"400":{"description":"The draft is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["draft:write"]},{"workspaceSession":[]}],"summary":"Create a content draft","tags":["Workspace"]}},"/api/v1/content-drafts/{id}":{"get":{"x-shots-entitlement":{"feature":"content:drafts","minimumPlan":"pro"},"description":"Returns one content draft with its Plate JSON body. Requires the `artifact:read` scope and the content drafts entitlement.","operationId":"getContentDraft","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","pattern":"^(?:[a-z0-9]{10,32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$"}}],"responses":{"200":{"description":"The draft.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentDraft"}}}},"400":{"description":"The draft identifier is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The draft was not found in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["artifact:read"]},{"workspaceSession":[]}],"summary":"Get a content draft","tags":["Workspace"]},"patch":{"x-shots-entitlement":{"feature":"content:drafts","minimumPlan":"pro"},"description":"Updates the fields it sets, based on `baseVersion`. A write based on an older version is refused with 409, so concurrent editors never overwrite each other; reload the draft and retry. Requires the `draft:write` scope.","operationId":"updateContentDraft","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","pattern":"^(?:[a-z0-9]{10,32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentDraftUpdateRequest"}}}},"responses":{"200":{"description":"Draft updated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentDraft"}}}},"400":{"description":"The update is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The draft was not found in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"The draft has a newer version than `baseVersion`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["draft:write"]},{"workspaceSession":[]}],"summary":"Update a content draft","tags":["Workspace"]},"delete":{"x-shots-entitlement":{"feature":"content:drafts","minimumPlan":"pro"},"description":"Deletes a content draft. Posts already scheduled from it are not changed. Requires the `draft:write` scope.","operationId":"deleteContentDraft","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","pattern":"^(?:[a-z0-9]{10,32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$"}}],"responses":{"200":{"description":"Draft deleted.","content":{"application/json":{"schema":{"type":"object","properties":{"deleted":{"type":"boolean","const":true}},"required":["deleted"],"additionalProperties":false}}}},"400":{"description":"The draft identifier is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The draft was not found in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["draft:write"]},{"workspaceSession":[]}],"summary":"Delete a content draft","tags":["Workspace"]}},"/api/v1/content-drafts/{id}/posts":{"get":{"x-shots-entitlement":{"feature":"content:drafts","minimumPlan":"pro"},"description":"Lists the posts scheduled from a content draft, newest first, with each post status. Requires the `artifact:read` scope.","operationId":"listContentDraftPosts","parameters":[{"in":"path","name":"id","required":true,"schema":{"type":"string","pattern":"^(?:[a-z0-9]{10,32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$"}}],"responses":{"200":{"description":"The draft posts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ContentDraftPostList"}}}},"400":{"description":"The draft identifier is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The draft was not found in this workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["artifact:read"]},{"workspaceSession":[]}],"summary":"List the posts scheduled from a content draft","tags":["Workspace"]}},"/api/v1/onboarding-runs":{"post":{"x-shots-entitlement":{"feature":"workspace:use","minimumPlan":"pro"},"description":"Reads the product's site and returns a product profile and ideal customer profile draft within ten seconds, then starts the background run that deepens them. A second request while a run is active, or a replayed `Idempotency-Key`, returns the existing run with 200. Requires the `onboarding:run` scope.","operationId":"createOnboardingRun","parameters":[{"in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string","maxLength":128}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingRunCreateRequest"}}}},"responses":{"200":{"description":"An existing run.","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"boolean"},"extracted":{"type":"boolean"},"idealCustomerProfile":{"anyOf":[{"type":"object","properties":{"buyingTriggers":{"type":"array","items":{"type":"string"}},"channels":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"id":{"type":"string"},"jobs":{"type":"array","items":{"type":"string"}},"objections":{"type":"array","items":{"type":"string"}},"pains":{"type":"array","items":{"type":"string"}},"personas":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"seniority":{"type":"string"},"teamSize":{"type":"string"}},"required":["role"],"additionalProperties":false}},"provenance":{"type":"object","propertyNames":{"type":"string","enum":["personas","pains","jobs","buyingTriggers","objections","channels"]},"additionalProperties":{"type":"object","properties":{"confidence":{"type":"number","minimum":0,"maximum":1},"editedByUser":{"type":"boolean"},"source":{"type":"string","enum":["manual","automated","enrichment"]},"updatedAt":{"type":"string"},"url":{"type":"string"}},"required":["editedByUser","source","updatedAt"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["buyingTriggers","channels","createdAt","id","jobs","objections","pains","personas","provenance","updatedAt"],"additionalProperties":false},{"type":"null"}]},"pages":{"type":"array","items":{"type":"string"}},"productProfile":{"anyOf":[{"type":"object","properties":{"audience":{"type":"string"},"capabilities":{"type":"array","items":{"type":"string"}},"competitors":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"pricingNote":{"type":"string"},"problem":{"type":"string"},"proofPoints":{"type":"array","items":{"type":"object","properties":{"claim":{"type":"string"},"sourceUrl":{"type":"string"}},"required":["claim"],"additionalProperties":false}},"provenance":{"type":"object","propertyNames":{"type":"string","enum":["name","url","summary","problem","audience","capabilities","proofPoints","pricingNote","competitors"]},"additionalProperties":{"type":"object","properties":{"confidence":{"type":"number","minimum":0,"maximum":1},"editedByUser":{"type":"boolean"},"source":{"type":"string","enum":["manual","automated","enrichment"]},"updatedAt":{"type":"string"},"url":{"type":"string"}},"required":["editedByUser","source","updatedAt"],"additionalProperties":false}},"summary":{"type":"string"},"updatedAt":{"type":"string"},"url":{"type":"string"}},"required":["audience","capabilities","competitors","createdAt","id","name","pricingNote","problem","proofPoints","provenance","summary","updatedAt","url"],"additionalProperties":false},{"type":"null"}]},"reason":{"type":"string"},"run":{"type":"object","properties":{"completedAt":{"type":["string","null"]},"completedStages":{"type":"array","items":{"type":"string"}},"createdByUserId":{"type":["string","null"]},"deadlineAt":{"type":"string"},"discoveredUrls":{"type":"array","items":{"type":"string"}},"enrichmentCostMicros":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"errorCode":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"fastPathMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"id":{"type":"string"},"modelCostMicros":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pageLimit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pagesDiscovered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pagesProcessed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pagesSkipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"progress":{"type":"integer","minimum":0,"maximum":100},"stage":{"type":"string"},"startedAt":{"type":"string"},"status":{"type":"string","enum":["queued","running","completed","partial","failed","cancelled"]},"tokenBudget":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tokensUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"updatedAt":{"type":"string"},"url":{"type":"string"},"workflowId":{"type":"string"}},"required":["completedAt","completedStages","createdByUserId","deadlineAt","discoveredUrls","enrichmentCostMicros","errorCode","errorMessage","fastPathMs","id","modelCostMicros","pageLimit","pagesDiscovered","pagesProcessed","pagesSkipped","progress","stage","startedAt","status","tokenBudget","tokensUsed","updatedAt","url","workflowId"],"additionalProperties":false}},"required":["created","extracted","idealCustomerProfile","pages","productProfile","run"],"additionalProperties":false}}}},"201":{"description":"Run started.","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"boolean"},"extracted":{"type":"boolean"},"idealCustomerProfile":{"anyOf":[{"type":"object","properties":{"buyingTriggers":{"type":"array","items":{"type":"string"}},"channels":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"id":{"type":"string"},"jobs":{"type":"array","items":{"type":"string"}},"objections":{"type":"array","items":{"type":"string"}},"pains":{"type":"array","items":{"type":"string"}},"personas":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"seniority":{"type":"string"},"teamSize":{"type":"string"}},"required":["role"],"additionalProperties":false}},"provenance":{"type":"object","propertyNames":{"type":"string","enum":["personas","pains","jobs","buyingTriggers","objections","channels"]},"additionalProperties":{"type":"object","properties":{"confidence":{"type":"number","minimum":0,"maximum":1},"editedByUser":{"type":"boolean"},"source":{"type":"string","enum":["manual","automated","enrichment"]},"updatedAt":{"type":"string"},"url":{"type":"string"}},"required":["editedByUser","source","updatedAt"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["buyingTriggers","channels","createdAt","id","jobs","objections","pains","personas","provenance","updatedAt"],"additionalProperties":false},{"type":"null"}]},"pages":{"type":"array","items":{"type":"string"}},"productProfile":{"anyOf":[{"type":"object","properties":{"audience":{"type":"string"},"capabilities":{"type":"array","items":{"type":"string"}},"competitors":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"pricingNote":{"type":"string"},"problem":{"type":"string"},"proofPoints":{"type":"array","items":{"type":"object","properties":{"claim":{"type":"string"},"sourceUrl":{"type":"string"}},"required":["claim"],"additionalProperties":false}},"provenance":{"type":"object","propertyNames":{"type":"string","enum":["name","url","summary","problem","audience","capabilities","proofPoints","pricingNote","competitors"]},"additionalProperties":{"type":"object","properties":{"confidence":{"type":"number","minimum":0,"maximum":1},"editedByUser":{"type":"boolean"},"source":{"type":"string","enum":["manual","automated","enrichment"]},"updatedAt":{"type":"string"},"url":{"type":"string"}},"required":["editedByUser","source","updatedAt"],"additionalProperties":false}},"summary":{"type":"string"},"updatedAt":{"type":"string"},"url":{"type":"string"}},"required":["audience","capabilities","competitors","createdAt","id","name","pricingNote","problem","proofPoints","provenance","summary","updatedAt","url"],"additionalProperties":false},{"type":"null"}]},"reason":{"type":"string"},"run":{"type":"object","properties":{"completedAt":{"type":["string","null"]},"completedStages":{"type":"array","items":{"type":"string"}},"createdByUserId":{"type":["string","null"]},"deadlineAt":{"type":"string"},"discoveredUrls":{"type":"array","items":{"type":"string"}},"enrichmentCostMicros":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"errorCode":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"fastPathMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"id":{"type":"string"},"modelCostMicros":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pageLimit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pagesDiscovered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pagesProcessed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pagesSkipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"progress":{"type":"integer","minimum":0,"maximum":100},"stage":{"type":"string"},"startedAt":{"type":"string"},"status":{"type":"string","enum":["queued","running","completed","partial","failed","cancelled"]},"tokenBudget":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tokensUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"updatedAt":{"type":"string"},"url":{"type":"string"},"workflowId":{"type":"string"}},"required":["completedAt","completedStages","createdByUserId","deadlineAt","discoveredUrls","enrichmentCostMicros","errorCode","errorMessage","fastPathMs","id","modelCostMicros","pageLimit","pagesDiscovered","pagesProcessed","pagesSkipped","progress","stage","startedAt","status","tokenBudget","tokensUsed","updatedAt","url","workflowId"],"additionalProperties":false}},"required":["created","extracted","idealCustomerProfile","pages","productProfile","run"],"additionalProperties":false}}}},"400":{"description":"The URL is invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The workspace started three runs this hour.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceQuotaError"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["onboarding:run"]},{"workspaceSession":[]}],"summary":"Start an onboarding run","tags":["Workspace"]}},"/api/v1/onboarding-runs/{runId}":{"get":{"x-shots-entitlement":{"feature":"workspace:use","minimumPlan":"pro"},"description":"Returns a run's status, stage, and progress (0 to 100, never decreasing). While the run is active the progress is live. Requires the `onboarding:run` scope.","operationId":"getOnboardingRun","parameters":[{"in":"path","name":"runId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"The run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingRunResponse"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No run with that ID exists in the workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["onboarding:run"]},{"workspaceSession":[]}],"summary":"Get an onboarding run","tags":["Workspace"]}},"/api/v1/onboarding-runs/{runId}/cancel":{"post":{"x-shots-entitlement":{"feature":"workspace:use","minimumPlan":"pro"},"description":"Stops an active run within seconds. Everything it already read is kept; cancelling a finished run changes nothing. Requires the `onboarding:run` scope.","operationId":"cancelOnboardingRun","parameters":[{"in":"path","name":"runId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"The run.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingRunResponse"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No run with that ID exists in the workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["onboarding:run"]},{"workspaceSession":[]}],"summary":"Cancel an onboarding run","tags":["Workspace"]}},"/api/v1/onboarding-runs/{runId}/rerun":{"post":{"x-shots-entitlement":{"feature":"workspace:use","minimumPlan":"pro"},"description":"Starts a new run for a run's URL. Pages read within the hour are reused and unchanged pages skip the model, so re-running an unchanged site costs nothing. Accepts `Idempotency-Key`. Requires the `onboarding:run` scope.","operationId":"rerunOnboardingRun","parameters":[{"in":"path","name":"runId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}},{"in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string","maxLength":128}}],"responses":{"200":{"description":"An existing run.","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"boolean"},"extracted":{"type":"boolean"},"idealCustomerProfile":{"anyOf":[{"type":"object","properties":{"buyingTriggers":{"type":"array","items":{"type":"string"}},"channels":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"id":{"type":"string"},"jobs":{"type":"array","items":{"type":"string"}},"objections":{"type":"array","items":{"type":"string"}},"pains":{"type":"array","items":{"type":"string"}},"personas":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"seniority":{"type":"string"},"teamSize":{"type":"string"}},"required":["role"],"additionalProperties":false}},"provenance":{"type":"object","propertyNames":{"type":"string","enum":["personas","pains","jobs","buyingTriggers","objections","channels"]},"additionalProperties":{"type":"object","properties":{"confidence":{"type":"number","minimum":0,"maximum":1},"editedByUser":{"type":"boolean"},"source":{"type":"string","enum":["manual","automated","enrichment"]},"updatedAt":{"type":"string"},"url":{"type":"string"}},"required":["editedByUser","source","updatedAt"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["buyingTriggers","channels","createdAt","id","jobs","objections","pains","personas","provenance","updatedAt"],"additionalProperties":false},{"type":"null"}]},"pages":{"type":"array","items":{"type":"string"}},"productProfile":{"anyOf":[{"type":"object","properties":{"audience":{"type":"string"},"capabilities":{"type":"array","items":{"type":"string"}},"competitors":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"pricingNote":{"type":"string"},"problem":{"type":"string"},"proofPoints":{"type":"array","items":{"type":"object","properties":{"claim":{"type":"string"},"sourceUrl":{"type":"string"}},"required":["claim"],"additionalProperties":false}},"provenance":{"type":"object","propertyNames":{"type":"string","enum":["name","url","summary","problem","audience","capabilities","proofPoints","pricingNote","competitors"]},"additionalProperties":{"type":"object","properties":{"confidence":{"type":"number","minimum":0,"maximum":1},"editedByUser":{"type":"boolean"},"source":{"type":"string","enum":["manual","automated","enrichment"]},"updatedAt":{"type":"string"},"url":{"type":"string"}},"required":["editedByUser","source","updatedAt"],"additionalProperties":false}},"summary":{"type":"string"},"updatedAt":{"type":"string"},"url":{"type":"string"}},"required":["audience","capabilities","competitors","createdAt","id","name","pricingNote","problem","proofPoints","provenance","summary","updatedAt","url"],"additionalProperties":false},{"type":"null"}]},"reason":{"type":"string"},"run":{"type":"object","properties":{"completedAt":{"type":["string","null"]},"completedStages":{"type":"array","items":{"type":"string"}},"createdByUserId":{"type":["string","null"]},"deadlineAt":{"type":"string"},"discoveredUrls":{"type":"array","items":{"type":"string"}},"enrichmentCostMicros":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"errorCode":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"fastPathMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"id":{"type":"string"},"modelCostMicros":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pageLimit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pagesDiscovered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pagesProcessed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pagesSkipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"progress":{"type":"integer","minimum":0,"maximum":100},"stage":{"type":"string"},"startedAt":{"type":"string"},"status":{"type":"string","enum":["queued","running","completed","partial","failed","cancelled"]},"tokenBudget":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tokensUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"updatedAt":{"type":"string"},"url":{"type":"string"},"workflowId":{"type":"string"}},"required":["completedAt","completedStages","createdByUserId","deadlineAt","discoveredUrls","enrichmentCostMicros","errorCode","errorMessage","fastPathMs","id","modelCostMicros","pageLimit","pagesDiscovered","pagesProcessed","pagesSkipped","progress","stage","startedAt","status","tokenBudget","tokensUsed","updatedAt","url","workflowId"],"additionalProperties":false}},"required":["created","extracted","idealCustomerProfile","pages","productProfile","run"],"additionalProperties":false}}}},"201":{"description":"Run started.","content":{"application/json":{"schema":{"type":"object","properties":{"created":{"type":"boolean"},"extracted":{"type":"boolean"},"idealCustomerProfile":{"anyOf":[{"type":"object","properties":{"buyingTriggers":{"type":"array","items":{"type":"string"}},"channels":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"id":{"type":"string"},"jobs":{"type":"array","items":{"type":"string"}},"objections":{"type":"array","items":{"type":"string"}},"pains":{"type":"array","items":{"type":"string"}},"personas":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string"},"seniority":{"type":"string"},"teamSize":{"type":"string"}},"required":["role"],"additionalProperties":false}},"provenance":{"type":"object","propertyNames":{"type":"string","enum":["personas","pains","jobs","buyingTriggers","objections","channels"]},"additionalProperties":{"type":"object","properties":{"confidence":{"type":"number","minimum":0,"maximum":1},"editedByUser":{"type":"boolean"},"source":{"type":"string","enum":["manual","automated","enrichment"]},"updatedAt":{"type":"string"},"url":{"type":"string"}},"required":["editedByUser","source","updatedAt"],"additionalProperties":false}},"updatedAt":{"type":"string"}},"required":["buyingTriggers","channels","createdAt","id","jobs","objections","pains","personas","provenance","updatedAt"],"additionalProperties":false},{"type":"null"}]},"pages":{"type":"array","items":{"type":"string"}},"productProfile":{"anyOf":[{"type":"object","properties":{"audience":{"type":"string"},"capabilities":{"type":"array","items":{"type":"string"}},"competitors":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"pricingNote":{"type":"string"},"problem":{"type":"string"},"proofPoints":{"type":"array","items":{"type":"object","properties":{"claim":{"type":"string"},"sourceUrl":{"type":"string"}},"required":["claim"],"additionalProperties":false}},"provenance":{"type":"object","propertyNames":{"type":"string","enum":["name","url","summary","problem","audience","capabilities","proofPoints","pricingNote","competitors"]},"additionalProperties":{"type":"object","properties":{"confidence":{"type":"number","minimum":0,"maximum":1},"editedByUser":{"type":"boolean"},"source":{"type":"string","enum":["manual","automated","enrichment"]},"updatedAt":{"type":"string"},"url":{"type":"string"}},"required":["editedByUser","source","updatedAt"],"additionalProperties":false}},"summary":{"type":"string"},"updatedAt":{"type":"string"},"url":{"type":"string"}},"required":["audience","capabilities","competitors","createdAt","id","name","pricingNote","problem","proofPoints","provenance","summary","updatedAt","url"],"additionalProperties":false},{"type":"null"}]},"reason":{"type":"string"},"run":{"type":"object","properties":{"completedAt":{"type":["string","null"]},"completedStages":{"type":"array","items":{"type":"string"}},"createdByUserId":{"type":["string","null"]},"deadlineAt":{"type":"string"},"discoveredUrls":{"type":"array","items":{"type":"string"}},"enrichmentCostMicros":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"errorCode":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"fastPathMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"id":{"type":"string"},"modelCostMicros":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pageLimit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pagesDiscovered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pagesProcessed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pagesSkipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"progress":{"type":"integer","minimum":0,"maximum":100},"stage":{"type":"string"},"startedAt":{"type":"string"},"status":{"type":"string","enum":["queued","running","completed","partial","failed","cancelled"]},"tokenBudget":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tokensUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"updatedAt":{"type":"string"},"url":{"type":"string"},"workflowId":{"type":"string"}},"required":["completedAt","completedStages","createdByUserId","deadlineAt","discoveredUrls","enrichmentCostMicros","errorCode","errorMessage","fastPathMs","id","modelCostMicros","pageLimit","pagesDiscovered","pagesProcessed","pagesSkipped","progress","stage","startedAt","status","tokenBudget","tokensUsed","updatedAt","url","workflowId"],"additionalProperties":false}},"required":["created","extracted","idealCustomerProfile","pages","productProfile","run"],"additionalProperties":false}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No run with that ID exists in the workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"The workspace started three runs this hour.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkspaceQuotaError"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["onboarding:run"]},{"workspaceSession":[]}],"summary":"Re-run onboarding","tags":["Workspace"]}},"/api/v1/onboarding-runs/{runId}/enrichment":{"get":{"x-shots-entitlement":{"feature":"workspace:use","minimumPlan":"pro"},"description":"Lists what enrichment found for the run's site: brand assets, firmographics, social reach, app store listings, competitors, and mentions, each with its provider, confidence, source, and cost. Requires the `onboarding:run` scope.","operationId":"listOnboardingEnrichment","parameters":[{"in":"path","name":"runId","required":true,"schema":{"type":"string","minLength":1,"maxLength":64}}],"responses":{"200":{"description":"The findings.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingEnrichmentResponse"}}}},"401":{"description":"Authentication is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The API key lacks the required workspace scope.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"No run with that ID exists in the workspace.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceApiKey":["onboarding:run"]},{"workspaceSession":[]}],"summary":"List onboarding enrichment","tags":["Workspace"]}},"/api/v1/me":{"get":{"description":"Returns the id, name, email, and avatar of the user behind the session cookie.","operationId":"getCurrentUser","responses":{"200":{"description":"The resolved resource.","content":{"application/json":{"schema":{"type":"object","properties":{"user":{"type":"object","properties":{"email":{"type":"string"},"id":{"type":"string"},"image":{"type":["string","null"]},"name":{"type":["string","null"]}},"required":["email","id","image","name"],"additionalProperties":false}},"required":["user"],"additionalProperties":false}}}},"401":{"description":"A signed-in user session is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The user is not a member of the active organization, lacks the permission, or sent an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceSession":[]}],"summary":"Get the signed-in user","tags":["Shell"]}},"/api/v1/bootstrap":{"get":{"description":"Returns the user, active organization, memberships, resolved permissions, workspace settings, entitlements, capabilities, and counters. Call after sign-in and again after any 401 or 403.","operationId":"getShellBootstrap","responses":{"200":{"description":"The resolved resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaybookBootstrap"}}}},"401":{"description":"A signed-in user session is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The user is not a member of the active organization, lacks the permission, or sent an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceSession":[]}],"summary":"Bootstrap a Playbook shell","tags":["Shell"]}},"/api/v1/organizations":{"get":{"description":"Lists every organization the signed-in user belongs to, with their normalized role in each.","operationId":"listOrganizations","responses":{"200":{"description":"The resolved resource.","content":{"application/json":{"schema":{"type":"object","properties":{"organizations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"isScheduledForDeletion":{"type":"boolean"},"name":{"type":"string"},"role":{"type":"string"},"slug":{"type":"string"},"workspaceDeletion":{"type":"object","properties":{"requestedByUserId":{"type":"string"},"scheduledFor":{"type":"string"},"status":{"type":"string"}},"required":["requestedByUserId","scheduledFor","status"],"additionalProperties":false}},"required":["id","isScheduledForDeletion","name","role","slug"],"additionalProperties":false}}},"required":["organizations"],"additionalProperties":false}}}},"401":{"description":"A signed-in user session is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The user is not a member of the active organization, lacks the permission, or sent an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceSession":[]}],"summary":"List the user organizations","tags":["Shell"]}},"/api/v1/organizations/{organizationId}":{"get":{"description":"Returns identity fields for the organization. The organization must be the active one; activate it first otherwise.","operationId":"getOrganization","parameters":[{"in":"path","name":"organizationId","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"The resolved resource.","content":{"application/json":{"schema":{"type":"object","properties":{"organization":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"string"},"logo":{"type":["string","null"]},"name":{"type":"string"},"role":{"type":"string","enum":["owner","admin","creator","approver","publisher","viewer"]},"slug":{"type":"string"}},"required":["id","logo","name","role","slug"],"additionalProperties":false}},"required":["organization"],"additionalProperties":false}}}},"401":{"description":"A signed-in user session is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The user is not a member of the active organization, lacks the permission, or sent an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceSession":[]}],"summary":"Get the active organization","tags":["Shell"]}},"/api/v1/organizations/{organizationId}/members":{"get":{"description":"Lists members and their roles in the active organization. Requires the member:read permission.","operationId":"listOrganizationMembers","parameters":[{"in":"path","name":"organizationId","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"The resolved resource.","content":{"application/json":{"schema":{"type":"object","properties":{"members":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string"},"id":{"type":"string"},"role":{"type":"string","enum":["owner","admin","creator","approver","publisher","viewer"]},"user":{"type":"object","properties":{"email":{"type":"string"},"id":{"type":"string"},"image":{"type":["string","null"]},"name":{"type":"string"}},"required":["email","id","image","name"],"additionalProperties":false}},"required":["createdAt","id","role","user"],"additionalProperties":false}}},"required":["members"],"additionalProperties":false}}}},"401":{"description":"A signed-in user session is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The user is not a member of the active organization, lacks the permission, or sent an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceSession":[]}],"summary":"List organization members","tags":["Shell"]}},"/api/v1/organizations/{organizationId}/invitations":{"get":{"description":"Lists invitations for the active organization. Requires the invitation:read permission.","operationId":"listOrganizationInvitations","parameters":[{"in":"path","name":"organizationId","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"The resolved resource.","content":{"application/json":{"schema":{"type":"object","properties":{"invitations":{"type":"array","items":{"type":"object","properties":{"createdAt":{"type":"string"},"email":{"type":"string"},"expiresAt":{"type":"string"},"id":{"type":"string"},"role":{"anyOf":[{"type":"string","enum":["owner","admin","creator","approver","publisher","viewer"]},{"type":"null"}]},"status":{"type":"string"}},"required":["createdAt","email","expiresAt","id","role","status"],"additionalProperties":false}}},"required":["invitations"],"additionalProperties":false}}}},"401":{"description":"A signed-in user session is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The user is not a member of the active organization, lacks the permission, or sent an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceSession":[]}],"summary":"List organization invitations","tags":["Shell"]}},"/api/v1/organizations/{organizationId}/settings":{"get":{"description":"Returns locale, time zone, default publishing time, and description for the active organization.","operationId":"getOrganizationSettings","parameters":[{"in":"path","name":"organizationId","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"The resolved resource.","content":{"application/json":{"schema":{"type":"object","properties":{"settings":{"type":"object","properties":{"createdAt":{"type":"string"},"defaultPublishTime":{"type":"string"},"description":{"type":["string","null"]},"locale":{"type":"string"},"organizationId":{"type":"string"},"timeZone":{"type":"string"},"updatedAt":{"type":"string"}},"required":["defaultPublishTime","description","locale","timeZone"],"additionalProperties":false}},"required":["settings"],"additionalProperties":false}}}},"401":{"description":"A signed-in user session is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The user is not a member of the active organization, lacks the permission, or sent an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceSession":[]}],"summary":"Get workspace settings","tags":["Shell"]}},"/api/v1/organizations/{organizationId}/permissions":{"get":{"description":"Returns the normalized role and resolved permission list of the signed-in user in the active organization.","operationId":"getOrganizationPermissions","parameters":[{"in":"path","name":"organizationId","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"The resolved resource.","content":{"application/json":{"schema":{"type":"object","properties":{"permissions":{"readOnly":true,"type":"array","items":{"type":"string","enum":["workspace:read","workspace:update","workspace:delete","workspace:transfer_ownership","member:read","member:invite","member:remove","member:update_role","invitation:read","invitation:revoke","audit:read","audit:export","audit:manage","identity:manage","brand:manage","release:create","release:approve","artifact:read","artifact:edit","publish:manage","support:manage"]}},"role":{"type":"string","enum":["owner","admin","creator","approver","publisher","viewer"]}},"required":["permissions","role"],"additionalProperties":false}}}},"401":{"description":"A signed-in user session is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The user is not a member of the active organization, lacks the permission, or sent an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceSession":[]}],"summary":"Get the user permissions","tags":["Shell"]}},"/api/v1/organizations/{organizationId}/capabilities":{"get":{"description":"Returns capability flags and the safe entitlement view (plan, status, features) for the active organization.","operationId":"getOrganizationCapabilities","parameters":[{"in":"path","name":"organizationId","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"The resolved resource.","content":{"application/json":{"schema":{"type":"object","properties":{"capabilities":{"type":"object","properties":{"browserAutomation":{"type":"boolean"},"engineeringAgent":{"type":"boolean"},"publishing":{"type":"boolean"},"voiceCapture":{"type":"boolean"},"workflows":{"type":"boolean"}},"required":["browserAutomation","engineeringAgent","publishing","voiceCapture","workflows"],"additionalProperties":false},"entitlements":{"type":"object","properties":{"features":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}},"plan":{"type":"string"},"status":{"type":"string"}},"required":["features","plan","status"],"additionalProperties":false}},"required":["capabilities","entitlements"],"additionalProperties":false}}}},"401":{"description":"A signed-in user session is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The user is not a member of the active organization, lacks the permission, or sent an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceSession":[]}],"summary":"Get organization capabilities","tags":["Shell"]}},"/api/v1/organizations/{organizationId}/activate":{"post":{"description":"Makes the organization active for this session after checking membership and deletion state, then returns the refreshed bootstrap.","operationId":"activateOrganization","parameters":[{"in":"path","name":"organizationId","required":true,"schema":{"type":"string","minLength":1,"maxLength":128}}],"responses":{"200":{"description":"The resolved resource.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PlaybookBootstrap"}}}},"401":{"description":"A signed-in user session is required.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The user is not a member of the active organization, lacks the permission, or sent an API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"A required dependency is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"security":[{"workspaceSession":[]}],"summary":"Switch the active organization","tags":["Shell"]}},"/openapi.json":{"get":{"operationId":"getOpenApiSpec","summary":"Fetch this OpenAPI specification","description":"Returns the OpenAPI 3.1 document describing every public Shots operation.","tags":["Discovery"],"responses":{"200":{"description":"OpenAPI 3.1 document.","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/llms.txt":{"get":{"operationId":"getLlmsTxt","summary":"Fetch the llms.txt site overview","description":"Returns a Markdown overview of Shots: features, pages, pricing, and contact details.","tags":["Discovery"],"responses":{"200":{"description":"Markdown overview.","content":{"text/markdown":{"schema":{"type":"string"}}}}}}},"/llms-full.txt":{"get":{"operationId":"getLlmsFullTxt","summary":"Fetch the full llms.txt reference","description":"Returns the complete Markdown reference: every feature, every page, the technology stack, and the privacy model.","tags":["Discovery"],"responses":{"200":{"description":"Markdown reference.","content":{"text/markdown":{"schema":{"type":"string"}}}}}}}},"components":{"securitySchemes":{"workspaceApiKey":{"type":"apiKey","in":"header","name":"X-API-Key","description":"Workspace API key with the operation-required scope."},"workspaceSession":{"type":"apiKey","in":"cookie","name":"better-auth.session_token","description":"Signed-in user session cookie issued by sign-in."}},"schemas":{"ReleaseListResponse":{"type":"object","properties":{"releases":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"productSurfaceId":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","READY","ARCHIVED","CANCELLED"]},"title":{"type":"string"},"benefitStatement":{"type":"string"},"createdAt":{"type":"string"},"features":{"type":"array","items":{"type":"object","properties":{"author":{"type":"string"},"kind":{"type":"string","enum":["feature","improvement","fix","internal","other"]},"number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"},"url":{"type":"string"}},"required":["kind","title"],"additionalProperties":false}},"screenshotAssetIds":{"type":"array","items":{"type":"string"}},"updatedAt":{"type":"string"}},"required":["id","productSurfaceId","status","title","benefitStatement","createdAt","updatedAt"],"additionalProperties":false}}},"required":["releases"],"additionalProperties":false},"ReleaseCreateRequest":{"type":"object","properties":{"audience":{"type":"string","maxLength":1000},"benefitStatement":{"default":"","type":"string","maxLength":500},"description":{"type":"string","maxLength":10000},"productSurfaceId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"sourceUrls":{"maxItems":20,"type":"array","items":{"type":"string","maxLength":2000,"format":"uri"}},"title":{"type":"string","minLength":1,"maxLength":160}},"required":["title"]},"SourceAppCreateRequest":{"type":"object","properties":{"allowedHosts":{"minItems":1,"maxItems":50,"type":"array","items":{"type":"string","format":"uri"}},"branch":{"type":"string","minLength":1,"maxLength":255,"pattern":"^(?!refs\\/)[^\\s~^:?*[\\\\]+$"},"externalId":{"type":"string","minLength":1,"maxLength":160},"githubConnectionId":{"type":"string","pattern":"^[a-z0-9]{10,32}$"},"ignoreBotPullRequests":{"type":"boolean"},"ignoredPullRequestAuthors":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9-]{0,38}(\\[bot\\])?$"}},"name":{"type":"string","minLength":1,"maxLength":100},"provider":{"default":"generic","type":"string","maxLength":64,"pattern":"^[a-z0-9_-]+$"},"secretReference":{"type":"string","pattern":"^[A-Z][A-Z0-9_]{0,127}$"},"skipPrereleases":{"type":"boolean"}},"required":["allowedHosts","name"]},"SourceAppUpdateRequest":{"type":"object","properties":{"branch":{"anyOf":[{"type":"string","minLength":1,"maxLength":255,"pattern":"^(?!refs\\/)[^\\s~^:?*[\\\\]+$"},{"type":"null"}]},"ignoreBotPullRequests":{"type":"boolean"},"ignoredPullRequestAuthors":{"maxItems":100,"type":"array","items":{"type":"string","pattern":"^[A-Za-z0-9][A-Za-z0-9-]{0,38}(\\[bot\\])?$"}},"skipPrereleases":{"type":"boolean"}}},"LinkPreviewReport":{"type":"object","properties":{"url":{"type":"string"},"title":{"type":"string"},"description":{"type":"string"},"canonical":{"type":"string"},"favicon":{"type":"string"},"language":{"type":"string"},"charset":{"type":"string"},"viewport":{"type":"string"},"robots":{"type":"string"},"themeColor":{"type":"string"},"ogTitle":{"type":"string"},"ogDescription":{"type":"string"},"ogImage":{"type":"string"},"ogImageAlt":{"type":"string"},"ogImageWidth":{"type":"string"},"ogImageHeight":{"type":"string"},"ogType":{"type":"string"},"ogUrl":{"type":"string"},"ogSiteName":{"type":"string"},"ogLocale":{"type":"string"},"twitterCard":{"type":"string"},"twitterTitle":{"type":"string"},"twitterDescription":{"type":"string"},"twitterImage":{"type":"string"},"twitterImageAlt":{"type":"string"},"twitterSite":{"type":"string"},"twitterCreator":{"type":"string"},"robotsFile":{"type":"string"},"sitemap":{"type":"string"},"jsonLd":{"type":"array","items":{"type":"string"}},"tags":{"type":"array","items":{"type":"object","properties":{"attribute":{"type":"string","enum":["charset","http-equiv","itemprop","name","property","rel"]},"key":{"type":"string"},"value":{"type":"string"},"hreflang":{"type":"string"},"sizes":{"type":"string"},"type":{"type":"string"}},"required":["attribute","key","value"],"additionalProperties":false}},"agent":{"type":"string","enum":["default","facebook","x","linkedin","slack","discord","telegram","whatsapp","google"]},"response":{"type":"object","properties":{"hops":{"type":"array","items":{"type":"object","properties":{"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"url":{"type":"string"}},"required":["status","url"],"additionalProperties":false}},"durationMs":{"type":"integer","minimum":0,"maximum":9007199254740991},"contentType":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"truncated":{"type":"boolean"},"xRobotsTag":{"type":"string"},"headers":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"required":["hops","durationMs","contentType","bytes","truncated"],"additionalProperties":false},"images":{"type":"array","items":{"type":"object","properties":{"url":{"type":"string"},"error":{"type":"string"},"contentType":{"type":"string"},"bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"tooLarge":{"type":"boolean"},"format":{"type":"string"},"width":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"height":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["url"],"additionalProperties":false}},"crawlers":{"type":"array","items":{"type":"object","properties":{"crawler":{"type":"string","enum":["facebook","x","linkedin","slack","discord","telegram","whatsapp","google"]},"allowed":{"type":"boolean"},"rule":{"type":"string"}},"required":["crawler","allowed"],"additionalProperties":false}},"robotsTxt":{"type":"string"},"targets":{"type":"array","items":{"type":"object","properties":{"kind":{"type":"string","enum":["canonical","og:url"]},"url":{"type":"string"},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"finalUrl":{"type":"string"},"error":{"type":"string"}},"required":["kind","url"],"additionalProperties":false}},"tracking":{"type":"object","properties":{"url":{"type":"string"},"finalUrl":{"type":"string"},"kept":{"type":"boolean"},"error":{"type":"string"}},"required":["url"],"additionalProperties":false},"oembed":{"type":"object","properties":{"url":{"type":"string"},"error":{"type":"string"},"type":{"type":"string"},"title":{"type":"string"},"providerName":{"type":"string"},"authorName":{"type":"string"},"thumbnailUrl":{"type":"string"},"width":{"type":"number"},"height":{"type":"number"},"hasHtml":{"type":"boolean"}},"required":["url"],"additionalProperties":false},"score":{"type":"integer","minimum":0,"maximum":100},"issues":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"severity":{"type":"string","enum":["error","warning","info"]},"category":{"type":"string","enum":["content","social","images","indexing","technical"]},"title":{"type":"string"},"fix":{"type":"string"}},"required":["id","severity","category","title","fix"],"additionalProperties":false}}},"required":["url","jsonLd","tags","score","issues"],"additionalProperties":false},"AssetUploadRequest":{"type":"object","properties":{"bytes":{"type":"integer","exclusiveMinimum":0,"maximum":52428800},"classification":{"default":"input","type":"string","enum":["capture","derived","export","input"]},"contentType":{"type":"string","pattern":"^(image\\/(gif|jpeg|png|webp)|video\\/(mp4|webm)|audio\\/(aac|mp4|mpeg|ogg|wav|webm))$"},"fileName":{"type":"string","minLength":1,"maxLength":128},"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}},"required":["bytes","contentType","fileName"]},"AssetCompleteRequest":{"type":"object","properties":{"sha256":{"type":"string","pattern":"^[a-f0-9]{64}$"}}},"AssetDownloadResponse":{"type":"object","properties":{"downloadUrl":{"type":"string","format":"uri"}},"required":["downloadUrl"],"additionalProperties":false},"CampaignListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"audience":{"type":["string","null"]},"createdAt":{"type":"string"},"createdByUserId":{"type":["string","null"]},"feature":{"type":["string","null"]},"id":{"type":"string"},"messaging":{"type":["string","null"]},"name":{"type":"string"},"objective":{"type":"string"},"organizationId":{"type":"string"},"productSurfaceId":{"type":["string","null"]},"release":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"title":{"type":"string"}},"required":["id","title"],"additionalProperties":false},{"type":"null"}]},"releaseId":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","READY_FOR_REVIEW","APPROVED","ARCHIVED"]},"updatedAt":{"type":"string"}},"required":["audience","createdAt","createdByUserId","feature","id","messaging","name","objective","organizationId","productSurfaceId","release","releaseId","status","updatedAt"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean"},"nextCursor":{"type":["string","null"]}},"required":["hasMore","nextCursor"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"CampaignCreateRequest":{"type":"object","properties":{"angles":{"default":[],"maxItems":20,"type":"array","items":{"type":"object","properties":{"hook":{"type":"string","minLength":1,"maxLength":1000},"title":{"type":"string","minLength":1,"maxLength":200}},"required":["hook","title"]}},"audience":{"type":"string","maxLength":1000},"feature":{"type":"string","maxLength":500},"messaging":{"type":"string","maxLength":2000},"name":{"type":"string","minLength":1,"maxLength":160},"objective":{"type":"string","minLength":1,"maxLength":500},"productSurfaceId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"releaseId":{"type":"string","format":"uuid","pattern":"^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$"},"posts":{"default":[],"maxItems":50,"type":"array","items":{"type":"object","properties":{"angleIndex":{"type":"integer","minimum":0,"maximum":9007199254740991},"callToAction":{"type":"string","maxLength":300},"channel":{"type":"string","maxLength":64,"pattern":"^[a-z0-9-]+$"},"copy":{"type":"string","minLength":1,"maxLength":10000}},"required":["channel","copy"]}}},"required":["name","objective"],"additionalProperties":false},"CampaignDetail":{"type":"object","properties":{"audience":{"type":["string","null"]},"createdAt":{"type":"string"},"createdByUserId":{"type":["string","null"]},"feature":{"type":["string","null"]},"id":{"type":"string"},"messaging":{"type":["string","null"]},"name":{"type":"string"},"objective":{"type":"string"},"organizationId":{"type":"string"},"productSurfaceId":{"type":["string","null"]},"releaseId":{"type":["string","null"]},"status":{"type":"string","enum":["DRAFT","READY_FOR_REVIEW","APPROVED","ARCHIVED"]},"updatedAt":{"type":"string"},"angles":{"type":"array","items":{"type":"object","properties":{"campaignId":{"type":"string"},"createdAt":{"type":"string"},"hook":{"type":"string"},"id":{"type":"string"},"organizationId":{"type":"string"},"position":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"title":{"type":"string"},"updatedAt":{"type":"string"}},"required":["campaignId","createdAt","hook","id","organizationId","position","title","updatedAt"],"additionalProperties":false}},"assets":{"type":"array","items":{"type":"object","properties":{"asset":{"type":"object","properties":{"height":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"id":{"type":"string"},"mediaType":{"type":"string"},"width":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]}},"required":["height","id","mediaType","width"],"additionalProperties":false},"assetId":{"type":"string"},"campaignId":{"type":"string"},"caption":{"type":["string","null"]},"createdAt":{"type":"string"},"id":{"type":"string"},"kind":{"type":"string"},"organizationId":{"type":"string"},"planAssetKey":{"type":["string","null"]},"planVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"variantLabel":{"type":["string","null"]}},"required":["asset","assetId","campaignId","caption","createdAt","id","kind","organizationId","planAssetKey","planVersion","variantLabel"],"additionalProperties":false}},"posts":{"type":"array","items":{"type":"object","properties":{"angleId":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"approvedByUserId":{"type":["string","null"]},"callToAction":{"type":["string","null"]},"campaignId":{"type":"string"},"channel":{"type":"string"},"claims":{"anyOf":[{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},{"type":"null"}]},"copy":{"type":"string"},"createdAt":{"type":"string"},"creativeVariantId":{"type":["string","null"]},"id":{"type":"string"},"organizationId":{"type":"string"},"phase":{"type":["string","null"]},"planItemKey":{"type":["string","null"]},"planVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"reviewNote":{"description":"Why a reviewer rejected or asked for changes.","type":["string","null"]},"scheduledAt":{"type":["string","null"]},"scheduledPostId":{"type":["string","null"]},"scheduledPostStatus":{"anyOf":[{"type":"string","enum":["DRAFT","SCHEDULED","PROCESSING","PUBLISHED","FAILED","CANCELLED","UNKNOWN_DELIVERY"]},{"type":"null"}],"description":"Delivery state of `scheduledPostId`."},"specVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"status":{"type":"string","enum":["DRAFT","READY_FOR_REVIEW","APPROVED","REJECTED","NEEDS_CHANGES","SCHEDULED","PUBLISHED"]},"title":{"type":["string","null"]},"updatedAt":{"type":"string"}},"required":["angleId","approvedAt","approvedByUserId","callToAction","campaignId","channel","claims","copy","createdAt","creativeVariantId","id","organizationId","phase","planItemKey","planVersion","reviewNote","scheduledAt","scheduledPostId","scheduledPostStatus","specVersion","status","title","updatedAt"],"additionalProperties":false}},"productSurface":{"anyOf":[{"type":"object","properties":{"environment":{"type":"string"},"id":{"type":"string"},"name":{"type":"string"},"url":{"type":"string"}},"required":["environment","id","name","url"],"additionalProperties":false},{"type":"null"}]},"release":{"anyOf":[{"type":"object","properties":{"audience":{"type":["string","null"]},"benefitStatement":{"type":"string"},"description":{"type":["string","null"]},"id":{"type":"string"},"sourceUrls":{"type":"array","items":{"type":"string"}},"status":{"type":"string"},"title":{"type":"string"},"updatedAt":{"type":"string"}},"required":["audience","benefitStatement","description","id","sourceUrls","status","title","updatedAt"],"additionalProperties":false},{"type":"null"}]}},"required":["audience","createdAt","createdByUserId","feature","id","messaging","name","objective","organizationId","productSurfaceId","releaseId","status","updatedAt","angles","assets","posts","productSurface","release"],"additionalProperties":false},"CampaignTransitionRequest":{"type":"object","properties":{"status":{"type":"string","enum":["DRAFT","READY_FOR_REVIEW","APPROVED","ARCHIVED"]}},"required":["status"],"additionalProperties":false},"ApprovalListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"campaign":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"status":{"type":"string","enum":["DRAFT","READY_FOR_REVIEW","APPROVED","ARCHIVED"]}},"required":["id","name","status"],"additionalProperties":false},"post":{"type":"object","properties":{"angleId":{"type":["string","null"]},"approvedAt":{"type":["string","null"]},"approvedByUserId":{"type":["string","null"]},"callToAction":{"type":["string","null"]},"campaignId":{"type":"string"},"channel":{"type":"string"},"claims":{"anyOf":[{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},{"type":"null"}]},"copy":{"type":"string"},"createdAt":{"type":"string"},"creativeVariantId":{"type":["string","null"]},"id":{"type":"string"},"organizationId":{"type":"string"},"phase":{"type":["string","null"]},"planItemKey":{"type":["string","null"]},"planVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"reviewNote":{"description":"Why a reviewer rejected or asked for changes.","type":["string","null"]},"scheduledAt":{"type":["string","null"]},"scheduledPostId":{"type":["string","null"]},"scheduledPostStatus":{"anyOf":[{"type":"string","enum":["DRAFT","SCHEDULED","PROCESSING","PUBLISHED","FAILED","CANCELLED","UNKNOWN_DELIVERY"]},{"type":"null"}],"description":"Delivery state of `scheduledPostId`."},"specVersion":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"status":{"type":"string","enum":["DRAFT","READY_FOR_REVIEW","APPROVED","REJECTED","NEEDS_CHANGES","SCHEDULED","PUBLISHED"]},"title":{"type":["string","null"]},"updatedAt":{"type":"string"}},"required":["angleId","approvedAt","approvedByUserId","callToAction","campaignId","channel","claims","copy","createdAt","creativeVariantId","id","organizationId","phase","planItemKey","planVersion","reviewNote","scheduledAt","scheduledPostId","scheduledPostStatus","specVersion","status","title","updatedAt"],"additionalProperties":false}},"required":["campaign","post"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean"},"nextCursor":{"type":["string","null"]}},"required":["hasMore","nextCursor"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"CampaignReviewRequest":{"type":"object","properties":{"postIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"}}},"additionalProperties":false},"CampaignApprovalRequest":{"type":"object","properties":{"decision":{"type":"string","enum":["approve","reject","request_changes"]},"note":{"type":"string","maxLength":1000},"postIds":{"minItems":1,"maxItems":100,"type":"array","items":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"}}},"required":["decision"],"additionalProperties":false},"CampaignPostScheduleRequest":{"type":"object","properties":{"channelConnectionId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"creativeVariantId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"scheduledAt":{"description":"When to publish, as an RFC 3339 timestamp in the future. Defaults to the next default publish time in the workspace time zone.","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)))$"},"skipLinkCheck":{"default":false,"type":"boolean"}},"required":["channelConnectionId"],"additionalProperties":false},"ScheduledPostListResponse":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"caption":{"type":"string"},"channelConnection":{"type":"object","properties":{"externalAccountId":{"type":"string"},"platform":{"type":"string"},"provider":{"type":"string"}},"required":["externalAccountId","platform","provider"],"additionalProperties":false},"channelConnectionId":{"type":"string"},"createdAt":{"type":"string","description":"RFC 3339 timestamp."},"id":{"type":"string"},"scheduledFor":{"type":"string","description":"RFC 3339 timestamp of the planned publication."},"status":{"type":"string","enum":["DRAFT","SCHEDULED","PROCESSING","PUBLISHED","FAILED","CANCELLED","UNKNOWN_DELIVERY"]},"contentDraftId":{"description":"The content draft the post came from, when it has no variant.","type":["string","null"]},"variantId":{"description":"The approved campaign variant the post came from, when it has no draft.","type":["string","null"]}},"required":["caption","channelConnection","channelConnectionId","createdAt","id","scheduledFor","status","contentDraftId","variantId"],"additionalProperties":false}},"pagination":{"type":"object","properties":{"hasMore":{"type":"boolean"},"nextCursor":{"type":["string","null"]}},"required":["hasMore","nextCursor"],"additionalProperties":false}},"required":["data","pagination"],"additionalProperties":false},"ScheduledPostCreateRequest":{"type":"object","properties":{"caption":{"type":"string","minLength":1,"maxLength":3000},"channelConnectionId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"scheduledFor":{"description":"When to publish, as an RFC 3339 timestamp in the future.","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)))$"},"contentDraftId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"},"variantId":{"type":"string","format":"cuid","pattern":"^[cC][0-9a-z]{6,}$"}},"required":["caption","channelConnectionId","scheduledFor"],"additionalProperties":false},"ContentDraftListResponse":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"assetIds":{"type":"array","items":{"type":"string"}},"body":{"maxItems":5000,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"channelConnectionIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"createdByUserId":{"type":["string","null"]},"discussions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"id":{"type":"string"},"organizationId":{"type":"string"},"plainText":{"type":"string"},"status":{"type":"string","enum":["draft","scheduled","archived"]},"title":{"type":"string"},"updatedAt":{"type":"string"},"updatedByUserId":{"type":["string","null"]},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["assetIds","body","channelConnectionIds","createdAt","createdByUserId","discussions","id","organizationId","plainText","status","title","updatedAt","updatedByUserId","version"],"additionalProperties":false}},"nextCursor":{"type":["string","null"]}},"required":["items","nextCursor"],"additionalProperties":false},"ContentDraftCreateRequest":{"type":"object","properties":{"assetIds":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^(?:[a-z0-9]{10,32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$"}},"body":{"maxItems":5000,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"channelConnectionIds":{"maxItems":10,"type":"array","items":{"type":"string","pattern":"^(?:[a-z0-9]{10,32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$"}},"discussions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"plainText":{"type":"string","maxLength":100000},"title":{"type":"string","maxLength":200}}},"ContentDraft":{"type":"object","properties":{"assetIds":{"type":"array","items":{"type":"string"}},"body":{"maxItems":5000,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"channelConnectionIds":{"type":"array","items":{"type":"string"}},"createdAt":{"type":"string"},"createdByUserId":{"type":["string","null"]},"discussions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"id":{"type":"string"},"organizationId":{"type":"string"},"plainText":{"type":"string"},"status":{"type":"string","enum":["draft","scheduled","archived"]},"title":{"type":"string"},"updatedAt":{"type":"string"},"updatedByUserId":{"type":["string","null"]},"version":{"type":"integer","minimum":1,"maximum":9007199254740991}},"required":["assetIds","body","channelConnectionIds","createdAt","createdByUserId","discussions","id","organizationId","plainText","status","title","updatedAt","updatedByUserId","version"],"additionalProperties":false},"ContentDraftUpdateRequest":{"type":"object","properties":{"assetIds":{"maxItems":20,"type":"array","items":{"type":"string","pattern":"^(?:[a-z0-9]{10,32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$"}},"body":{"maxItems":5000,"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"channelConnectionIds":{"maxItems":10,"type":"array","items":{"type":"string","pattern":"^(?:[a-z0-9]{10,32}|[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})$"}},"discussions":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"plainText":{"type":"string","maxLength":100000},"title":{"type":"string","maxLength":200},"baseVersion":{"type":"integer","minimum":1,"maximum":9007199254740991},"status":{"type":"string","enum":["draft","archived"]}},"required":["baseVersion"]},"ContentDraftPostList":{"type":"object","properties":{"posts":{"type":"array","items":{"type":"object","properties":{"caption":{"type":"string"},"channelConnectionId":{"type":"string"},"createdAt":{"type":"string"},"id":{"type":"string"},"platform":{"type":"string"},"scheduledFor":{"type":"string"},"status":{"type":"string","enum":["DRAFT","SCHEDULED","PROCESSING","PUBLISHED","FAILED","CANCELLED","UNKNOWN_DELIVERY"]}},"required":["caption","channelConnectionId","createdAt","id","platform","scheduledFor","status"],"additionalProperties":false}}},"required":["posts"],"additionalProperties":false},"OnboardingRunCreateRequest":{"type":"object","properties":{"sentence":{"type":"string","maxLength":300},"url":{"type":"string","maxLength":2000,"format":"uri"}},"required":["url"]},"OnboardingRunResponse":{"type":"object","properties":{"run":{"type":"object","properties":{"completedAt":{"type":["string","null"]},"completedStages":{"type":"array","items":{"type":"string"}},"createdByUserId":{"type":["string","null"]},"deadlineAt":{"type":"string"},"discoveredUrls":{"type":"array","items":{"type":"string"}},"enrichmentCostMicros":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"errorCode":{"type":["string","null"]},"errorMessage":{"type":["string","null"]},"fastPathMs":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"id":{"type":"string"},"modelCostMicros":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pageLimit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pagesDiscovered":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pagesProcessed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"pagesSkipped":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"progress":{"type":"integer","minimum":0,"maximum":100},"stage":{"type":"string"},"startedAt":{"type":"string"},"status":{"type":"string","enum":["queued","running","completed","partial","failed","cancelled"]},"tokenBudget":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"tokensUsed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"updatedAt":{"type":"string"},"url":{"type":"string"},"workflowId":{"type":"string"}},"required":["completedAt","completedStages","createdByUserId","deadlineAt","discoveredUrls","enrichmentCostMicros","errorCode","errorMessage","fastPathMs","id","modelCostMicros","pageLimit","pagesDiscovered","pagesProcessed","pagesSkipped","progress","stage","startedAt","status","tokenBudget","tokensUsed","updatedAt","url","workflowId"],"additionalProperties":false}},"required":["run"],"additionalProperties":false},"OnboardingEnrichmentResponse":{"type":"object","properties":{"enrichment":{"type":"array","items":{"type":"object","properties":{"confidence":{"type":"number"},"costMicros":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"domain":{"type":"string"},"expiresAt":{"type":"string"},"fetchedAt":{"type":"string"},"field":{"type":"string"},"id":{"type":"string"},"provider":{"type":"string"},"sourceUrl":{"type":"string"},"value":{}},"required":["confidence","costMicros","domain","expiresAt","fetchedAt","field","id","provider","value"],"additionalProperties":false}}},"required":["enrichment"],"additionalProperties":false},"PlaybookBootstrap":{"type":"object","properties":{"capabilities":{"type":"object","properties":{"browserAutomation":{"type":"boolean"},"engineeringAgent":{"type":"boolean"},"publishing":{"type":"boolean"},"voiceCapture":{"type":"boolean"},"workflows":{"type":"boolean"}},"required":["browserAutomation","engineeringAgent","publishing","voiceCapture","workflows"],"additionalProperties":false},"counters":{"type":"object","properties":{"approvals":{"type":"number"},"attention":{"type":"number"}},"required":["approvals","attention"],"additionalProperties":false},"entitlements":{"type":"object","properties":{"features":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"boolean"}},"plan":{"type":"string"},"status":{"type":"string"}},"required":["features","plan","status"],"additionalProperties":false},"membership":{"type":"object","properties":{"permissions":{"type":"array","items":{"type":"string"}},"role":{"type":"string"}},"required":["permissions","role"],"additionalProperties":false},"organization":{"type":"object","properties":{"id":{"type":"string"},"logo":{"type":["string","null"]},"name":{"type":"string"},"slug":{"type":"string"}},"required":["id","logo","name","slug"],"additionalProperties":false},"organizations":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"role":{"type":"string"},"slug":{"type":"string"}},"required":["id","name","role","slug"],"additionalProperties":false}},"user":{"type":"object","properties":{"email":{"type":"string"},"id":{"type":"string"},"name":{"type":["string","null"]}},"required":["email","id","name"],"additionalProperties":false},"workspace":{"type":"object","properties":{"defaultPublishTime":{"type":"string"},"locale":{"type":"string"},"timeZone":{"type":"string"}},"required":["defaultPublishTime","locale","timeZone"],"additionalProperties":false}},"required":["capabilities","counters","entitlements","membership","organization","organizations","user","workspace"],"additionalProperties":false},"Error":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","invalid_url","unsupported_value","unauthorized","forbidden","forbidden_domain","not_found","method_not_allowed","conflict","rate_limited","workspace_feature_not_entitled","workspace_quota_exceeded","upstream_timeout","upstream_unavailable","upstream_failed","internal_error"],"description":"Stable machine-readable error code."},"documentation":{"type":"string","format":"uri","description":"Link to the error reference."},"error":{"type":"string","description":"Human-readable error message.","examples":["URL is required"]},"hint":{"type":"string","description":"How to resolve the error."},"message":{"type":"string","description":"Human-readable error message, same value as `error`."},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"HTTP status code, repeated in the body."}},"required":["code","documentation","error","hint","message","status"],"additionalProperties":false,"description":"Every failing request returns this envelope. `code` is stable and safe to branch on; `error` and `message` carry the same human-readable text."},"WorkspaceEntitlementError":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","invalid_url","unsupported_value","unauthorized","forbidden","forbidden_domain","not_found","method_not_allowed","conflict","rate_limited","workspace_feature_not_entitled","workspace_quota_exceeded","upstream_timeout","upstream_unavailable","upstream_failed","internal_error"],"description":"Stable machine-readable error code."},"documentation":{"type":"string","format":"uri","description":"Link to the error reference."},"error":{"type":"string","description":"Human-readable error message.","examples":["URL is required"]},"hint":{"type":"string","description":"How to resolve the error."},"message":{"type":"string","description":"Human-readable error message, same value as `error`."},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"HTTP status code, repeated in the body."},"currentPlan":{"type":"string","enum":["free","pro","business","enterprise"]},"feature":{"type":"string","enum":["asset:create","asset:read","asset:update","asset:delete","release:create","source-app:create","workspace:use","enterprise:audit-drain","enterprise:sso","enterprise:scim","campaign:workflow","content:drafts","onboarding:agent"]},"requiredPlan":{"type":"string","enum":["free","pro","business","enterprise"]}},"required":["code","documentation","error","hint","message","status","currentPlan","feature","requiredPlan"],"additionalProperties":false},"WorkspaceQuotaError":{"type":"object","properties":{"code":{"type":"string","enum":["invalid_request","invalid_url","unsupported_value","unauthorized","forbidden","forbidden_domain","not_found","method_not_allowed","conflict","rate_limited","workspace_feature_not_entitled","workspace_quota_exceeded","upstream_timeout","upstream_unavailable","upstream_failed","internal_error"],"description":"Stable machine-readable error code."},"documentation":{"type":"string","format":"uri","description":"Link to the error reference."},"error":{"type":"string","description":"Human-readable error message.","examples":["URL is required"]},"hint":{"type":"string","description":"How to resolve the error."},"message":{"type":"string","description":"Human-readable error message, same value as `error`."},"status":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"HTTP status code, repeated in the body."},"limit":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"quota":{"type":"string","enum":["api:write:minute","storage:bytes","ai:credits:monthly","posts:monthly","emails:monthly","jobs:concurrent"]}},"required":["code","documentation","error","hint","message","status","limit","quota"],"additionalProperties":false},"RateLimitError":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"retryAfter":{"type":"integer","description":"Seconds to wait before retrying."}}}]},"ScreenshotRequest":{"type":"object","required":["url"],"properties":{"url":{"type":"string","format":"uri","description":"Absolute http or https URL of the page to capture.","examples":["https://example.com"]},"deviceType":{"type":"string","enum":["desktop","mobile"],"default":"desktop","description":"Viewport preset. `desktop` is 1920x1080, `mobile` is 375x667."},"colorScheme":{"type":"string","enum":["light","dark"],"default":"light","description":"prefers-color-scheme sent to the target page."},"forceRefresh":{"type":"boolean","default":false,"description":"Bypass and replace the cached capture for this URL."}}},"ScreenshotResponse":{"type":"object","required":["screenshot","url","cached"],"properties":{"screenshot":{"type":"string","contentEncoding":"base64","description":"Base64-encoded PNG bytes, without a data URI prefix."},"url":{"type":"string","format":"uri","description":"Normalized URL that was captured."},"cached":{"type":"boolean","description":"True when the image was served from cache."},"strategy":{"type":"string","description":"Capture backend that produced the image."},"deviceType":{"type":"string","enum":["desktop","mobile"]},"colorScheme":{"type":"string","enum":["light","dark"]}}},"ExportRequest":{"type":"object","required":["image","format","qualityPreset"],"properties":{"image":{"type":"string","format":"binary","description":"The raw image file to recompress."},"format":{"type":"string","enum":["png","jpeg","webp"],"description":"Output image format."},"qualityPreset":{"type":"string","enum":["high","medium","low"],"description":"Compression preset applied to the chosen format."}}},"TweetResponse":{"type":"object","required":["data"],"properties":{"data":{"type":["object","null"],"description":"Tweet payload as returned by the public syndication API, or null when the tweet is unavailable."},"error":{"type":"string","description":"Present only when `data` is null."}}}}}}