{"openapi":"3.1.0","info":{"title":"Pitchlane API","version":"0.1.0","description":"Pitchlane.com's Public API for creating and managing Pitchlane campaigns and videos. We will be adding more endpoints over time. If you have any questions or need help, please contact us at [support@pitchlane.com](mailto:support@pitchlane.com).\n\n**Rate limits.** Each account may send 3000 read requests (GET) and 1200 write requests (everything else) per minute. Every response carries `RateLimit-Limit`, `RateLimit-Remaining` and `RateLimit-Reset` headers. Over the limit the API answers `429` with a `Retry-After` header (seconds).\n\n**Idempotency.** Send an `Idempotency-Key` header (up to 255 characters, unique per request you intend to make) with any POST or PATCH. Once that request has succeeded (`2xx`), repeating it with the same key within 24 hours returns the stored success with `Idempotent-Replayed: true` and does nothing again. Only successes are stored: after an error, a repeat with the same key runs the request again. An error does not always mean nothing was done (a PATCH that answers `503 setup_unavailable` may already have saved the change), so before repeating a request that failed, follow the retry steps in that operation's description. Reusing a key with a different request (another body, or on a PATCH another `If-Match`) answers `422`; repeating it while the first request is still running answers `409`; when the key cannot be checked the answer is `503 idempotency_unavailable` with `Retry-After`, and nothing was done.\n\n**Webhooks.** Subscribe a URL to an event with `POST /webhooks` (every campaign of the account) or `POST /campaigns/{campaignId}/webhooks` (one campaign). Each event is sent as a JSON `POST`; the body of each is listed under Webhook events, and every body has `event`, `eventAt` and `eventId`. Delivery is at least once. Any `2xx` answer within 15 seconds is a delivery. Anything else (another status, a timeout, a refused connection) is tried again: at once, then after 5 seconds, 5 minutes, 30 minutes, 2 hours, 5 hours, 10 hours and 10 hours, about 28 hours in all. A `Retry-After` header can put a retry later, by up to 1 hour. `410 Gone` removes the subscription. Every attempt carries the same body, the same `webhook-id` header (the `eventId`) and a `webhook-timestamp` header (seconds since the Unix epoch). `webhook-subscription-id` names the subscription the delivery is for, and `webhook-signature` signs the attempt for a subscription that has a signing secret (see Verifying a delivery, under Webhook events). A receiver can get an event twice, and events in another order than they happened: keep the `eventId`s you have handled.\n\n**Errors.** Every error response has the same body: `{ \"error\": { \"code\": \"campaign_not_found\", \"message\": \"No campaign with this id.\" } }`. `code` is a stable identifier in lower snake case: branch on it, not on `message`, which is written for people and may change. When the error is about one field of the request, `path` names it (`variables.website_0`, `pages.0.url`). Some errors carry more detail beside these: a validation error lists every problem it found in `problems`, each with its own `code` and `message`, and its `path` where it has one; a `429` states `limit`, `windowSeconds` and `retryAfterSeconds`. A `404` names what was not found: `campaign_not_found`, `webhook_not_found`, `folder_not_found`, `media_not_found`, `variable_schema_not_found`, `lead_schema_not_found`, and `endpoint_not_found` for a path the API does not have (`not_found` only when nothing more is known). Codes that follow from the status alone are `invalid_request` (400), `unauthorized` (401), `forbidden` (403), `validation_failed` (422), `rate_limited` (429) and `internal_error` (500). An expired or malformed bearer token is `invalid_token`."},"servers":[{"url":"https://api.pitchlane.com/api/public/v1"}],"components":{"securitySchemes":{"apiKey":{"type":"apiKey","in":"header","name":"X-API-Key"}},"schemas":{"trigger":{"type":"string","enum":["VIDEO_RENDERED","VIDEO_CREATED","VIDEO_UPDATED","VIDEO_VIEWED","VIDEO_FIRST_VIEWED","VIDEO_STARTED","VIDEO_FIRST_STARTED","VIDEO_FINISHED","VIDEO_FIRST_FINISHED","VIDEO_UNRENDERABLE","CAMPAIGN_READY","CAMPAIGN_FAILED"],"description":"The event that will trigger the webhook. VIDEO_UPDATED is triggered when adding a video with `upsert` changed an existing video. VIDEO_UNRENDERABLE is triggered when a video cannot be rendered - either due to the website or lead being invalid or our bot unable to access it. Not all errors trigger this webhook - Unexpected/Internal Errors do not, so they can be fixed and retried by our team. CAMPAIGN_READY is triggered when a campaign that was created or changed has been processed and videos can be made from it. CAMPAIGN_FAILED is triggered when its setup or processing failed; the campaign's `problems` say why. Both carry `{ event, eventAt, campaignId, campaign }`, where `campaign` is the Campaign object."},"Problem":{"type":"object","properties":{"code":{"type":"string","description":"Stable and lower snake_case, for example `media_missing_audio_track`, `pitch_duration_mismatch`, `media_source_not_allowed`."},"message":{"type":"string","description":"For a person to read."},"path":{"type":"string","description":"Where in the request or the campaign the problem is, for example `pages[1].durationSeconds`."}},"required":["code","message"]},"Error":{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"campaign_changed"},"message":{"type":"string"},"path":{"type":"string","description":"The request field the error is about."},"problems":{"type":"array","items":{"$ref":"#/components/schemas/Problem"}},"limit":{"type":"integer","description":"On a `429`, the limit that was reached."},"windowSeconds":{"type":"integer"},"retryAfterSeconds":{"type":"integer"}},"required":["code","message"]}},"required":["error"]},"Video":{"type":"object","properties":{"id":{"type":"string","description":"The video's id."},"shortId":{"type":"string","description":"The id in the video's link, `videoUrl`."},"title":{"type":["string","null"],"description":"From the campaign's title template, unless it was set."},"titleEdited":{"type":"boolean","description":"The title was changed by hand."},"campaignId":{"type":"string"},"campaignName":{"type":["string","null"],"description":"The campaign's name."},"createdAt":{"type":"string","format":"date-time"},"queuedAt":{"type":["string","null"],"format":"date-time","description":"When the video was last queued to render."},"scheduledFor":{"type":["string","null"],"format":"date-time","description":"When a scheduled render is due."},"startedProcessingAt":{"type":["string","null"],"format":"date-time","description":"When its render started."},"backgroundRecordedAt":{"type":["string","null"],"format":"date-time","description":"When its pages were recorded."},"startedRenderingAt":{"type":["string","null"],"format":"date-time","description":"When it started rendering, after its pages were recorded."},"queuedForWebmEncodingAt":{"type":["string","null"],"format":"date-time","description":"Older renders only."},"startedWebmEncodingAt":{"type":["string","null"],"format":"date-time","description":"Older renders only."},"renderedAt":{"type":["string","null"],"format":"date-time","description":"When it was rendered. Absent until then."},"renderedFullyAt":{"type":["string","null"],"format":"date-time","description":"When every file of the video was written."},"renderingStatus":{"type":"string","enum":["QUEUED_FOR_RECORDING","RECORDING","QUEUED_FOR_RENDERING","RENDERING","RATE_LIMITED","RENDERED","ERROR"],"description":"Where its render is, while there is one."},"renderingState":{"type":"object","properties":{"executionStatus":{"type":"string","description":"`RUNNING`, `COMPLETED`, `FAILED`, `CANCELLED`, `TERMINATED`, `TIMED_OUT` or `NOT_FOUND`."},"stage":{"type":["string","null"]},"updatedAt":{"type":["string","null"],"format":"date-time","description":"When this state was last updated."},"workflowId":{"type":["string","null"]},"runId":{"type":["string","null"]}},"required":["executionStatus"],"description":"Where the render is, while there is one. Absent before the video is queued."},"processingError":{"type":"object","properties":{"type":{"type":"string","description":"What kind of problem: `INTERNAL_ERROR`, `VALIDATION_ERROR`, `INVALID_LEAD`, `UNRECORDABLE`, `TEMPORARILY_UNRECORDABLE`, `RESTRICTED`, `COOKIE_ERROR`, …"},"code":{"type":["string","null"],"description":"A more precise reason, when there is one."},"message":{"type":["string","null"],"description":"For a person to read."},"cause":{"type":["string","null"]},"pageUrl":{"type":["string","null"],"description":"The page that could not be recorded."},"statusCode":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"null"}]},"staticOrDynamic":{"type":"string","enum":["static","dynamic"]},"erroredAt":{"type":["string","null"],"format":"date-time","description":"When it happened."}},"description":"Why the video could not be made. Absent when there is no problem."},"issueReport":{"type":"object","properties":{"id":{"type":"string"},"timestamp":{"type":"number","description":"When it was reported, in milliseconds since 1970."},"pageUrl":{"type":["string","null"]},"issueType":{"type":"string","enum":["POPUP","NOT_LOADING","VIDEO_LAG","LOCALIZATION","SCROLLING_BUGGY","NO_SCROLLING","OTHER"]},"comment":{"type":["string","null"]},"resolution":{"type":"string"},"resolutionComment":{"type":"string"},"chargeCreditForVideo":{"type":"boolean"}},"required":["id","timestamp","issueType"],"description":"A problem reported with the rendered video. Absent when none was reported."},"webmEncodingError":{"type":"object","properties":{"message":{"type":"string"},"code":{"type":"string"},"erroredAt":{"type":"string","format":"date-time"}},"required":["message","code"],"description":"Older renders only."},"integrationErrors":{"type":"object","additionalProperties":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"message":{"type":"string"},"variableName":{"type":"string"}},"required":["message"]},{"type":"string","description":"Older videos: the message alone."}]}},"description":"Why the video could not be sent to an integration, keyed by integration (`smartlead`, `instantly`, …)."},"isTestVideoQuality":{"type":"boolean","description":"Rendered at the lower quality of a test video."},"variables":{"type":"object","additionalProperties":{},"description":"The values of the campaign's variables for this video, keyed by variable name (`website_0`, `first_name`)."},"originalRow":{"type":"object","additionalProperties":{},"description":"The lead as it was sent or imported, keyed by your own field names."},"overrideRow":{"type":"object","additionalProperties":{},"description":"Values of the lead changed since, keyed like `originalRow`."},"originalRowIndex":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"null"}],"description":"The row of the import the video was made from: a number, or for some older imports the text of one."},"originalUid":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"null"}],"description":"Your identifier of the lead, when one was sent."},"importId":{"type":"string","description":"The import the video was made by."},"meta":{"type":"object","additionalProperties":{},"description":"Older videos only."},"cloudflareId":{"type":"string","description":"Older videos only."},"videoUrl":{"type":["string","null"],"description":"The video's page, where a lead watches it. `null` until the video is rendered."},"videoFileUrl":{"type":["string","null"],"description":"The rendered MP4 file. `null` until the video is rendered."},"thumbnailUrl":{"type":["string","null"],"description":"An animated GIF of the video, on the video's domain. `null` until the video is rendered."},"thumbnailStorageUrl":{"type":["string","null"],"description":"The same GIF, where it is stored. `null` until it exists."},"thumbnailUrlPNG":{"type":["string","null"],"description":"A still PNG of the video, on the video's domain. `null` until it exists."},"thumbnailStorageUrlPNG":{"type":["string","null"],"description":"The same PNG, where it is stored. `null` until it exists."},"thumbnailEmbed":{"type":["string","null"],"description":"HTML for an e-mail: `thumbnailUrl`, linked to `videoUrl`. `null` until the video is rendered."},"thumbnailStorageEmbed":{"type":["string","null"],"description":"HTML for an e-mail: `thumbnailStorageUrl`, linked to `videoUrl`. `null` until the video is rendered."},"thumbnailEmbedPNG":{"type":["string","null"],"description":"HTML for an e-mail: `thumbnailUrlPNG`, linked to `videoUrl`. `null` until the video is rendered."},"thumbnailStorageEmbedPNG":{"type":["string","null"],"description":"HTML for an e-mail: `thumbnailStorageUrlPNG`, linked to `videoUrl`. `null` until the video is rendered."}},"required":["id","shortId","campaignId","createdAt","originalRow","overrideRow","videoUrl","videoFileUrl","thumbnailUrl","thumbnailStorageUrl","thumbnailUrlPNG","thumbnailStorageUrlPNG","thumbnailEmbed","thumbnailStorageEmbed","thumbnailEmbedPNG","thumbnailStorageEmbedPNG"],"description":"A video of a campaign. Dates are ISO 8601. Older videos carry fields not listed here; they are not kept stable."},"WebhookStoredVideo":{"type":"object","properties":{"_id":{"type":"string","description":"The video's id."},"campaignId":{"type":"string"},"shortId":{"type":["string","null"],"description":"The id in the video's link."},"title":{"type":["string","null"]},"userId":{"type":["string","null"],"description":"The campaign owner's user id."},"importId":{"type":["string","null"]},"variables":{"type":["object","null"],"additionalProperties":{},"description":"The values of the campaign's variables for this video, keyed by variable name."},"originalRow":{"type":["object","null"],"additionalProperties":{},"description":"The lead as it was sent or imported. Field names that contain `.` or start with `$` are stored escaped here; `video.originalRow` has them as sent."},"overrideRow":{"type":["object","null"],"additionalProperties":{},"description":"Values of the lead changed since, keyed like `originalRow`."},"originalUid":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"null"}]},"createdAt":{"type":["string","null"],"format":"date-time","description":"When the video was made."},"renderedAt":{"type":["string","null"],"format":"date-time","description":"When it was rendered."}},"required":["_id","campaignId"],"description":"The video as it is stored, when the event happened. Only the fields listed are kept stable; read `video` for the rest."},"VideoCreatedEvent":{"type":"object","properties":{"video":{"$ref":"#/components/schemas/Video"},"rawVideo":{"$ref":"#/components/schemas/WebhookStoredVideo"},"event":{"type":"string","enum":["VIDEO_CREATED"],"description":"The trigger the event was sent for."},"eventAt":{"type":"string","format":"date-time","description":"When it happened (ISO 8601). The same on every attempt."},"eventId":{"type":"string","description":"The event's id, the same on every attempt and in the `webhook-id` header. A receiver that may get an event twice keeps the ids it has handled.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}},"required":["video","rawVideo","event","eventAt","eventId"],"description":"A video was made from a lead."},"VideoUpdatedEvent":{"type":"object","properties":{"video":{"$ref":"#/components/schemas/Video"},"rawVideo":{"$ref":"#/components/schemas/WebhookStoredVideo"},"event":{"type":"string","enum":["VIDEO_UPDATED"],"description":"The trigger the event was sent for."},"eventAt":{"type":"string","format":"date-time","description":"When it happened (ISO 8601). The same on every attempt."},"eventId":{"type":"string","description":"The event's id, the same on every attempt and in the `webhook-id` header. A receiver that may get an event twice keeps the ids it has handled.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}},"required":["video","rawVideo","event","eventAt","eventId"],"description":"A video's lead was sent again and the video updated."},"VideoRenderedEvent":{"type":"object","properties":{"video":{"$ref":"#/components/schemas/Video"},"rawVideo":{"$ref":"#/components/schemas/WebhookStoredVideo"},"event":{"type":"string","enum":["VIDEO_RENDERED"],"description":"The trigger the event was sent for."},"eventAt":{"type":"string","format":"date-time","description":"When it happened (ISO 8601). The same on every attempt."},"eventId":{"type":"string","description":"The event's id, the same on every attempt and in the `webhook-id` header. A receiver that may get an event twice keeps the ids it has handled.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}},"required":["video","rawVideo","event","eventAt","eventId"],"description":"A video was rendered and can be watched."},"WebhookVideoError":{"type":"object","properties":{"type":{"type":"string","description":"Why the video cannot be rendered: `UNRECORDABLE`, `INVALID_LEAD`, `UNSUPPORTED` or `VALIDATION_ERROR`."},"code":{"type":["string","null"]},"message":{"type":["string","null"]},"erroredAt":{"type":["string","null"],"format":"date-time","description":"When it failed."}},"required":["type"]},"VideoUnrenderableEvent":{"type":"object","properties":{"video":{"$ref":"#/components/schemas/Video"},"rawVideo":{"$ref":"#/components/schemas/WebhookStoredVideo"},"error":{"$ref":"#/components/schemas/WebhookVideoError"},"event":{"type":"string","enum":["VIDEO_UNRENDERABLE"],"description":"The trigger the event was sent for."},"eventAt":{"type":"string","format":"date-time","description":"When it happened (ISO 8601). The same on every attempt."},"eventId":{"type":"string","description":"The event's id, the same on every attempt and in the `webhook-id` header. A receiver that may get an event twice keeps the ids it has handled.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}},"required":["video","rawVideo","error","event","eventAt","eventId"],"description":"A video cannot be rendered."},"CampaignPage":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["lead_url"]},"template":{"type":"string","description":"Whose page: `website`, `linkedin`, …"},"variable":{"type":"string","description":"The variable a lead's URL is supplied under: `website_0`."},"scroll":{"type":"string","enum":["auto","none","custom"],"description":"`auto` scrolls the page for as long as it is on screen, `none` never scrolls. `custom` is read-only: the page has scrolling recorded in the dashboard. Leave `scroll` out (or send `custom`) for an existing page to keep what is recorded."},"id":{"type":"string","description":"The page's id. Send it back to keep what is stored about the page; leave it out for a new page. A page stored before pages had ids is shown as `index:<n>` until the campaign is next saved."},"title":{"type":["string","null"]},"notes":{"type":["string","null"],"description":"Speaker notes for whoever records the pitch."},"durationSeconds":{"type":["number","null"],"description":"How long the page is on screen. Needed on every page but the last once the campaign has a pitch video; the last page always runs to the end of it. `null` until the campaign has a pitch video: timing comes with it."}},"required":["type","template","variable","scroll","id","title","notes","durationSeconds"]},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string"},"scroll":{"type":"string","enum":["auto","none","custom"],"description":"`auto` scrolls the page for as long as it is on screen, `none` never scrolls. `custom` is read-only: the page has scrolling recorded in the dashboard. Leave `scroll` out (or send `custom`) for an existing page to keep what is recorded."},"id":{"type":"string","description":"The page's id. Send it back to keep what is stored about the page; leave it out for a new page. A page stored before pages had ids is shown as `index:<n>` until the campaign is next saved."},"title":{"type":["string","null"]},"notes":{"type":["string","null"],"description":"Speaker notes for whoever records the pitch."},"durationSeconds":{"type":["number","null"],"description":"How long the page is on screen. Needed on every page but the last once the campaign has a pitch video; the last page always runs to the end of it. `null` until the campaign has a pitch video: timing comes with it."}},"required":["type","url","scroll","id","title","notes","durationSeconds"]},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"mediaId":{"type":["string","null"],"description":"A `page_image`. `null` for an image uploaded before media existed."},"id":{"type":"string","description":"The page's id. Send it back to keep what is stored about the page; leave it out for a new page. A page stored before pages had ids is shown as `index:<n>` until the campaign is next saved."},"title":{"type":["string","null"]},"notes":{"type":["string","null"],"description":"Speaker notes for whoever records the pitch."},"durationSeconds":{"type":["number","null"],"description":"How long the page is on screen. Needed on every page but the last once the campaign has a pitch video; the last page always runs to the end of it. `null` until the campaign has a pitch video: timing comes with it."}},"required":["type","mediaId","id","title","notes","durationSeconds"]},{"type":"object","properties":{"type":{"type":"string","enum":["video"]},"mediaId":{"type":["string","null"],"description":"A `page_video`. `null` for a video uploaded before media existed."},"id":{"type":"string","description":"The page's id. Send it back to keep what is stored about the page; leave it out for a new page. A page stored before pages had ids is shown as `index:<n>` until the campaign is next saved."},"title":{"type":["string","null"]},"notes":{"type":["string","null"],"description":"Speaker notes for whoever records the pitch."},"durationSeconds":{"type":["number","null"],"description":"How long the page is on screen. Needed on every page but the last once the campaign has a pitch video; the last page always runs to the end of it. `null` until the campaign has a pitch video: timing comes with it."}},"required":["type","mediaId","id","title","notes","durationSeconds"]}],"description":"One page of a campaign. `type` decides the other fields:\n\n- `lead_url`: a page of the lead's own, chosen by `template` (`website`, `linkedin`, …). The lead's URL is supplied per video under `variable` (for example `website_0`).\n- `url`: one fixed page at `url`.\n- `image`: an uploaded image, `mediaId` of a `page_image`.\n- `video`: an uploaded video, `mediaId` of a `page_video`.\n"},"URLValidator":{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"domain":{"type":["string","null"],"description":"The domain the URL must be on, when there is one."}},"required":["type"],"description":"The value must be a URL."},"EmailValidator":{"type":"object","properties":{"type":{"type":"string","enum":["email"]}},"required":["type"],"description":"The value must be an e-mail address."},"VariableConfig":{"type":"object","properties":{"label":{"type":"string","description":"The variable's name as people see it."},"required":{"type":"boolean","description":"Deprecated: it is not enforced. Required variables come from the pages."},"validator":{"oneOf":[{"$ref":"#/components/schemas/URLValidator"},{"$ref":"#/components/schemas/EmailValidator"}],"discriminator":{"propertyName":"type","mapping":{"url":"#/components/schemas/URLValidator","email":"#/components/schemas/EmailValidator"}},"description":"How a value of the variable is checked."}},"required":["label"]},"Campaign":{"type":"object","properties":{"id":{"type":"string"},"name":{"type":"string"},"titleTemplate":{"type":"string"},"folderId":{"type":["string","null"]},"languagePreference":{"type":["string","null"]},"createdAt":{"type":["string","null"],"format":"date-time"},"status":{"type":"string","enum":["draft","processing","ready","failed","archived"],"description":"`draft`: no pitch video yet. `processing`: being set up, or processed after a change. `ready`: videos can be made from it. `failed`: setup or processing stopped, see `problems`. `archived`: archived. The state of the test video is in `testVideoApproval` and never changes `status`."},"problems":{"type":"array","items":{"$ref":"#/components/schemas/Problem"},"description":"Why the campaign is `failed`. Empty otherwise."},"revision":{"type":"string","description":"Opaque. Send it as `If-Match` with a `PATCH` to have a change of a stale read refused."},"durationSeconds":{"type":["number","null"],"description":"The length of the pitch video."},"pitchVideo":{"type":["object","null"],"properties":{"mediaId":{"type":["string","null"],"description":"`null` for a pitch video recorded or uploaded before media existed."}},"required":["mediaId"]},"pages":{"type":"array","items":{"$ref":"#/components/schemas/CampaignPage"}},"outro":{"type":["object","null"],"properties":{"mediaId":{"type":["string","null"]},"enabled":{"type":"boolean"}},"required":["mediaId","enabled"],"description":"The campaign's outro. (`outroVideo`, on `GET /campaigns/{campaignId}`, is the older stored record.)"},"variableSchema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/VariableConfig"},"description":"The variables a video of this campaign takes, keyed by variable name."},"testVideoApproval":{"type":"object","properties":{"videoId":{"type":["string","null"]},"approvedAt":{"type":["string","null"],"format":"date-time"}},"required":["videoId","approvedAt"],"description":"Which video is the campaign's test video, and when it was approved. (`testVideo`, on `GET /campaigns/{campaignId}`, is the older video object.)"}},"required":["id","name","folderId","status","problems","revision","durationSeconds","pitchVideo","pages","outro","testVideoApproval"],"description":"A campaign as this API describes it. `status` and `problems` are derived when the campaign is read."},"CampaignReadyEvent":{"type":"object","properties":{"campaignId":{"type":"string","description":"The campaign's id."},"campaign":{"$ref":"#/components/schemas/Campaign"},"event":{"type":"string","enum":["CAMPAIGN_READY"],"description":"The trigger the event was sent for."},"eventAt":{"type":"string","format":"date-time","description":"When it happened (ISO 8601). The same on every attempt."},"eventId":{"type":"string","description":"The event's id, the same on every attempt and in the `webhook-id` header. A receiver that may get an event twice keeps the ids it has handled.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}},"required":["campaignId","campaign","event","eventAt","eventId"],"description":"A campaign that was set up or changed can have videos made from it."},"CampaignFailedEvent":{"type":"object","properties":{"campaignId":{"type":"string","description":"The campaign's id."},"campaign":{"$ref":"#/components/schemas/Campaign"},"event":{"type":"string","enum":["CAMPAIGN_FAILED"],"description":"The trigger the event was sent for."},"eventAt":{"type":"string","format":"date-time","description":"When it happened (ISO 8601). The same on every attempt."},"eventId":{"type":"string","description":"The event's id, the same on every attempt and in the `webhook-id` header. A receiver that may get an event twice keeps the ids it has handled.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}},"required":["campaignId","campaign","event","eventAt","eventId"],"description":"A campaign's setup or processing failed."},"WebhookViewerVideo":{"type":"object","properties":{"_id":{"type":"string","description":"The video's id."},"campaignId":{"type":"string"},"shortId":{"type":["string","null"],"description":"The id in the video's link."},"title":{"type":["string","null"]},"userId":{"type":["string","null"],"description":"The campaign owner's user id."},"importId":{"type":["string","null"]},"variables":{"type":["object","null"],"additionalProperties":{},"description":"The values of the campaign's variables for this video, keyed by variable name."},"originalRow":{"type":["object","null"],"additionalProperties":{},"description":"The lead as it was sent or imported. Field names that contain `.` or start with `$` are stored escaped here; `video.originalRow` has them as sent."},"overrideRow":{"type":["object","null"],"additionalProperties":{},"description":"Values of the lead changed since, keyed like `originalRow`."},"originalUid":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"null"}]},"createdAt":{"type":["string","null"],"format":"date-time","description":"When the video was made."},"renderedAt":{"type":["string","null"],"format":"date-time","description":"When it was rendered."},"campaignName":{"type":["string","null"],"description":"The campaign's name."}},"required":["_id","campaignId"],"description":"The video that was viewed, as it is stored, with its campaign's name. Only the fields listed are kept stable."},"VideoViewedEvent":{"type":"object","properties":{"video":{"$ref":"#/components/schemas/WebhookViewerVideo"},"viewedAt":{"type":"string","format":"date-time","description":"Older name of `eventAt`."},"viewerUrl":{"type":"string","description":"The page the video was watched on, when the browser said."},"event":{"type":"string","enum":["VIDEO_VIEWED"],"description":"The trigger the event was sent for."},"eventAt":{"type":"string","format":"date-time","description":"When it happened (ISO 8601). The same on every attempt."},"eventId":{"type":"string","description":"The event's id, the same on every attempt and in the `webhook-id` header. A receiver that may get an event twice keeps the ids it has handled.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}},"required":["video","viewedAt","event","eventAt","eventId"],"description":"A video's page was opened."},"VideoFirstViewedEvent":{"type":"object","properties":{"video":{"$ref":"#/components/schemas/WebhookViewerVideo"},"viewedAt":{"type":"string","format":"date-time","description":"Older name of `eventAt`."},"viewerUrl":{"type":"string","description":"The page the video was watched on, when the browser said."},"event":{"type":"string","enum":["VIDEO_FIRST_VIEWED"],"description":"The trigger the event was sent for."},"eventAt":{"type":"string","format":"date-time","description":"When it happened (ISO 8601). The same on every attempt."},"eventId":{"type":"string","description":"The event's id, the same on every attempt and in the `webhook-id` header. A receiver that may get an event twice keeps the ids it has handled.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}},"required":["video","viewedAt","event","eventAt","eventId"],"description":"A video's page was opened for the first time."},"VideoStartedEvent":{"type":"object","properties":{"video":{"$ref":"#/components/schemas/WebhookViewerVideo"},"viewedAt":{"type":"string","format":"date-time","description":"Older name of `eventAt`."},"viewerUrl":{"type":"string","description":"The page the video was watched on, when the browser said."},"event":{"type":"string","enum":["VIDEO_STARTED"],"description":"The trigger the event was sent for."},"eventAt":{"type":"string","format":"date-time","description":"When it happened (ISO 8601). The same on every attempt."},"eventId":{"type":"string","description":"The event's id, the same on every attempt and in the `webhook-id` header. A receiver that may get an event twice keeps the ids it has handled.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}},"required":["video","viewedAt","event","eventAt","eventId"],"description":"A video started playing."},"VideoFirstStartedEvent":{"type":"object","properties":{"video":{"$ref":"#/components/schemas/WebhookViewerVideo"},"viewedAt":{"type":"string","format":"date-time","description":"Older name of `eventAt`."},"viewerUrl":{"type":"string","description":"The page the video was watched on, when the browser said."},"event":{"type":"string","enum":["VIDEO_FIRST_STARTED"],"description":"The trigger the event was sent for."},"eventAt":{"type":"string","format":"date-time","description":"When it happened (ISO 8601). The same on every attempt."},"eventId":{"type":"string","description":"The event's id, the same on every attempt and in the `webhook-id` header. A receiver that may get an event twice keeps the ids it has handled.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}},"required":["video","viewedAt","event","eventAt","eventId"],"description":"A video started playing for the first time."},"VideoFinishedEvent":{"type":"object","properties":{"video":{"$ref":"#/components/schemas/WebhookViewerVideo"},"viewedAt":{"type":"string","format":"date-time","description":"Older name of `eventAt`."},"viewerUrl":{"type":"string","description":"The page the video was watched on, when the browser said."},"event":{"type":"string","enum":["VIDEO_FINISHED"],"description":"The trigger the event was sent for."},"eventAt":{"type":"string","format":"date-time","description":"When it happened (ISO 8601). The same on every attempt."},"eventId":{"type":"string","description":"The event's id, the same on every attempt and in the `webhook-id` header. A receiver that may get an event twice keeps the ids it has handled.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}},"required":["video","viewedAt","event","eventAt","eventId"],"description":"A video was watched to the end."},"VideoFirstFinishedEvent":{"type":"object","properties":{"video":{"$ref":"#/components/schemas/WebhookViewerVideo"},"viewedAt":{"type":"string","format":"date-time","description":"Older name of `eventAt`."},"viewerUrl":{"type":"string","description":"The page the video was watched on, when the browser said."},"event":{"type":"string","enum":["VIDEO_FIRST_FINISHED"],"description":"The trigger the event was sent for."},"eventAt":{"type":"string","format":"date-time","description":"When it happened (ISO 8601). The same on every attempt."},"eventId":{"type":"string","description":"The event's id, the same on every attempt and in the `webhook-id` header. A receiver that may get an event twice keeps the ids it has handled.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}},"required":["video","viewedAt","event","eventAt","eventId"],"description":"A video was watched to the end for the first time."},"AccountPlan":{"type":"object","properties":{"name":{"type":["string","null"],"description":"The plan subscribed to; once the subscription is `cancelled`, the plan it was on. `null` without a subscription.","example":"Growth"},"status":{"type":"string","enum":["trialing","active","past_due","paused","cancelled","none"],"description":"The state of the organisation's subscription:\n\n- `trialing`: in its free trial; `trialEndsAt` says until when.\n- `active`: paid for and in force.\n- `past_due`: in force, but a payment is overdue and being retried.\n- `paused`: paused; it is not billed until it resumes.\n- `cancelled`: it has ended. A subscription whose cancellation is scheduled for the end of its term stays `active` (or `trialing`) until then. `cancelled` also covers accounts from the retired billing system whose subscription history isn't known, so for those it isn't proof of a cancellation.\n- `none`: the organisation has never had a subscription.\n\nAn unlimited plan has the status of its subscription. `active` is `true` exactly when the status is `active`, `past_due` or `paused`.","example":"active"},"active":{"type":"boolean","description":"Whether a paid subscription is in force: `status` is `active`, `past_due` or `paused`. `false` during a free trial, once cancelled, and without a subscription."},"monthlyVideoCredits":{"type":["integer","null"],"description":"The video credits the plan grants each month. `null` when there is no current plan (`status` is `cancelled` or `none`), and on an unlimited plan.","example":100},"trialEndsAt":{"type":["string","null"],"format":"date-time","description":"When the free trial ends, while the subscription is in one. `null` otherwise."},"unlimited":{"type":"boolean","description":"Whether the plan is unlimited: it does not count video credits. `false` once the subscription is `cancelled`."}},"required":["name","status","active","monthlyVideoCredits","trialEndsAt","unlimited"],"description":"The organisation's plan."},"Account":{"type":"object","properties":{"id":{"type":"string","description":"The user's id.","example":"auth0|6650f1c2a1b2c3d4e5f60718"},"email":{"type":["string","null"],"example":"ada@example.com"},"name":{"type":["string","null"],"description":"The user's full name.","example":"Ada Lovelace"},"firstName":{"type":["string","null"],"example":"Ada"},"lastName":{"type":["string","null"],"example":"Lovelace"},"phone":{"type":["string","null"],"example":"+44 20 7946 0000"},"organisation":{"type":["object","null"],"properties":{"id":{"type":"string"},"plan":{"$ref":"#/components/schemas/AccountPlan"}},"required":["id","plan"],"description":"The organisation the user belongs to, and its plan. `null` when the user does not belong to one yet, so has no subscription either."},"defaultDomain":{"type":["string","null"],"description":"The domain a new campaign's video links are on, unless the campaign is given another.","example":"pitchlane.video"}},"required":["id","email","name","firstName","lastName","phone","organisation","defaultDomain"],"description":"Who the API key or token belongs to. A value that is not known is `null`; no field is ever left out."},"MediaType":{"type":"string","enum":["pitch_video","outro_video","page_video","page_image"],"description":"What the file is for. It is fixed when the media is created, and the media can only be used in the place of its type.\n\n| type | content types | must have |\n|---|---|---|\n| `pitch_video` | `video/mp4`, `video/webm` | a video and an audio track; at most 30 minutes |\n| `outro_video` | `video/mp4`, `video/webm`, `video/mpeg` | a video and an audio track |\n| `page_video` | `video/mp4`, `video/webm`, `video/quicktime`, `video/x-matroska`, `video/avi` | a video track |\n| `page_image` | `image/jpeg`, `image/png` | a picture that can be decoded |\n\nEvery type is at most 1 GiB.\n"},"MediaStatus":{"type":"string","enum":["awaiting_upload","fetching","processing","ready","failed","expired"],"description":"`awaiting_upload`: created, the file has not been uploaded yet. `fetching`: the file is being fetched from `sourceUrl`. `processing`: the file is being checked. `ready`: it can be used. `failed`: the file was refused, and `problems` says why. `expired`: the file was not uploaded in time. `failed` and `expired` are final.\n"},"MediaUpload":{"type":"object","properties":{"url":{"type":"string"},"method":{"type":"string","enum":["PUT"]},"headers":{"type":"object","additionalProperties":{"type":"string"},"example":{"Content-Type":"video/mp4","If-None-Match":"*"}},"expiresAt":{"type":"string","format":"date-time"}},"required":["url","method","headers","expiresAt"],"description":"How to upload the file. Send one `PUT` to `url` with every header in `headers`, exactly as given, and a body of exactly `sizeBytes` bytes (no chunked transfer). The URL accepts one upload; there is no \"upload finished\" call."},"Media":{"type":"object","properties":{"id":{"type":"string","example":"med_V1StGXR8Z5jdHi6BmyT"},"type":{"$ref":"#/components/schemas/MediaType"},"status":{"$ref":"#/components/schemas/MediaStatus"},"origin":{"type":"string","enum":["upload","url"]},"source":{"type":"string","enum":["dashboard","api"],"description":"Whether it was created in the dashboard or through this API."},"contentType":{"type":"string","example":"video/mp4"},"sizeBytes":{"type":"integer","description":"The size of the file. For media fetched from a URL it is 0 until the source has said how large the file is."},"filename":{"type":["string","null"]},"probe":{"type":["object","null"],"properties":{"durationMs":{"type":"number","minimum":0},"width":{"type":"integer","minimum":0},"height":{"type":"integer","minimum":0},"hasVideo":{"type":"boolean"},"hasAudio":{"type":"boolean"},"container":{"type":"string"},"videoCodec":{"type":"string"},"audioCodec":{"type":"string"},"actualSizeBytes":{"type":"integer","minimum":0}},"required":["hasVideo","hasAudio","actualSizeBytes"],"description":"What was measured once the file was processed."},"problems":{"type":"array","items":{"$ref":"#/components/schemas/Problem"},"description":"Why the media is `failed` or `expired`. Empty otherwise."},"previewUrl":{"type":["string","null"],"description":"Page images and page videos only, once `ready`. Where the file can be shown from."},"createdAt":{"type":"string","format":"date-time"},"uploadExpiresAt":{"type":"string","format":"date-time","description":"When the upload URL stops accepting the file."},"readyAt":{"type":["string","null"],"format":"date-time"}},"required":["id","type","status","origin","source","contentType","sizeBytes","filename","probe","problems","previewUrl","createdAt","uploadExpiresAt","readyAt"]},"TranscriptStatus":{"type":"string","enum":["processing","ready","failed"],"description":"`processing`: the speech is being transcribed. `ready`: done. `failed`: it could not be transcribed, and `failure` says why. A transcript is made once per file and does not change once `ready`.\n"},"Transcript":{"type":"object","properties":{"id":{"type":"string","example":"trn_Q2kM9xY7vL1pR4sT6uW8z"},"mediaId":{"type":"string","example":"med_V1StGXR8Z5jdHi6BmyT"},"status":{"$ref":"#/components/schemas/TranscriptStatus"},"language":{"type":["string","null"],"description":"The language spoken (BCP 47), e.g. `en`, when it is known. `null` otherwise: the language is not detected today.","example":null},"durationSeconds":{"type":["number","null"],"description":"The length of the file the transcript is of.","example":42.5},"wordTiming":{"type":["string","null"],"enum":["measured","estimated"],"description":"How the times are known. `estimated`: the pauses in the speech are measured and the words are placed between them, so a word or the start of a sentence is right to within a few hundred milliseconds. `measured`: every word was aligned to the audio. `null` until `ready`.","example":"estimated"},"text":{"type":"string","description":"Everything that was said, as sentences. Empty until `ready`.","example":"Hi Sarah. I had a look at acme.com."},"segments":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","example":"s0001"},"text":{"type":"string","example":"Hi Sarah."},"startSeconds":{"type":"number","example":0.08},"endSeconds":{"type":"number","example":0.8}},"required":["id","text","startSeconds","endSeconds"]},"description":"The sentences, in order, with when each is spoken from the start of the file. Use them to time the pages to what is said."},"words":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Stable within the transcript.","example":"w0002"},"text":{"type":"string","description":"The word alone.","example":"Sarah"},"before":{"type":"string","description":"Punctuation in front of the word, e.g. `(`."},"after":{"type":"string","description":"Punctuation behind the word.","example":"."},"startSeconds":{"type":"number","example":0.32},"endSeconds":{"type":"number","example":0.8},"confidence":{"type":["number","null"],"description":"How sure the transcription is of the word, 0 to 1. `null` when it did not say.","example":0.99}},"required":["id","text","startSeconds","endSeconds","confidence"]},"description":"Every word with its times. Only with `include=words`."},"failure":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"description":"Only when `failed`. `transcript_audio_unusable`: the speech in the file could not be transcribed. `transcript_unavailable`: a fault on our side."}},"required":["id","mediaId","status","language","durationSeconds","wordTiming","text","segments"]},"CampaignSummary":{"type":"object","properties":{"id":{"type":"string","example":"o6duFik0_UNSUGPCn1LTm"},"name":{"type":"string"},"createdAt":{"type":"string","format":"date-time"},"variableSchema":{"type":["object","null"],"additionalProperties":{"$ref":"#/components/schemas/VariableConfig"},"description":"The variables a video of this campaign takes, keyed by variable name."},"examplePayload":{"type":["object","null"],"additionalProperties":{},"description":"A sample of the `variables` of `POST /campaigns/{campaignId}/videos` for this campaign."},"archived":{"type":"boolean"},"folderId":{"type":"string","description":"The folder it is in, if any."},"thumbnailUrl":{"type":"string","description":"Where the campaign's thumbnail is, under the API's host."}},"required":["id","name","thumbnailUrl"]},"CampaignList":{"type":"object","properties":{"campaigns":{"type":"array","items":{"allOf":[{"$ref":"#/components/schemas/CampaignSummary"},{"type":"object","properties":{"status":{"type":"string","enum":["draft","processing","ready","failed","archived"],"description":"As `status` of the Campaign object."}},"required":["status"]}]}},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` to read the next page. `null` on the last page."},"pagination":{"type":"object","properties":{"total":{"type":"integer"},"limit":{"type":"number"},"offset":{"type":"number"},"hasMore":{"type":"boolean"}},"required":["total","limit","offset","hasMore"],"description":"On a request without `cursor`: how many campaigns there are, and where this page is among them."}},"required":["campaigns","nextCursor"]},"CampaignPageInput":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["lead_url"]},"template":{"type":"string","minLength":1,"description":"Which of the lead's pages: `website`, `linkedin`, …"},"scroll":{"type":"string","enum":["auto","none","custom"],"description":"`auto` scrolls the page for as long as it is on screen, `none` never scrolls. `custom` is read-only: the page has scrolling recorded in the dashboard. Leave `scroll` out (or send `custom`) for an existing page to keep what is recorded."},"id":{"type":"string","minLength":1,"description":"The id of a page the campaign has, to keep what is stored about it. Leave it out for a new page."},"title":{"type":["string","null"],"description":"Shown in variable labels (\"Page 1: Company Website\"). Defaults to the template's title."},"notes":{"type":["string","null"],"description":"Speaker notes for whoever records the pitch."},"durationSeconds":{"type":["number","null"],"exclusiveMinimum":0,"description":"How long the page is on screen. Needed on every page but the last once the campaign has a pitch video; the last page always runs to the end of it."}},"required":["type","template"]},{"type":"object","properties":{"type":{"type":"string","enum":["url"]},"url":{"type":"string","minLength":1},"scroll":{"type":"string","enum":["auto","none","custom"],"description":"`auto` scrolls the page for as long as it is on screen, `none` never scrolls. `custom` is read-only: the page has scrolling recorded in the dashboard. Leave `scroll` out (or send `custom`) for an existing page to keep what is recorded."},"id":{"type":"string","minLength":1,"description":"The id of a page the campaign has, to keep what is stored about it. Leave it out for a new page."},"title":{"type":["string","null"],"description":"Shown in variable labels (\"Page 1: Company Website\"). Defaults to the template's title."},"notes":{"type":["string","null"],"description":"Speaker notes for whoever records the pitch."},"durationSeconds":{"type":["number","null"],"exclusiveMinimum":0,"description":"How long the page is on screen. Needed on every page but the last once the campaign has a pitch video; the last page always runs to the end of it."}},"required":["type","url"]},{"type":"object","properties":{"type":{"type":"string","enum":["image"]},"mediaId":{"type":["string","null"],"pattern":"^med_[0-9A-Za-z_]+$","description":"A `page_image`."},"id":{"type":"string","minLength":1,"description":"The id of a page the campaign has, to keep what is stored about it. Leave it out for a new page."},"title":{"type":["string","null"],"description":"Shown in variable labels (\"Page 1: Company Website\"). Defaults to the template's title."},"notes":{"type":["string","null"],"description":"Speaker notes for whoever records the pitch."},"durationSeconds":{"type":["number","null"],"exclusiveMinimum":0,"description":"How long the page is on screen. Needed on every page but the last once the campaign has a pitch video; the last page always runs to the end of it."}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["video"]},"mediaId":{"type":["string","null"],"pattern":"^med_[0-9A-Za-z_]+$","description":"A `page_video`."},"id":{"type":"string","minLength":1,"description":"The id of a page the campaign has, to keep what is stored about it. Leave it out for a new page."},"title":{"type":["string","null"],"description":"Shown in variable labels (\"Page 1: Company Website\"). Defaults to the template's title."},"notes":{"type":["string","null"],"description":"Speaker notes for whoever records the pitch."},"durationSeconds":{"type":["number","null"],"exclusiveMinimum":0,"description":"How long the page is on screen. Needed on every page but the last once the campaign has a pitch video; the last page always runs to the end of it."}},"required":["type"]}],"description":"One page of a campaign. `type` decides the other fields: `lead_url` (a page of the lead's own, chosen by `template`), `url` (one fixed page at `url`), `image` (`mediaId` of a `page_image`) or `video` (`mediaId` of a `page_video`). Send a page back with its `id` to keep what is stored about it."},"CampaignCreate":{"type":"object","properties":{"name":{"type":"string","minLength":1},"titleTemplate":{"type":"string"},"folderId":{"type":"string"},"languagePreference":{"type":"string"},"fromCampaignId":{"type":"string","description":"Start from a copy of this campaign of yours."},"pitchVideo":{"type":"object","properties":{"mediaId":{"type":"string","pattern":"^med_[0-9A-Za-z_]+$","description":"A `pitch_video`."}},"required":["mediaId"]},"pages":{"type":"array","items":{"$ref":"#/components/schemas/CampaignPageInput"},"minItems":1},"outro":{"type":"object","properties":{"mediaId":{"type":"string","pattern":"^med_[0-9A-Za-z_]+$","description":"An `outro_video`."},"enabled":{"type":"boolean","description":"Defaults to `true`."}},"required":["mediaId"]}},"required":["name"],"example":{"name":"Q1 outbound","pitchVideo":{"mediaId":"med_V1StGXR8Z5jdHi6BmyT"},"pages":[{"type":"lead_url","template":"website","durationSeconds":25,"scroll":"auto"},{"type":"url","url":"https://acme.com/pricing"}]}},"CampaignValidation":{"type":"object","properties":{"changes":{"type":"object","properties":{"settings":{"type":"array","items":{"type":"string"},"description":"The settings the request sets."},"variablesAdded":{"type":"array","items":{"type":"string"}},"variablesRemoved":{"type":"array","items":{"type":"string"}},"reprocessed":{"type":"array","items":{"type":"string","enum":["pitch","pages","outro"]},"description":"What is processed again. Empty when the change applies at once."}},"required":["settings","variablesAdded","variablesRemoved","reprocessed"]},"problems":{"type":"array","items":{"$ref":"#/components/schemas/Problem"}}},"required":["changes","problems"],"description":"What a change would do, from `validateOnly`."},"CampaignPatch":{"type":"object","properties":{"name":{"type":"string","minLength":1},"titleTemplate":{"type":["string","null"]},"folderId":{"type":["string","null"]},"languagePreference":{"type":["string","null"]},"pitchVideo":{"type":["object","null"],"properties":{"mediaId":{"type":["string","null"],"pattern":"^med_[0-9A-Za-z_]+$"}},"required":["mediaId"]},"pages":{"type":"array","items":{"$ref":"#/components/schemas/CampaignPageInput"},"minItems":1},"outro":{"type":["object","null"],"properties":{"mediaId":{"type":["string","null"],"pattern":"^med_[0-9A-Za-z_]+$"},"enabled":{"type":"boolean"}}},"validateOnly":{"type":"boolean","description":"Report `changes` and `problems` without applying anything."}}},"Folder":{"type":"object","properties":{"id":{"type":"string","example":"V1StGXR8_Z5jdHi6B-myT"},"name":{"type":"string","example":"Q1 outbound"},"createdAt":{"type":"string","format":"date-time"},"updatedAt":{"type":"string","format":"date-time","description":"When the folder was last renamed."},"campaignCount":{"type":"integer","description":"How many campaigns are in the folder, archived ones included."},"activeCampaignCount":{"type":"integer","description":"How many of them are not archived."},"archivedCampaignCount":{"type":"integer","description":"How many of them are archived."}},"required":["id","name","createdAt","updatedAt","campaignCount","activeCampaignCount","archivedCampaignCount"],"description":"A folder groups campaigns. Folders are flat (a folder is never inside another), and a campaign is in at most one."},"FolderList":{"type":"object","properties":{"folders":{"type":"array","items":{"$ref":"#/components/schemas/Folder"}},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` to read the next page. `null` on the last page."}},"required":["folders","nextCursor"]},"VideoWithViews":{"allOf":[{"$ref":"#/components/schemas/Video"},{"type":"object","properties":{"viewCount":{"type":"integer","description":"How many times the video's page (`videoUrl`) was loaded, all time. Every load counts, so one lead who opens the page twice counts 2. Loads by sessions classified as e-mail link scanners are left out (a session can be reclassified as a person's by what it does next, and is counted from then on); loads of the thumbnail image in an e-mail are not views. The count `filters[viewed]` and `sort[sortBy]=loadCount` use. `0` when never viewed."},"startedCount":{"type":"integer","description":"How many times playback was started on the video's page, all time, scanner sessions left out. Every start counts, back to the video's first: unlike `filters[startedCount]=true`, which only looks at starts since 2026-11-12. Playing it again after its end is another start; resuming after a pause is not."},"finishedCount":{"type":"integer","description":"How many times the video was played to its end, all time, scanner sessions left out."},"firstViewedAt":{"type":["string","null"],"format":"date-time","description":"When the first view counted in `viewCount` happened. `null` when never viewed."},"lastViewedAt":{"type":["string","null"],"format":"date-time","description":"When the most recent view counted in `viewCount` happened. `null` when never viewed."}},"required":["viewCount","startedCount","finishedCount","firstViewedAt","lastViewedAt"]}],"description":"A video, with how it was watched: what `GET /videos/{videoId}` and `GET /campaigns/{campaignId}/videos` answer. The counts are of events on the video's page, all time, as the dashboard counts them: sessions classified as e-mail link scanners are left out, and nothing is deduplicated per lead. They can be a few seconds behind."},"CampaignVideoList":{"type":"object","properties":{"count":{"type":"integer","description":"How many videos the filters match."},"renderedCount":{"type":"integer","description":"How many of those are rendered: their `renderedAt` is a date. One exception, as this list has always answered: without `search`, a count sort or a view-count filter, when the only filter is `filters[status]=NOT_RENDERED`, or `filters[statuses][]=NOT_RENDERED` alone, `renderedCount` counts the campaign's rendered videos instead (with `statuses`, those without an error or an issue), so it can be larger than `count`. With `search`, a count sort, a view-count filter or another filter beside it, the same request counts `0`."},"videos":{"type":"array","items":{"$ref":"#/components/schemas/VideoWithViews"}},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` to read on from this page by cursor; `null` on the last page. Present when cursor pages can continue the request: sorted by `createdAt` or `renderedAt`, without `search` or the view-count filters."}},"required":["count","renderedCount","videos"],"description":"Videos by position, with the totals of the filtered list."},"CampaignVideoPage":{"type":"object","properties":{"videos":{"type":"array","items":{"$ref":"#/components/schemas/VideoWithViews"}},"nextCursor":{"type":["string","null"],"description":"Pass as `cursor` to read the next page. `null` on the last page."}},"required":["videos","nextCursor"],"description":"A page of videos after a cursor."},"TestVideoQueueError":{"type":"object","properties":{"name":{"type":"string","description":"What refused the render, for example `TestVideoNotApprovedError`, `InsufficientCreditsError`, `FreeTestVideoLimitReachedError`, `ApiTestVideoRenderLimitReachedError`."},"message":{"type":"string"},"code":{"type":"string"},"limit":{"type":"integer"},"windowSeconds":{"type":"integer"},"retryAfterSeconds":{"type":"integer","description":"For a limit: seconds until the next free test-video render."}},"required":["name","message"],"description":"Why the video was not queued, when a render was attempted and refused (for example `TestVideoNotApprovedError` or `InsufficientCreditsError`)."},"RenderQueue":{"type":"object","properties":{"queued":{"type":"boolean","description":"The video was queued for rendering."},"testVideo":{"type":"boolean","description":"It was queued as the campaign's free test video. This happens for videos created while the campaign's test video is not approved yet, at most 10 times per organisation in any 24 hours."},"error":{"$ref":"#/components/schemas/TestVideoQueueError"},"testVideoLimitReached":{"allOf":[{"$ref":"#/components/schemas/TestVideoQueueError"},{"description":"Present when the organisation has used its free test-video renders through the API for the last 24 hours, so this video was not made the campaign's test video. It then renders only if the campaign's test video is approved and credits are available."}]}},"required":["queued","testVideo"],"description":"What happened to the render of this video. A `200` means the video was created or updated; check `queued` to know whether it is rendering."},"VariableIssue":{"type":"object","properties":{"affectedRows":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","description":"The row's index in `videos`."},"value":{"description":"The value that was refused."},"errors":{"type":"array","items":{"type":"string"}}},"required":["index","errors"]}}},"required":["affectedRows"],"description":"The rows a variable was refused in, and why."},"VideoImportResult":{"type":"object","properties":{"inserted":{"type":"integer","description":"Videos created."},"upserted":{"type":"integer","description":"Videos updated (always 0 today)."},"duplicates":{"type":"integer","description":"Rows skipped as duplicates of existing videos."},"invalidRows":{"type":"integer","description":"Rows refused."},"variableIssues":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/VariableIssue"},"description":"Rows that were skipped, by the variable they failed on (`_template` for a title that could not be made)."},"testVideoQueued":{"type":"boolean","description":"With `renderTestVideo` alone: the test video was queued. With `queueAllVideosForRender` alone: the renders were asked for, even if the render checks refused some or all of them, for example while the campaign's test video is not approved. `false` when neither is `true`."},"testVideoQueueError":{"allOf":[{"$ref":"#/components/schemas/TestVideoQueueError"},{"description":"Why the test video of `renderTestVideo` was not queued. `ApiTestVideoRenderLimitReachedError`: the organisation's test videos through the API for the last 24 hours are used up, and the campaign's test video was left as it is. Any other refusal of its render comes after the test video was replaced and its approval cleared."}]}},"required":["inserted","upserted","duplicates"],"description":"What the import did. With no rows only `inserted`, `upserted` and `duplicates` are sent."},"VideoImportRow":{"type":"object","additionalProperties":{},"description":"One lead: your own fields, keyed by your column names, as mapped on the campaign's \"Import via API\" page. Three keys are read specially: `originalData` or `originalRow` (an object: the lead as you have it, stored instead of the other keys) and `originalRowIndex` (its row in your data).","example":{"First Name":"Ada","Website":"https://example.com","originalRowIndex":1}},"SignedWebhook":{"type":"object","properties":{"id":{"type":"string","example":"DHFG2C09n_3qrsSymZjjm"},"trigger":{"type":"string","enum":["VIDEO_RENDERED","VIDEO_CREATED","VIDEO_UPDATED","VIDEO_UNRENDERABLE","CAMPAIGN_READY","CAMPAIGN_FAILED","VIDEO_VIEWED","VIDEO_FIRST_VIEWED","VIDEO_STARTED","VIDEO_FIRST_STARTED","VIDEO_FINISHED","VIDEO_FIRST_FINISHED"]},"webhookUrl":{"type":"string"},"signed":{"type":"boolean","enum":[true],"description":"The subscription has a signing secret: its deliveries are signed."},"secret":{"type":"string","description":"The secret this subscription's deliveries are signed with from now on (see Verifying a delivery, under Webhook events). Returned here once and by no other endpoint, so store it now. A request repeated with the same `Idempotency-Key` is answered without it.","example":"whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw"},"campaignId":{"type":"string","description":"The campaign the subscription is on. Left out for one on the account."}},"required":["id","trigger","webhookUrl","signed"],"description":"A webhook subscription that has just been given its signing secret."}},"parameters":{"IdempotencyKey":{"in":"header","name":"Idempotency-Key","required":false,"schema":{"type":"string","maxLength":255},"description":"Makes the request safe to retry. See \"Idempotency\" at the top of this document."}},"responses":{"Error":{"description":"The request was refused. `error.code` says why.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"ValidationError":{"description":"The request is not valid. `error.problems` lists everything that is wrong with it; `error.code`, `error.message` and `error.path` are the first problem's.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InvalidIdempotencyKey":{"description":"The `Idempotency-Key` header is not one that can be used (`invalid_idempotency_key`). It must be 1 to 255 printable ASCII characters without spaces. Nothing was done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"LimitReached":{"description":"A limit of the organisation was reached. The limits are shared with the dashboard. `Retry-After` and `error.retryAfterSeconds` say when capacity returns.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds until the request can succeed."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"InvalidRequest":{"description":"The request is not valid (`invalid_request`). `error.problems` lists everything that is wrong with it, each with its `code`, `message` and `path`; `error.message` and `error.path` are the first problem's.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"CampaignNotFound":{"description":"`campaign_not_found`: your account has no campaign with this id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"CampaignArchived":{"description":"`campaign_archived`: the campaign is archived and cannot be changed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unavailable":{"description":"The request cannot be carried out right now; retry it after `Retry-After` seconds. `error.code` says why. `idempotency_unavailable` means the `Idempotency-Key` could not be checked, and nothing was done.","headers":{"Retry-After":{"schema":{"type":"integer"},"description":"Seconds to wait before retrying."}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"security":[{"apiKey":[]}],"tags":[{"name":"Account","description":"Who the API key belongs to: the user, their organisation and its plan"},{"name":"Campaigns","description":"Endpoints for creating and managing campaigns"},{"name":"Folders","description":"Folders that group campaigns. A campaign is moved with `folderId` of `PATCH /campaigns/{campaignId}`"},{"name":"Media","description":"Files a campaign refers to by id: pitch videos, outro videos, page videos and page images"},{"name":"Videos","description":"Endpoints for creating and managing videos"},{"name":"Webhook subscriptions","description":"Subscribing URLs to events. The events, and the body each is sent with, are under Webhook events."},{"name":"Webhook events","description":"What Pitchlane sends to a subscribed URL: one entry per trigger, with the body it is sent with. These are requests Pitchlane makes to you, not endpoints you call.\n\n**Verifying a delivery.** Creating a subscription answers its signing `secret` (`whsec_` and a base64 key). It is returned that once and by no other endpoint. To check that a delivery came from Pitchlane and was not changed on the way:\n\n1. Look up the secret you stored for the subscription named by `webhook-subscription-id`. Reject the delivery if you have none for it.\n2. Take the request body exactly as it was received, before parsing it as JSON.\n3. Build the signed content: `{webhook-id}.{webhook-timestamp}.{body}`. (`webhook-subscription-id` is not in it.)\n4. Compute its HMAC-SHA256, keyed with the base64-decoded part of the secret after `whsec_`, and base64-encode the result.\n5. Compare it, in constant time, with the part after `v1,` of each space-separated entry of `webhook-signature`. Accept the delivery when one matches.\n6. Reject a delivery whose `webhook-timestamp` is more than five minutes from your clock, so that a captured delivery cannot be sent to you again later.\n\nThe official Standard Webhooks libraries do steps 2 to 6: in JavaScript, `new Webhook(secret).verify(rawBody, headers)` from the `standardwebhooks` package.\n\nA subscription created before signing was introduced has no secret, and its deliveries carry no `webhook-signature`; they are otherwise unchanged. To have signed deliveries, call `POST /webhooks/{webhookId}/secret`, which gives such a subscription its secret; `signed` in `GET /webhooks` says which subscriptions have one."}],"paths":{"/campaigns/{campaignId}/webhooks":{"post":{"summary":"Create a campaign-specific webhook subscription.","description":"Notify the specified URL when a video event occurs. For general (not specific to one campaign) webhooks, use the /webhooks endpoint. The answer carries the subscription's signing `secret`, once.","tags":["Webhook subscriptions"],"parameters":[{"in":"path","name":"campaignId","required":true,"schema":{"type":"string"},"description":"The unique identifier of the campaign."}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["webhookUrl","trigger"],"properties":{"webhookUrl":{"type":"string","description":"The URL to send the webhook to when the event occurs."},"campaignId":{"type":"string","description":"The unique identifier of the campaign."},"trigger":{"$ref":"#/components/schemas/trigger"}}}}}},"responses":{"201":{"description":"The webhook was successfully created.","content":{"application/json":{"schema":{"type":"object","description":"Information about the webhook created.","properties":{"trigger":{"$ref":"#/components/schemas/trigger"},"webhookUrl":{"type":"string","description":"The URL the webhook will be sent to when the trigger occurs."},"id":{"type":"string","example":"DHFG2C09n_3qrsSymZjjm","description":"The ID of the webhook created."},"signed":{"type":"boolean","description":"Always `true` for a new subscription - its deliveries are signed."},"secret":{"type":"string","example":"whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw","description":"The secret this subscription's deliveries are signed with (see Verifying a delivery, under Webhook events). Returned here once and by no other endpoint, so store it now. A request repeated with the same `Idempotency-Key` is answered without it."}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"404":{"$ref":"#/components/responses/CampaignNotFound"}}},"delete":{"summary":"Delete a campaign-specific webhook subscription.","description":"Delete a webhook subscription. If the webhook is associated with a campaign, the campaignId must be provided. If the webhook is not associated with a campaign, the campaignId must be omitted, and the endpoint /webhooks must be used instead.","tags":["Webhook subscriptions"],"parameters":[{"in":"path","name":"campaignId","required":true,"schema":{"type":"string"},"description":"The unique identifier of the campaign."},{"in":"query","name":"webhookUrl","required":true,"schema":{"type":"string"},"description":"The URL of the webhook to be deleted."},{"in":"query","name":"trigger","required":false,"schema":{"$ref":"#/components/schemas/trigger"},"description":"The trigger of the subscription to delete. Leave it out to delete every subscription to this URL, whatever its trigger."}],"responses":{"204":{"description":"The webhook was successfully deleted."},"400":{"$ref":"#/components/responses/InvalidRequest"},"404":{"description":"`campaign_not_found`: your account has no campaign with this `campaignId`. `webhook_not_found`: no subscription matches the `webhookUrl` and `trigger` given.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/webhooks":{"post":{"summary":"Create a webhook subscription.","description":"Notify the specified URL when a video event occurs. If a campaignId is provided, the webhook will only be triggered by events in that campaign. If no campaignId is provided, the webhook will be triggered by events in any campaign. The answer carries the subscription's signing `secret`, once.","tags":["Webhook subscriptions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["webhookUrl","trigger"],"properties":{"webhookUrl":{"type":"string","description":"The URL to send the webhook to when the event occurs."},"campaignId":{"type":"string","description":"The unique identifier of the campaign."},"trigger":{"$ref":"#/components/schemas/trigger"}}}}}},"responses":{"201":{"description":"The webhook was successfully created.","content":{"application/json":{"schema":{"type":"object","description":"Information about the webhook created.","properties":{"trigger":{"$ref":"#/components/schemas/trigger"},"webhookUrl":{"type":"string","description":"The URL the webhook will be sent to when the trigger occurs."},"id":{"type":"string","example":"DHFG2C09n_3qrsSymZjjm","description":"The ID of the webhook created."},"signed":{"type":"boolean","description":"Always `true` for a new subscription - its deliveries are signed."},"secret":{"type":"string","example":"whsec_MfKQ9r8GKYqrTwjUPD8ILPZIo2LaLaSw","description":"The secret this subscription's deliveries are signed with (see Verifying a delivery, under Webhook events). Returned here once and by no other endpoint, so store it now. A request repeated with the same `Idempotency-Key` is answered without it."},"userId":{"type":"string","description":"The unique identifier of the user."},"createdAt":{"type":"string","description":"The date and time the webhook was created."}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"404":{"$ref":"#/components/responses/CampaignNotFound"}}},"delete":{"summary":"Delete a webhook subscription.","description":"Delete a webhook subscription. If the webhook is associated with a campaign, the campaignId must be provided. If the webhook is not associated with a campaign, the campaignId must be omitted.","tags":["Webhook subscriptions"],"parameters":[{"in":"query","name":"webhookUrl","required":true,"schema":{"type":"string"},"description":"The URL of the webhook to be deleted."},{"in":"query","name":"trigger","required":false,"schema":{"$ref":"#/components/schemas/trigger"},"description":"The trigger of the subscription to delete. Leave it out to delete every subscription to this URL, whatever its trigger."}],"responses":{"204":{"description":"The webhook was successfully deleted."},"400":{"$ref":"#/components/responses/InvalidRequest"},"404":{"description":"`campaign_not_found`: your account has no campaign with this `campaignId`. `webhook_not_found`: no subscription matches the `webhookUrl` and `trigger` given.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"get":{"summary":"Get the webhook subscriptions for a user and campaign.","description":"Get a list of webhook subscriptions. If a campaignId is provided, webhooks from other campaigns will be omitted.","tags":["Webhook subscriptions"],"responses":{"200":{"description":"A list of webhook objects.","content":{"application/json":{"schema":{"type":"array","items":{"type":"object","description":"Information about the webhook created.","properties":{"trigger":{"$ref":"#/components/schemas/trigger"},"webhookUrl":{"type":"string","description":"The URL the webhook will be sent to when the trigger occurs."},"id":{"type":"string","description":"The unique identifier of the webhook."},"userId":{"type":"string","description":"The unique identifier of the user."},"createdAt":{"type":"string","description":"The date and time the webhook was created."},"signed":{"type":"boolean","description":"Whether the subscription has a signing secret, so that its deliveries carry `webhook-signature`. `false` for a subscription created before deliveries were signed - `POST /webhooks/{webhookId}/secret` gives it one."},"campaignId":{"type":["string","null"],"description":"The unique identifier of the campaign."},"campaign":{"type":["object","null"],"description":"The campaign the webhook is associated with.","properties":{"_id":{"type":"string","description":"The unique identifier of the campaign."},"name":{"type":"string","description":"The name of the campaign."}}}}}}}}}}},"put":{"summary":"Update a webhook subscription.","description":"Update a webhook subscription. If the webhook is associated with a campaign, the campaignId must be provided. If the webhook is not associated with a campaign, the campaignId must be omitted.","tags":["Webhook subscriptions"],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The unique identifier of the webhook."},"webhookUrl":{"type":"string","description":"The URL to send the webhook to when the event occurs."},"campaignId":{"type":"string","description":"The unique identifier of the campaign."},"trigger":{"$ref":"#/components/schemas/trigger"}}}}}},"responses":{"200":{"description":"The webhook was successfully updated.","content":{"application/json":{"schema":{"type":"object","description":"The webhook object.","properties":{"trigger":{"$ref":"#/components/schemas/trigger"},"webhookUrl":{"type":"string","description":"The URL the webhook will be sent to when the trigger occurs."},"id":{"type":"string","example":"DHFG2C09n_3qrsSymZjjm","description":"The ID of the webhook."},"createdAt":{"type":"string","example":"2024-08-21T13:05:39.923Z","description":"The date and time the webhook was created."},"userId":{"type":"string","example":"google-oauth2|123456789","description":"The ID of the user who created the webhook."},"signed":{"type":"boolean","description":"Whether the subscription has a signing secret, so that its deliveries carry `webhook-signature`."}}}}}},"400":{"$ref":"#/components/responses/InvalidRequest"},"404":{"description":"`campaign_not_found`: your account has no campaign with this `campaignId`. `webhook_not_found`: your account has no webhook subscription with this `id`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/me":{"get":{"summary":"Get the account the API key belongs to.","description":"The user the API key (or OAuth token) belongs to, their organisation and its plan. Use it to check that a key works.","tags":["Account"],"responses":{"200":{"description":"The account.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Account"}}}}}}},"/media":{"post":{"summary":"Create a media object.","description":"A media object is a file a campaign refers to by id: a pitch video, an outro video, a page video or a page image. Create it, get the file to us, and use its `id` in `POST /campaigns` or `PATCH /campaigns/{campaignId}`. The campaign can be created before the file has arrived.\n\nThere are two ways to get the file to us.\n\n**Upload it.** Send `type`, `contentType` and `sizeBytes`. The answer carries `upload`: send one `PUT` to `upload.url` with every header in `upload.headers`, exactly as given, and a body of exactly `sizeBytes` bytes. The URL is valid for 60 minutes and accepts one upload.\n\n**Have it fetched.** Send `type` and `sourceUrl`. The file is fetched from that URL in the background (`status: \"fetching\"`). The URL must be `https` on the default port, without a user name or password, and must lead, through at most five redirects, only to addresses on the public internet; it must deliver the file within eight minutes. A source that says how large the file is (`Content-Length`) is refused at once when that is over the type's limit; one that does not is read until the limit is passed. Send `contentType` when the URL does not end in a file extension that says what the file is. The URL is not kept once the fetch has ended and is never returned.\n\nEither way the file is then checked (`processing`) against the rules of its type, and the media becomes `ready` or `failed` with `problems`. Poll `GET /media/{mediaId}`.\n\nLimits are per organisation and shared with the dashboard: media created and bytes per rolling 24 hours, and files on their way at once (`429` with `Retry-After`).\n","tags":["Media"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"anyOf":[{"type":"object","properties":{"type":{"$ref":"#/components/schemas/MediaType"},"contentType":{"type":"string","minLength":1,"example":"video/mp4"},"sizeBytes":{"type":"integer","description":"The exact size of the file in bytes."},"filename":{"type":"string","minLength":1,"maxLength":255,"description":"Your name for the file. Informational."}},"required":["type","contentType","sizeBytes"],"title":"Upload","not":{"required":["sourceUrl"]}},{"type":"object","properties":{"type":{"$ref":"#/components/schemas/MediaType"},"sourceUrl":{"type":"string","minLength":1,"example":"https://cdn.example.com/pitch.mp4"},"contentType":{"type":"string","minLength":1,"description":"Needed only when the URL does not end in a file extension that says what the file is."},"filename":{"type":"string","minLength":1,"maxLength":255}},"required":["type","sourceUrl"],"additionalProperties":false,"title":"Fetch from a URL"}]}}}},"responses":{"201":{"description":"The media was created. `upload` is present when the file is to be uploaded.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Media"},{"type":"object","properties":{"upload":{"$ref":"#/components/schemas/MediaUpload"}}}]}}}},"400":{"$ref":"#/components/responses/InvalidIdempotencyKey"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/LimitReached"},"503":{"$ref":"#/components/responses/Error"}}},"get":{"summary":"List your media.","description":"Newest first. Pass `nextCursor` of one page as `cursor` to get the next.","tags":["Media"],"parameters":[{"schema":{"$ref":"#/components/schemas/MediaType"},"required":false,"name":"type","in":"query"},{"schema":{"$ref":"#/components/schemas/MediaStatus"},"required":false,"name":"status","in":"query"},{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"`nextCursor` of the previous page, to read the next one."},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"One page of media.","content":{"application/json":{"schema":{"type":"object","properties":{"media":{"type":"array","items":{"$ref":"#/components/schemas/Media"}},"nextCursor":{"type":["string","null"],"description":"`null` on the last page."}},"required":["media","nextCursor"]}}}},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/media/{mediaId}":{"get":{"summary":"Get a media object.","description":"While the media is `awaiting_upload`, reading it also makes us look for the upload at once, so polling this after the `PUT` is how to learn quickly that the file arrived.","tags":["Media"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"mediaId","in":"path"}],"responses":{"200":{"description":"The media.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Media"},{"type":"object","properties":{"transcript":{"type":["object","null"],"properties":{"id":{"type":"string"},"status":{"$ref":"#/components/schemas/TranscriptStatus"}},"required":["id","status"],"description":"Pitch videos only: their transcript, once one has been started (`GET /media/{mediaId}/transcript`). `null` otherwise."}},"required":["transcript"]}]}}}},"404":{"$ref":"#/components/responses/Error"}}},"delete":{"summary":"Delete a media object.","description":"Deletes the media and its file. Refused (`409 media_in_use`) while a campaign uses it, and that includes a campaign you have deleted for as long as it can still be restored. Media that no campaign uses is also deleted automatically thirty days after it was created.","tags":["Media"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"mediaId","in":"path"}],"responses":{"204":{"description":"Deleted."},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"}}}},"/media/{mediaId}/transcript":{"get":{"summary":"Get the transcript of a pitch video.","description":"What is said in a pitch video, as sentences with when each is spoken, so that pages can be timed to the pitch. A pitch video is transcribed once it is `ready`; a transcript that is `processing` or `failed` is answered with that status.\n\nWords, with their times and ids, only with `include=words`: a ten-minute pitch is about 1,500 of them.\n\n`404 transcript_not_found` when the media has no transcript: it is not a pitch video, it is not `ready` yet, or it has not been transcribed.","tags":["Media"],"parameters":[{"schema":{"type":"string"},"required":true,"name":"mediaId","in":"path"},{"schema":{"type":"string","enum":["words"],"description":"`words`: also answer every word with its times."},"required":false,"name":"include","in":"query"}],"responses":{"200":{"description":"The transcript.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Transcript"}}}},"404":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/ValidationError"}}}},"/campaigns":{"get":{"summary":"List your campaigns.","description":"Newest first. Two ways to page, both supported:\n\n- **By position:** `limit` and `offset`. The page also has `pagination` (the totals) and `nextCursor`.\n- **By cursor:** send a page's `nextCursor` as `cursor` to get the next one: `{ campaigns, nextCursor }`, 20 campaigns a page (`limit`, at most 100), without the totals. Start a walk with a page by position.\n\nEach campaign says which folder it is in (`folderId`). Without `folder` in the request the list has the campaigns of every folder and of none; with `folder` set to a folder's id, those of that folder, and with `folder=none` those in no folder.\n\n**Deprecated form**, still answered for existing integrations: without `limit`, `offset` or `cursor`, the answer is every campaign as a bare array (its items have no `status`).","tags":["Campaigns"],"parameters":[{"schema":{"type":"integer","description":"Campaigns per page. By position: 20 when left out, and a larger `limit` than 100 is answered. With `cursor`: 1 to 100, 20 when left out.","minimum":1},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"`nextCursor` of the previous page. Send the same `archivedOnly` and `folder` as that request."},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"integer","description":"By position: how many campaigns to skip.","minimum":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","description":"`true`: only archived campaigns. Otherwise only the campaigns that are not archived.","example":"true"},"required":false,"name":"archivedOnly","in":"query"},{"schema":{"type":"string","minLength":1,"description":"Only the campaigns in this folder (an id of `GET /folders`), or `none` for the campaigns that are in no folder. Left out: the campaigns of every folder and of none.","example":"V1StGXR8_Z5jdHi6B-myT"},"required":false,"name":"folder","in":"query"}],"responses":{"200":{"description":"A page of campaigns. (Without `limit`, `offset` or `cursor`: every campaign, as a bare array of `CampaignSummary`.)","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CampaignList"},{"type":"array","items":{"$ref":"#/components/schemas/CampaignSummary"},"description":"Every campaign, newest first: the answer to a request without `limit`, `offset` or `cursor`.","deprecated":true}]}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"description":"`folder_not_found`: your account has no folder with the id sent as `folder`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Create a campaign.","description":"Creates a campaign from one request.\n\n- With only `name` (and settings) it is an empty campaign, as before.\n- With `pages` and no `pitchVideo` it is a `draft`: the pages are stored and nothing is processed.\n- With `pitchVideo` and `pages` the campaign is set up in the background. The answer is `202` with `status: \"processing\"`; poll `GET /campaigns/{campaignId}`, or subscribe to the `CAMPAIGN_READY` and `CAMPAIGN_FAILED` webhooks.\n- With `fromCampaignId` it starts from a copy of one of your campaigns. Without `pitchVideo` the copy keeps the pitch video; with `pitchVideo` it gets the new one and keeps the pages with their timing (the last page runs to the end of the new video). This is how a pitch video is changed: it cannot be changed on an existing campaign.\n\nMedia is referred to by the id `POST /media` returned, and may still be uploading or processing when the campaign is created.\n\nEverything is checked before anything is created. Limits are per organisation and shared with the dashboard: campaigns created per rolling 24 hours, and campaigns being set up at once (`429` with `Retry-After`).\n\nThe outro is `outro: { mediaId, enabled }`. A body that sends `outroVideo` is refused (`422`), not ignored.\n\nA body that does not parse is refused with `400 invalid_request` when it names only settings (as this endpoint always answered it), and with `422 validation_failed` when it describes content (`pages`, `pitchVideo`, `outro`, `fromCampaignId`). Every refusal uses the public API error shape.\n","tags":["Campaigns"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignCreate"}}}},"responses":{"201":{"description":"The campaign was created and nothing is left to process.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"202":{"description":"The campaign was created and is being set up or processed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"400":{"description":"A request that names only settings is not valid: its body does not parse (`invalid_request`), or `titleTemplate` cannot be read (`invalid_request`). Or the `Idempotency-Key` cannot be used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"The folder or campaign was not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/LimitReached"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/campaigns/{campaignId}":{"get":{"summary":"Get a campaign.","description":"One answer with two layers.\n\n**The Campaign object**: the fields `POST /campaigns` and `PATCH /campaigns/{campaignId}` answer with: `status` (`draft`, `processing`, `ready`, `failed`, `archived`), the `problems` behind a `failed` one, `revision`, `durationSeconds`, `pitchVideo`, `pages`, `outro`, `testVideoApproval`, `folderId`. Poll this after creating or changing a campaign until `status` is no longer `processing`. It is read from the primary database, so it is never behind a change you just made.\n\n**The fields this endpoint has always returned**, unchanged, for existing integrations: the stored documents (`outline`, `script`, `remuxing`, `outroVideo`, `cookieMap`, …), `testVideo` (the test video itself), `pitchVideoUrl`, `thumbnailUrl` and the rest. They are deprecated: new integrations should read the Campaign object's fields, since the older ones describe how a campaign is stored and are not kept stable in detail. No credential is in the answer: `outline.customProxy` comes without its `password` and `outline.scrapingBee` without its `apiKey`, and `cookieMap` names each cookie without its value.\n\nTwo pairs of names are close and mean different things: `outro` (`{ mediaId, enabled }`) and `outroVideo` (the stored outro record); `testVideoApproval` (`{ videoId, approvedAt }`) and `testVideo` (the video object). Three fields belong to both layers and are shown as they always were: `languagePreference` is absent, not `null`, when the campaign has none; `variableSchema` is absent, not `{}`, before the campaign has pages with variables; `createdAt` likewise.","tags":["Campaigns"],"parameters":[{"schema":{"type":"string","description":"The campaign's id.","example":"o6duFik0_UNSUGPCn1LTm"},"required":true,"name":"campaignId","in":"path"}],"responses":{"200":{"description":"The campaign: the Campaign object, and the older fields beside it.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Campaign"},{"type":"object","properties":{"hasOutline":{"type":"boolean","description":"Whether the campaign has been set up.","deprecated":true},"duration":{"type":["number","null"],"description":"The pitch video's length in milliseconds. Use `durationSeconds`.","deprecated":true},"outline":{"type":["object","null"],"properties":{},"description":"As stored; not kept stable in detail. Use `pages` and `pitchVideo`. No credential is in it: `customProxy` comes without its `password`, `scrapingBee` without its `apiKey`.","deprecated":true},"script":{"type":["object","null"],"properties":{},"description":"As stored; not kept stable in detail. Use `pages`.","deprecated":true},"outroVideo":{"type":["object","null"],"properties":{},"description":"The stored outro record. Use `outro`.","deprecated":true},"remuxing":{"type":["object","null"],"properties":{},"description":"As stored; not kept stable in detail. Use `status` and `problems`.","deprecated":true},"testVideo":{"type":["object","null"],"properties":{},"description":"The test video itself, as `GET /campaigns/{campaignId}/videos` lists videos. Use `testVideoApproval`.","deprecated":true},"testVideoStatus":{"type":["object","null"],"properties":{},"description":"As stored; not kept stable in detail. Use `testVideoApproval`.","deprecated":true},"testVideoId":{"type":["string","null"],"description":"Use `testVideoApproval.videoId`.","deprecated":true},"setup":{"type":["object","null"],"properties":{},"description":"Present while a setup is waiting on media or has failed. Use `status` and `problems`.","deprecated":true},"pitchVideoUrl":{"type":["string","null"],"description":"A signed link to download the pitch video, valid for a short time.","deprecated":true},"thumbnailUrl":{"type":"string","description":"Where the campaign's thumbnail is, under the API's host.","deprecated":true},"cookieMap":{"type":"object","properties":{},"description":"The cookie domains of the campaign, each naming its cookies without their values.","deprecated":true},"enabledIntegrations":{"type":"array","items":{"type":"string"},"description":"The integrations switched on.","deprecated":true},"archived":{"type":["boolean","null"],"description":"Use `status`.","deprecated":true},"domain":{"type":["string","null"],"description":"As stored; not kept stable in detail.","deprecated":true},"customPath":{"type":["string","null"],"description":"As stored; not kept stable in detail.","deprecated":true},"landingPageCustomHTML":{"type":["string","null"],"description":"As stored; not kept stable in detail.","deprecated":true},"landingPageHeadCustomHTML":{"type":["string","null"],"description":"As stored; not kept stable in detail.","deprecated":true},"landingPageSettings":{"type":["object","null"],"properties":{},"description":"As stored; not kept stable in detail.","deprecated":true},"cta":{"type":["object","null"],"properties":{},"description":"As stored; not kept stable in detail.","deprecated":true},"creator":{"type":["object","null"],"properties":{},"description":"As stored; not kept stable in detail.","deprecated":true},"calendarEmbed":{"type":["object","null"],"properties":{},"description":"As stored; not kept stable in detail.","deprecated":true},"integration":{"type":["string","null"],"description":"As stored; not kept stable in detail.","deprecated":true},"exitIntentPopup":{"type":["object","null"],"properties":{},"description":"As stored; not kept stable in detail.","deprecated":true},"imports":{"type":["object","null"],"properties":{},"description":"As stored; not kept stable in detail. Use `GET /campaigns/{campaignId}/schemas`.","deprecated":true},"leadSchema":{"type":["object","null"],"properties":{},"description":"As stored; not kept stable in detail.","deprecated":true},"variableToLeadMapping":{"type":["object","null"],"properties":{},"description":"As stored; not kept stable in detail.","deprecated":true},"staticPageRecordingError":{"type":["object","null"],"properties":{},"description":"As stored; not kept stable in detail. Use `problems`.","deprecated":true},"staticPageResults":{"type":["object","null"],"properties":{},"description":"As stored; not kept stable in detail.","deprecated":true},"staticBackgroundRecordedAt":{"type":["string","null"],"format":"date-time","description":"As stored; not kept stable in detail.","deprecated":true},"startedRecordingStaticPagesAt":{"type":["string","null"],"format":"date-time","description":"As stored; not kept stable in detail.","deprecated":true},"firstExportedAt":{"type":["string","null"],"format":"date-time","description":"As stored; not kept stable in detail.","deprecated":true}},"required":["hasOutline","thumbnailUrl","cookieMap","enabledIntegrations"]}],"description":"A campaign as this API describes it. `status` and `problems` are derived when the campaign is read."}}}},"404":{"description":"Campaign not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Change a campaign.","description":"Any subset of the fields a campaign is created with. Objects merge, `null` clears an optional field, and `pages` replaces the whole list.\n\n- **Settings** (`name`, `titleTemplate`, `folderId`, `languagePreference`) apply at once.\n- **Folder**: `folderId` with the id of one of your folders (`GET /folders`) puts the campaign in it, taking it out of the folder it was in; `folderId: null` takes it out of its folder. A campaign is in at most one folder.\n- **Pages**: send every page the campaign should have. A page sent with the `id` of an existing page keeps what is stored about it (a recorded scroll, an uploaded background); a page without an `id` is new. On a campaign that has its pitch video the campaign is processed again and the answer is `202`.\n- **Outro**: `outro.mediaId` attaches a new outro, `outro.enabled` switches the one in place, and `outro: null` removes it. (`outroVideo` is not a field of this request and is refused.)\n- **Pitch video**: can be attached to a campaign that has none, with the pages' `durationSeconds` in the same request. It cannot be changed once set: create a new campaign with `fromCampaignId` instead.\n\nA change sent again is applied again. With an `Idempotency-Key`, a repeat of a request that **succeeded** (`200` or `202`) gets that first answer and changes nothing. The key covers `If-Match` too: a repeat with another `If-Match` is another request (`422 idempotency_key_reused`). Only successful answers are kept for a key, so after an error a repeat runs again.\n\n**Retrying after a `503`**, by its `error.code`:\n- `idempotency_unavailable`: nothing was applied. Retry the same request after `Retry-After`.\n- `setup_unavailable`: the change may already be saved (with a new `revision`) without being processed. Don't resend blindly: `GET` the campaign, compare its pages and `revision` with what you sent, then send what is still needed with the new `revision` as `If-Match`. A repeat with the old `If-Match` answers `409`; one without `If-Match` saves and processes the pages again, and new pages get new ids.\n\nSend the `revision` of the campaign you read as `If-Match` to have the change refused (`409`) when the campaign's pages have changed since. With `validateOnly: true` nothing is applied: the answer is `200` with `changes` (the settings the request sets, the variables added and removed, and what would be processed again) and `problems`.\n\nA change does not reset the approval of the test video. An archived campaign cannot be changed (`403`), except for the folder it is in: a request that sends only `folderId` moves an archived campaign too.\n","tags":["Campaigns"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"schema":{"type":"string","description":"The unique identifier of the campaign."},"required":true,"name":"campaignId","in":"path"},{"schema":{"type":"string","description":"The `revision` of the campaign the change is based on."},"required":false,"name":"if-match","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignPatch"}}}},"responses":{"200":{"description":"The change was applied and nothing is left to process. With `validateOnly`, what the change would do.","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/Campaign"},{"$ref":"#/components/schemas/CampaignValidation"}]}}}},"202":{"description":"The change was stored and the campaign is being processed again.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Campaign"}}}},"400":{"$ref":"#/components/responses/InvalidIdempotencyKey"},"403":{"description":"The campaign is archived.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/ValidationError"},"429":{"$ref":"#/components/responses/LimitReached"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/campaigns/{campaignId}/schemas":{"get":{"summary":"Get the variables and lead fields a campaign's videos take.","description":"The variable schema and the lead schema mapping of the campaign, each with an example: what `POST /campaigns/{campaignId}/videos` and the imports take.","tags":["Campaigns"],"parameters":[{"schema":{"type":"string","description":"The campaign's id.","example":"o6duFik0_UNSUGPCn1LTm"},"required":true,"name":"campaignId","in":"path"}],"responses":{"200":{"description":"Both schemas, each with an example payload.","content":{"application/json":{"schema":{"type":"object","properties":{"variableSchema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/VariableConfig"},"description":"The variables a video of this campaign takes, keyed by variable name."},"exampleVariableSchemaPayload":{"type":"object","additionalProperties":{},"description":"An example payload that adheres to the variable schema."},"leadSchemaMapping":{"type":"object","additionalProperties":{"type":["string","null"]},"description":"The schema for the leads associated with the campaign. The keys of this should be what goes in your API request body."},"exampleLeadSchemaMappingPayload":{"type":"object","additionalProperties":{},"description":"An example payload that adheres to the lead schema."}},"required":["variableSchema","exampleVariableSchemaPayload","leadSchemaMapping","exampleLeadSchemaMappingPayload"]}}}},"404":{"description":"Campaign not found, or it has no variable schema or lead schema mapping yet: set them up on the campaign's API Import page.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/campaigns/{campaignId}/schema":{"get":{"summary":"Get the variable schema of a campaign.","description":"**Deprecated** since 2026-11-18. Use `GET /campaigns/{campaignId}/schemas` instead.","tags":["Campaigns"],"deprecated":true,"parameters":[{"schema":{"type":"string","description":"The campaign's id.","example":"o6duFik0_UNSUGPCn1LTm"},"required":true,"name":"campaignId","in":"path"}],"responses":{"200":{"description":"The variable schema, with an example payload.","content":{"application/json":{"schema":{"type":"object","properties":{"variableSchema":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/VariableConfig"},"description":"The variables a video of this campaign takes, keyed by variable name. A campaign without a lead schema also lists `first_name`, `company_name` and `email`."},"examplePayload":{"type":"object","additionalProperties":{},"description":"An example payload that adheres to the variable schema."}},"required":["variableSchema","examplePayload"]}}}},"404":{"description":"Campaign not found, or it has no variable schema.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/campaigns/{campaignId}/lead-schema-mapping":{"get":{"summary":"Get the lead schema mapping of a campaign.","description":"**Deprecated** since 2026-11-18. Use `GET /campaigns/{campaignId}/schemas` instead.","tags":["Campaigns"],"deprecated":true,"parameters":[{"schema":{"type":"string","description":"The campaign's id.","example":"o6duFik0_UNSUGPCn1LTm"},"required":true,"name":"campaignId","in":"path"}],"responses":{"200":{"description":"The lead schema mapping, with an example payload.","content":{"application/json":{"schema":{"type":"object","properties":{"leadSchemaMapping":{"type":"object","additionalProperties":{"type":["string","null"]},"description":"The mapping for the campaign's lead schema. The keys of this should be what goes in your API request body."},"examplePayload":{"type":"object","additionalProperties":{},"description":"An example estimated API request body payload."}},"required":["leadSchemaMapping","examplePayload"]}}}},"404":{"description":"Campaign not found, or it has no API lead schema mapping.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/campaigns/{campaignId}/approve-test-video":{"post":{"summary":"Approve a campaign's test video.","description":"Approves the campaign's lead test video, which is what lets its other videos render. It is the same approval the dashboard's \"Approve\" button gives.\n\nThe test video is the first video created for the campaign with a lead's data (`POST /campaigns/{campaignId}/videos`); the campaign's `testVideoApproval.videoId` names it. Look at the rendered video before approving it. Videos of the same import that failed on an internal error are released to be retried.\n\nSend `testVideoId` with the id of the video you looked at to approve that video and no other: if the campaign's test video has been replaced since, the answer is `409 test_video_changed` and nothing is approved. Without it, whatever is the test video at that moment is approved.\n\nRefused with `400` when there is no lead test video to approve (`test_video_missing`), or it is already approved (`test_video_already_approved`).\n","tags":["Campaigns"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"schema":{"type":"string","description":"The unique identifier of the campaign."},"required":true,"name":"campaignId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"testVideoId":{"type":"string","minLength":1,"description":"The id of the test video that was reviewed (the campaign's `testVideoApproval.videoId`). When sent, approval is refused with `409` unless it is still the campaign's test video."}}}}}},"responses":{"200":{"description":"The test video was approved.","content":{"application/json":{"schema":{"type":"object","properties":{"message":{"type":"string","example":"Test video has been approved!"}},"required":["message"]}}}},"400":{"$ref":"#/components/responses/Error"},"403":{"description":"The campaign is archived.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Campaign not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/campaigns/{campaignId}/cookies/{cookieDomain}":{"put":{"summary":"Store the cookies for one domain.","description":"Replaces the cookies the campaign's pages on `cookieDomain` are recorded with, for pages that are only shown to a signed-in visitor. Send them as `cookieString` (as a `Cookie` header has them) or as `cookiesJson`; with neither, the domain has no cookies. Only the names of the cookies are given back. A `cookieDomain` or a body that is not valid is refused with `400 invalid_request`.","tags":["Campaigns"],"parameters":[{"schema":{"type":"string","description":"The unique identifier of the campaign."},"required":true,"name":"campaignId","in":"path"},{"schema":{"type":"string","description":"The host name of the pages the cookies are for, exactly as their URLs have it: in lower case, in punycode for an international name, and with the trailing dot when the URL has one. The cookies are sent when a page whose URL has this host name is recorded.","example":"www.linkedin.com"},"required":true,"name":"cookieDomain","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"cookieString":{"type":"string","example":"session=abc123; theme=dark"},"cookiesJson":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"value":{"type":"string"}},"required":["name","value"]},"description":"Used when `cookieString` is not sent."}}}}}},"responses":{"200":{"description":"The cookies were stored.","content":{"application/json":{"schema":{"type":"object","properties":{"cookies":{"type":"array","items":{"type":"string"},"description":"The names of the cookies."},"updatedAt":{"type":"string","format":"date-time"}},"required":["cookies","updatedAt"]}}}},"400":{"$ref":"#/components/responses/Error"},"403":{"description":"The campaign is archived.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Campaign not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`conflict`: recording settings changed concurrently; retry the cookie edit. `recording_cutover_required`: migrate the inline credential first.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"delete":{"summary":"Delete the cookies for one domain.","description":"The campaign's pages on `cookieDomain` are recorded without cookies again. Cookies stored under exactly `cookieDomain` are deleted, even under a domain `PUT` no longer takes. A `cookieDomain` the campaign has no cookies under, and that `PUT` would refuse, is refused with `400 invalid_request`.","tags":["Campaigns"],"parameters":[{"schema":{"type":"string","description":"The unique identifier of the campaign."},"required":true,"name":"campaignId","in":"path"},{"schema":{"type":"string","description":"The domain the cookies are stored under, as it was sent to `PUT`: any domain the campaign has cookies under, or a host name `PUT` takes.","example":"www.linkedin.com"},"required":true,"name":"cookieDomain","in":"path"}],"responses":{"204":{"description":"Deleted, or there were none."},"400":{"$ref":"#/components/responses/Error"},"403":{"description":"The campaign is archived.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Campaign not found.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`conflict`: recording settings changed concurrently; retry the cookie edit.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/folders":{"get":{"summary":"List your folders.","description":"By name. One page at a time: send a page's `nextCursor` as `cursor` to read the next. To list the campaigns of a folder, use `GET /campaigns` with `folder`.","tags":["Folders"],"parameters":[{"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"Items per page."},"required":false,"name":"limit","in":"query"},{"schema":{"type":"string","description":"`nextCursor` of the previous page, to read the next one. Send the same filters as that request."},"required":false,"name":"cursor","in":"query"}],"responses":{"200":{"description":"A page of folders.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderList"}}}},"422":{"$ref":"#/components/responses/ValidationError"}}},"post":{"summary":"Create a folder.","description":"Creates an empty folder. Put campaigns in it with `folderId` of `PATCH /campaigns/{campaignId}`, or create them in it with `folderId` of `POST /campaigns`. An account has at most 10000 folders.","tags":["Folders"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The folder's name, 1 to 100 characters. White space around it is dropped. No two of your folders have the same name.","example":"Q1 outbound"}},"required":["name"]}}}},"responses":{"201":{"description":"The folder was created.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"400":{"$ref":"#/components/responses/InvalidIdempotencyKey"},"409":{"description":"`folder_name_taken`: you already have a folder with this name. `folder_limit_reached`: the account already has 10000 folders.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/ValidationError"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/folders/{folderId}":{"get":{"summary":"Get a folder.","tags":["Folders"],"parameters":[{"schema":{"type":"string","description":"The folder's id.","example":"V1StGXR8_Z5jdHi6B-myT"},"required":true,"name":"folderId","in":"path"}],"responses":{"200":{"description":"The folder.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"404":{"description":"`folder_not_found`: your account has no folder with this id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}},"patch":{"summary":"Rename a folder.","description":"The folder keeps its id and its campaigns.","tags":["Folders"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"schema":{"type":"string","description":"The folder's id.","example":"V1StGXR8_Z5jdHi6B-myT"},"required":true,"name":"folderId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":100,"description":"The folder's name, 1 to 100 characters. White space around it is dropped. No two of your folders have the same name.","example":"Q1 outbound"}},"required":["name"]}}}},"responses":{"200":{"description":"The folder, renamed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Folder"}}}},"400":{"$ref":"#/components/responses/InvalidIdempotencyKey"},"404":{"description":"`folder_not_found`: your account has no folder with this id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"409":{"description":"`folder_name_taken`: you already have a folder with this name.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/ValidationError"},"503":{"$ref":"#/components/responses/Unavailable"}}},"delete":{"summary":"Delete a folder.","description":"Deletes the folder and nothing else: the campaigns in it are kept and are in no folder afterwards (`folderId: null`). Deleting it a second time answers `404 folder_not_found`.","tags":["Folders"],"parameters":[{"schema":{"type":"string","description":"The folder's id.","example":"V1StGXR8_Z5jdHi6B-myT"},"required":true,"name":"folderId","in":"path"}],"responses":{"204":{"description":"Deleted."},"404":{"description":"`folder_not_found`: your account has no folder with this id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/videos/{videoId}":{"get":{"summary":"Get a video.","description":"One video by its id, whichever campaign it is in: the object `GET /campaigns/{campaignId}/videos` lists, with the same view counts. Its campaign is `campaignId`. For a video that was deleted, or whose campaign was, the answer is `404`, as for an id that is not one of your videos.","tags":["Videos"],"parameters":[{"schema":{"type":"string","description":"The video's id (`id`, not `shortId`).","example":"DHFG2C09n_3qrsSymZjjm"},"required":true,"name":"videoId","in":"path"}],"responses":{"200":{"description":"The video.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoWithViews"}}}},"404":{"description":"Video not found (`video_not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/campaigns/{campaignId}/videos":{"get":{"summary":"List a campaign's videos.","description":"Oldest first, unless `sort` says otherwise. Two forms:\n\n- **By position**, without `cursor`: `{ count, renderedCount, videos, nextCursor }`. `limit` videos (1,000 when left out) from `offset`, with the totals of the filtered list. Every filter and sort.\n- **By cursor**: send the `nextCursor` of the previous page as `cursor`, with the same `filters` and `sort`: `{ videos, nextCursor }`, 20 videos a page (`limit`, at most 100), without the totals, so each page is quick however large the campaign. `nextCursor` is `null` on the last page.\n\nTo read every video, ask for a first page by position (`?limit=100`) and follow `nextCursor` (`?limit=100&cursor=…`) until it is `null`.\n\nCursor pages are sorted by `createdAt` or `renderedAt`, lowest (oldest) or highest (newest) first (`sort[sortDescending]`). Sorting by `loadCount`, `conversionCount` or `startedCount`, `search`, and the filters `viewed`, `converted`, `hotLeads` and `startedCount` are answered by position only: with `cursor` they answer `422` `cursor_not_supported`, and a page by position that has them has no `nextCursor`. The cursor is checked before them: one that is not valid, `cursor=` included, answers `422` `invalid_cursor` whatever the request asks besides, as does a cursor sent to a cursor-paged list with other `filters` or `sort` than the request that gave it. Only `offset` with `cursor` is refused before it, as `invalid_cursor` too.\n\nSorted by `createdAt` or `renderedAt`, videos with the same value are in the order of their ids, in the direction of the sort: an import's videos share one `createdAt`. A video not rendered yet has no `renderedAt`; sorted by it, those videos come first when lowest first and last when highest first, by position and by cursor alike.","tags":["Videos"],"parameters":[{"schema":{"type":"string","description":"The campaign's id.","example":"o6duFik0_UNSUGPCn1LTm"},"required":true,"name":"campaignId","in":"path"},{"schema":{"type":"integer","description":"How many videos. By position: 1,000 when left out. `0` is all of them, except on a list that counts views or searches: with `search`, sorted by `loadCount`, `conversionCount` or `startedCount`, or filtered by `viewed`, `converted`, `startedCount` or `hotLeads=true`, `0` fails with `500`, so send a number. With `cursor`: 1 to 100, 20 when left out.","minimum":0},"required":false,"name":"limit","in":"query"},{"schema":{"type":"integer","description":"By position: how many videos to skip. Not with `cursor`.","minimum":0},"required":false,"name":"offset","in":"query"},{"schema":{"type":"string","description":"`nextCursor` of the previous page, to read the next one. Send the same `filters` and `sort` as that request, and no `offset`."},"required":false,"name":"cursor","in":"query"},{"schema":{"type":"object","properties":{"id":{"type":"string","description":"The video with this id."},"originalUid":{"type":"string","description":"The video with this `originalUid`."},"variables":{"type":"object","additionalProperties":{"type":"string"},"description":"Videos with this value under a variable, or anywhere in their lead (`originalRow`, `overrideRow`): `filters[variables][first_name]=Ada`."},"importId":{"type":"string","description":"The videos of one import."},"status":{"type":"string","enum":["","RENDERED","NOT_RENDERED","ERRORED","ISSUE","INVALID_LEAD"],"description":"`RENDERED` (`renderedAt` is a date, no reported issue), `NOT_RENDERED` (no `renderedAt`, or `null`), `ERRORED` (has a `processingError`), `ISSUE` (has an `issueReport`), `INVALID_LEAD`."},"statuses":{"type":"array","items":{"type":"string","enum":["RENDERED","NOT_RENDERED","ERRORED","ISSUE"]},"description":"Any of `RENDERED`, `NOT_RENDERED`, `ERRORED`, `ISSUE`, each video counted under one: an issue first, then an error, then rendered or not. `filters[statuses][]=RENDERED&filters[statuses][]=ERRORED`."},"viewed":{"type":"boolean","description":"`true`: viewed by a lead. `false`: never viewed."},"converted":{"type":"boolean","description":"`true`: a lead clicked through or booked. `false`: none did."},"hotLeads":{"type":"boolean","description":"`true`: converted, watched to the end, or viewed twice or more."},"integrationErrors":{"type":"boolean","description":"`true`: could not be sent to an integration."},"startedCount":{"type":"boolean","description":"`true`: a lead started the video since 2026-11-12. `false`: never started."}},"description":"Which videos: `filters[status]=RENDERED&filters[variables][first_name]=Ada`. `viewed`, `converted`, `hotLeads` and `startedCount` count every video's views, so they are slower, and only lists by position take them."},"required":false,"style":"deepObject","explode":true,"name":"filters","in":"query"},{"schema":{"type":"object","properties":{"sortBy":{"type":"string","enum":["createdAt","renderedAt","loadCount","conversionCount","startedCount"],"description":"`createdAt` (the default), `renderedAt`, or a count of the video's views, starts or conversions: `loadCount`, `startedCount`, `conversionCount`."},"sortDescending":{"type":"boolean","description":"`true`: highest (newest) first. `false` or left out: lowest first."}},"description":"`sort[sortBy]=createdAt&sort[sortDescending]=true`."},"required":false,"style":"deepObject","explode":true,"name":"sort","in":"query"},{"schema":{"type":["string","null"],"description":"Text to find, in any case, in the title, the ids, and the values of the variables and the lead. Only lists by position take it."},"required":false,"name":"search","in":"query"}],"responses":{"200":{"description":"Videos by position (`CampaignVideoList`), or a page after a cursor (`CampaignVideoPage`).","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/CampaignVideoList"},{"$ref":"#/components/schemas/CampaignVideoPage"}]}}}},"400":{"$ref":"#/components/responses/Error"},"404":{"description":"Campaign not found (`campaign_not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"$ref":"#/components/responses/Error"}}},"post":{"summary":"Create (or update) a video of a campaign.","tags":["Videos"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"schema":{"type":"string","description":"The campaign's id.","example":"o6duFik0_UNSUGPCn1LTm"},"required":true,"name":"campaignId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"upsert":{"type":"boolean","default":false,"description":"Update the video that has the same `variables.originalUid`, or the same value in the campaign's duplicate field, instead of refusing the duplicate."},"queueForRender":{"type":"boolean","default":true,"description":"Queue the video to render (the default). With `false` it is created and rendered only when \"Render all videos\" is pressed in the dashboard."},"title":{"type":"string","description":"The video's title. Without it the campaign's `titleTemplate` makes one."},"importId":{"type":"string","description":"Ignored on the API: its videos are all in the campaign's API import."},"variables":{"type":"object","additionalProperties":{},"description":"The lead: the campaign's variables (`GET /campaigns/{campaignId}/schemas`), or your own fields as mapped on the campaign's API import page. Four keys are read specially: `originalUid` (your identifier of the lead, which makes a second video with it a duplicate), `originalRowIndex`, and `originalData` or `originalRow` (the lead as you have it, stored instead of the other keys)."},"queue":{"type":["string","null"],"enum":["STANDARD","TESTVIDEOS"],"description":"Ignored on the API: its videos render in the standard queue."},"duplicateIdentifierField":{"type":["string","null"],"description":"Lets `upsert` be used without `originalUid`."}},"required":["variables"]}}}},"responses":{"200":{"description":"The video was created, or updated with `upsert`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Video"},{"type":"object","properties":{"renderQueue":{"$ref":"#/components/schemas/RenderQueue"}},"required":["renderQueue"]}],"description":"A video of a campaign. Dates are ISO 8601. Older videos carry fields not listed here; they are not kept stable."}}}},"400":{"description":"The request is not valid (`invalid_request`), or the video was refused. `error.problems` says why, for example a missing variable or a duplicate (`error.isDuplicate`). An `Idempotency-Key` that cannot be used answers `invalid_idempotency_key`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"campaign_changed"},"message":{"type":"string"},"path":{"type":"string","description":"The request field the error is about."},"problems":{"type":"array","items":{"$ref":"#/components/schemas/Problem"}},"limit":{"type":"integer","description":"On a `429`, the limit that was reached."},"windowSeconds":{"type":"integer"},"retryAfterSeconds":{"type":"integer"},"isDuplicate":{"type":"boolean"}},"required":["code","message"]}}}]}}}},"403":{"description":"The campaign is archived (`campaign_archived`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Campaign not found (`campaign_not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/campaigns/{campaignId}/videos/import/v2":{"post":{"summary":"Import videos into a campaign.","description":"Make a video of each row of `videos`: up to thousands at once, each row your own fields.\n\nWhich of your fields fill which of the campaign's variables, and which are required, is set up on the campaign's \"Import via API\" page in the dashboard (Import, then API). Until that is done the import answers `400`. (An API to set it up will come with the leads design.)\n\nRows that fail are skipped and listed in `variableIssues`; the others are imported.\n\nWhat `renderTestVideo` and `queueAllVideosForRender` do:\n\n| `renderTestVideo` | `queueAllVideosForRender` | queued | the campaign's test video |\n|---|---|---|---|\n| `true` | `false` or left out | one of the imported videos, as the test video | replaced by that video, and its approval cleared |\n| `false` or left out | `true` | every imported video | left as it is |\n| `true` | `true` | refused: `400`, nothing imported | left as it is |\n| `false` or left out | `false` or left out | nothing | left as it is |\n\n- `renderTestVideo` replaces the campaign's test video even when it is approved, and clears the approval. Until a test video is approved again, the campaign's other videos are refused rendering, on plans that need an approved test video.\n- The API makes at most 10 test videos per organisation in any 24 hours, those of `POST /campaigns/{campaignId}/videos` included. Past that, `renderTestVideo` leaves the test video as it is, queues nothing, and `testVideoQueueError` says so.\n- The videos `queueAllVideosForRender` queues go through the usual render checks: on plans that need one, the campaign's test video must be approved, and credits must cover them. A video the checks refuse is not queued, and the response does not say so.\n- When no row is imported (every row a duplicate or refused), nothing is queued and the test video is left as it is.","tags":["Videos"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"schema":{"type":"string","description":"The campaign's id.","example":"o6duFik0_UNSUGPCn1LTm"},"required":true,"name":"campaignId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"videos":{"type":"array","items":{"$ref":"#/components/schemas/VideoImportRow"},"description":"The leads to make videos of."},"titleTemplate":{"type":["string","null"],"description":"A template for the videos' titles, for example `\"Video for {{first_name}}\"`. It becomes the campaign's `titleTemplate`. Without it the campaign's own is used."},"importId":{"type":["string","null"],"description":"Ignored on the API, where an import's videos are all in the campaign's API import."},"renderTestVideo":{"type":"boolean","description":"`true`: make one of the imported videos the campaign's test video and queue it to render. It replaces the campaign's test video, even an approved one, and clears that approval. `testVideoQueued` and `testVideoQueueError` say what happened. It can't be sent with `queueAllVideosForRender: true` (`400`). `false` or left out: the test video is left as it is."},"queueAllVideosForRender":{"type":"boolean","description":"`true`: queue every video this request imports to render, through the usual render checks. The campaign's test video is left as it is. It can't be sent with `renderTestVideo: true` (`400`). `false` or left out: only `renderTestVideo` queues a video."},"duplicateIdentifierField":{"type":["string","null"],"description":"The lead field that makes a row a duplicate of an existing video, for example `email`. The campaign's own when left out."}},"required":["videos"]}}}},"responses":{"200":{"description":"The import was done.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoImportResult"}}}},"400":{"description":"The request is not valid (`invalid_request`), or the campaign is not set up for it: `error.message` says why, for example that its fields are not mapped on the \"Import via API\" page yet, or that `titleTemplate` is not a valid template. An `Idempotency-Key` that cannot be used answers `invalid_idempotency_key`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"The campaign is archived (`campaign_archived`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Campaign not found (`campaign_not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/campaigns/{campaignId}/videos/import":{"post":{"summary":"Import videos into a campaign, by variable name.","description":"**Deprecated** since 2026-11-18. Use `POST /campaigns/{campaignId}/videos/import/v2` instead.\n\nEach row holds the campaign's variables by name. `/import/v2` takes your own fields, as mapped on the campaign's API import page, and reports duplicates by any lead field.\n\nWhat `renderTestVideo` and `queueAllVideosForRender` do:\n\n| `renderTestVideo` | `queueAllVideosForRender` | queued | the campaign's test video |\n|---|---|---|---|\n| `true` | `false` or left out | one of the imported videos, as the test video | replaced by that video, and its approval cleared |\n| `false` or left out | `true` | every imported video | left as it is |\n| `true` | `true` | refused: `400`, nothing imported | left as it is |\n| `false` or left out | `false` or left out | nothing | left as it is |\n\n- `renderTestVideo` replaces the campaign's test video even when it is approved, and clears the approval. Until a test video is approved again, the campaign's other videos are refused rendering, on plans that need an approved test video.\n- The API makes at most 10 test videos per organisation in any 24 hours, those of `POST /campaigns/{campaignId}/videos` included. Past that, `renderTestVideo` leaves the test video as it is, queues nothing, and `testVideoQueueError` says so.\n- The videos `queueAllVideosForRender` queues go through the usual render checks: on plans that need one, the campaign's test video must be approved, and credits must cover them. A video the checks refuse is not queued, and the response does not say so.\n- When no row is imported (every row a duplicate or refused), nothing is queued and the test video is left as it is.","tags":["Videos"],"deprecated":true,"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"schema":{"type":"string","description":"The campaign's id.","example":"o6duFik0_UNSUGPCn1LTm"},"required":true,"name":"campaignId","in":"path"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"videos":{"type":"array","items":{"$ref":"#/components/schemas/VideoImportRow"},"description":"The leads: each row the campaign's variables by name (`first_name`, `website_0`), and optionally `originalUid`, a row already imported with it being skipped as a duplicate."},"titleTemplate":{"type":["string","null"],"description":"A template for the videos' titles, for example `\"Video for {{first_name}}\"`. It becomes the campaign's `titleTemplate`. Without it the campaign's own is used."},"importId":{"type":["string","null"],"description":"The import to put the videos in. Every video of the request gets it as its `importId`, so `filters[importId]` lists them, and `renderTestVideo` picks the test video from them. Send the same `importId` again to add videos to that import. Left out, each request is an import of its own, under a generated id that only the videos carry. A `.` or `$` in it is stored as `．` or `＄`, and `filters[importId]` then does not find the videos."},"renderTestVideo":{"type":"boolean","description":"`true`: make one of the imported videos the campaign's test video and queue it to render. It replaces the campaign's test video, even an approved one, and clears that approval. `testVideoQueueError` says why when it was not queued. It can't be sent with `queueAllVideosForRender: true` (`400`). `false` or left out: the test video is left as it is."},"queueAllVideosForRender":{"type":"boolean","description":"`true`: queue every video this request imports to render, through the usual render checks. The campaign's test video is left as it is. It can't be sent with `renderTestVideo: true` (`400`). `false` or left out: only `renderTestVideo` queues a video."}},"required":["videos"]}}}},"responses":{"200":{"description":"The import was done.","content":{"application/json":{"schema":{"type":"object","properties":{"inserted":{"type":"integer"},"duplicates":{"type":"integer"},"invalidRows":{"type":"integer"},"variableIssues":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/VariableIssue"},"description":"Rows that were skipped, by the variable they failed on (`_template` for a title that could not be made)."},"testVideoQueueError":{"allOf":[{"$ref":"#/components/schemas/TestVideoQueueError"},{"description":"Why the test video of `renderTestVideo` was not queued. `ApiTestVideoRenderLimitReachedError`: the organisation's test videos through the API for the last 24 hours are used up, and the campaign's test video was left as it is. Any other refusal of its render comes after the test video was replaced and its approval cleared."}]}},"required":["inserted","duplicates","invalidRows","variableIssues"]}}}},"400":{"description":"The request is not valid (`invalid_request`); or no row could be imported, and `error.variableIssues` says why. An `Idempotency-Key` that cannot be used answers `invalid_idempotency_key`.","content":{"application/json":{"schema":{"allOf":[{"$ref":"#/components/schemas/Error"},{"type":"object","properties":{"error":{"type":"object","properties":{"code":{"type":"string","example":"campaign_changed"},"message":{"type":"string"},"path":{"type":"string","description":"The request field the error is about."},"problems":{"type":"array","items":{"$ref":"#/components/schemas/Problem"}},"limit":{"type":"integer","description":"On a `429`, the limit that was reached."},"windowSeconds":{"type":"integer"},"retryAfterSeconds":{"type":"integer"},"variableIssues":{"type":"object","additionalProperties":{"$ref":"#/components/schemas/VariableIssue"},"description":"Rows that were skipped, by the variable they failed on (`_template` for a title that could not be made)."},"duplicates":{"type":"integer"}},"required":["code","message"]}}}]}}}},"403":{"description":"The campaign is archived (`campaign_archived`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Campaign not found (`campaign_not_found`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/webhooks/{webhookId}/secret":{"post":{"summary":"Generate the signing secret of a webhook subscription that has none.","description":"A subscription created before deliveries were signed has no signing secret (`signed` is `false` in `GET /webhooks`), and its deliveries carry no `webhook-signature`. This gives it one, for a subscription on the account or on a campaign: the secret is answered once, exactly as creating a subscription answers it, and every delivery made after that is signed. A subscription that already has a secret is refused with `409`: this does not replace a secret. To get a new one, create a new subscription and delete the old one. A request repeated with the same `Idempotency-Key` after the subscription was deleted may be answered `404 webhook_not_found`, without its URL or secret.","tags":["Webhook subscriptions"],"parameters":[{"$ref":"#/components/parameters/IdempotencyKey"},{"schema":{"type":"string","minLength":1,"description":"The id of the webhook subscription."},"required":true,"name":"webhookId","in":"path"}],"responses":{"201":{"description":"The subscription now has a signing secret.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignedWebhook"}}}},"400":{"$ref":"#/components/responses/InvalidIdempotencyKey"},"404":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Unavailable"}}}},"/webhooks/{webhookId}":{"delete":{"summary":"Delete a webhook subscription by its id.","description":"Deletes one subscription of your account, whether it covers every campaign or is specific to one. Events already accepted for it are not sent to it any more. Deleting it a second time answers `404 webhook_not_found`, as does an `id` that belongs to another account. To delete every subscription to a URL at once, use `DELETE /webhooks` with `webhookUrl`.","tags":["Webhook subscriptions"],"parameters":[{"schema":{"type":"string","description":"The subscription's `id`, as `POST /webhooks` and `GET /webhooks` answer it.","example":"DHFG2C09n_3qrsSymZjjm"},"required":true,"name":"webhookId","in":"path"}],"responses":{"204":{"description":"Deleted."},"404":{"description":"`webhook_not_found`: your account has no webhook subscription with this id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/campaigns/{campaignId}/webhooks/{webhookId}":{"delete":{"summary":"Delete a campaign-specific webhook subscription by its id.","description":"Deletes one subscription that is specific to this campaign. A subscription of another campaign, or one that covers every campaign, is not found here: use `DELETE /webhooks/{webhookId}` for those. Deleting it a second time answers `404 webhook_not_found`, as does an `id` that belongs to another account. An archived campaign cannot be changed (`403`).","tags":["Webhook subscriptions"],"parameters":[{"schema":{"type":"string","description":"The campaign's id.","example":"o6duFik0_UNSUGPCn1LTm"},"required":true,"name":"campaignId","in":"path"},{"schema":{"type":"string","description":"The subscription's `id`, as `POST /webhooks` and `GET /webhooks` answer it.","example":"DHFG2C09n_3qrsSymZjjm"},"required":true,"name":"webhookId","in":"path"}],"responses":{"204":{"description":"Deleted."},"403":{"description":"The campaign is archived.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"`campaign_not_found`: your account has no campaign with this `campaignId`. `webhook_not_found`: the campaign has no webhook subscription with this id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}}},"webhooks":{"VIDEO_CREATED":{"post":{"summary":"VIDEO_CREATED: A video was made from a lead.","description":"By an import, the API or an integration. The video is not rendered yet: `renderedAt` is absent and its media URLs and embeds are `null` (VIDEO_RENDERED follows). Sent once per video; a video queued to render again can send it again.","tags":["Webhook events"],"security":[],"parameters":[{"schema":{"type":"string","description":"The event's id (`eventId`), the same on every attempt.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"},"required":true,"name":"webhook-id","in":"header"},{"schema":{"type":"string","description":"When this attempt was made, in seconds since the Unix epoch.","example":"1795430400"},"required":true,"name":"webhook-timestamp","in":"header"},{"schema":{"type":"string","description":"The `id` of the subscription this delivery is for, so that a receiver with several subscriptions at one URL can tell them apart. Not sent for a subscription that has no id (some old campaign subscriptions).","example":"DHFG2C09n_3qrsSymZjjm"},"required":false,"name":"webhook-subscription-id","in":"header"},{"schema":{"type":"string","description":"The signature of this attempt, for a subscription that has a signing secret: `v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed with the secret. Every retry has a new timestamp and so a new signature. Not sent for a subscription without a secret (`signed` is `false`). How to check it is under Webhook events, Verifying a delivery.","example":"v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE="},"required":false,"name":"webhook-signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoCreatedEvent"},"example":{"video":{"id":"XEKcAejz6cWRlUOtn0SGw","shortId":"OFcf-PfxLI9q","title":"Video for John","campaignId":"5jTuhVapNA0uDohhB00xl","campaignName":"Example Campaign","createdAt":"2026-11-23T09:47:30.172Z","variables":{"first_name":"John","website_0":"https://example.com"},"originalRow":{"first_name":"John","email":"john@example.com","website":"https://example.com"},"overrideRow":{},"originalUid":"john@example.com","importId":"manual import","videoUrl":null,"videoFileUrl":null,"thumbnailUrl":null,"thumbnailStorageUrl":null,"thumbnailUrlPNG":null,"thumbnailStorageUrlPNG":null,"thumbnailEmbed":null,"thumbnailStorageEmbed":null,"thumbnailEmbedPNG":null,"thumbnailStorageEmbedPNG":null},"rawVideo":{"_id":"XEKcAejz6cWRlUOtn0SGw","shortId":"OFcf-PfxLI9q","campaignId":"5jTuhVapNA0uDohhB00xl","title":"Video for John","userId":"auth0|649c36d5e23299e4e1365980","importId":"manual import","variables":{"first_name":"John","website_0":"https://example.com"},"originalRow":{"first_name":"John","email":"john@example.com","website":"https://example.com"},"overrideRow":{},"originalUid":"john@example.com","createdAt":"2026-11-23T09:47:30.172Z"},"event":"VIDEO_CREATED","eventAt":"2026-11-23T10:00:00.000Z","eventId":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}}}},"responses":{"410":{"description":"The URL is gone for good: the subscription is removed."},"2XX":{"description":"Any `2xx`: delivered. Any other answer, or none within the timeout, is tried again."}}}},"VIDEO_UPDATED":{"post":{"summary":"VIDEO_UPDATED: A video's lead was sent again and the video updated.","description":"Sent on every update. `video` and `rawVideo` are the lead as it was sent, not the stored video: they have an `id` and a `shortId` of their own, are not rendered (`renderedAt` absent, media URLs and embeds `null`), and the body does not carry the stored video's id. The updated video is the campaign's video with the same `originalUid` when the lead has one; otherwise the one with the same value in the campaign's duplicate-identifier column, in its `originalRow` (or `overrideRow`).","tags":["Webhook events"],"security":[],"parameters":[{"schema":{"type":"string","description":"The event's id (`eventId`), the same on every attempt.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"},"required":true,"name":"webhook-id","in":"header"},{"schema":{"type":"string","description":"When this attempt was made, in seconds since the Unix epoch.","example":"1795430400"},"required":true,"name":"webhook-timestamp","in":"header"},{"schema":{"type":"string","description":"The `id` of the subscription this delivery is for, so that a receiver with several subscriptions at one URL can tell them apart. Not sent for a subscription that has no id (some old campaign subscriptions).","example":"DHFG2C09n_3qrsSymZjjm"},"required":false,"name":"webhook-subscription-id","in":"header"},{"schema":{"type":"string","description":"The signature of this attempt, for a subscription that has a signing secret: `v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed with the secret. Every retry has a new timestamp and so a new signature. Not sent for a subscription without a secret (`signed` is `false`). How to check it is under Webhook events, Verifying a delivery.","example":"v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE="},"required":false,"name":"webhook-signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoUpdatedEvent"},"example":{"video":{"id":"q9WbT2kLmZr4sYx7Hc1Pd","shortId":"Hn3Kd8sPq2Vb","title":"Video for John","campaignId":"5jTuhVapNA0uDohhB00xl","campaignName":"Example Campaign","createdAt":"2026-11-23T09:47:30.172Z","variables":{"first_name":"Johnny","website_0":"https://example.com"},"originalRow":{"first_name":"Johnny","email":"john@example.com","website":"https://example.com"},"overrideRow":{},"originalUid":"john@example.com","importId":"manual import","videoUrl":null,"videoFileUrl":null,"thumbnailUrl":null,"thumbnailStorageUrl":null,"thumbnailUrlPNG":null,"thumbnailStorageUrlPNG":null,"thumbnailEmbed":null,"thumbnailStorageEmbed":null,"thumbnailEmbedPNG":null,"thumbnailStorageEmbedPNG":null},"rawVideo":{"_id":"q9WbT2kLmZr4sYx7Hc1Pd","shortId":"Hn3Kd8sPq2Vb","campaignId":"5jTuhVapNA0uDohhB00xl","title":"Video for John","userId":"auth0|649c36d5e23299e4e1365980","importId":"manual import","variables":{"first_name":"Johnny","website_0":"https://example.com"},"originalRow":{"first_name":"Johnny","email":"john@example.com","website":"https://example.com"},"overrideRow":{},"originalUid":"john@example.com","createdAt":"2026-11-23T09:47:30.172Z"},"event":"VIDEO_UPDATED","eventAt":"2026-11-23T10:00:00.000Z","eventId":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}}}},"responses":{"410":{"description":"The URL is gone for good: the subscription is removed."},"2XX":{"description":"Any `2xx`: delivered. Any other answer, or none within the timeout, is tried again."}}}},"VIDEO_RENDERED":{"post":{"summary":"VIDEO_RENDERED: A video was rendered and can be watched.","description":"`video.videoUrl` is the page it is watched on, `video.videoFileUrl` the MP4, `video.thumbnailUrl` an animated GIF and `video.thumbnailUrlPNG` a still. Sent once per video; a video queued to render again can send it again.","tags":["Webhook events"],"security":[],"parameters":[{"schema":{"type":"string","description":"The event's id (`eventId`), the same on every attempt.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"},"required":true,"name":"webhook-id","in":"header"},{"schema":{"type":"string","description":"When this attempt was made, in seconds since the Unix epoch.","example":"1795430400"},"required":true,"name":"webhook-timestamp","in":"header"},{"schema":{"type":"string","description":"The `id` of the subscription this delivery is for, so that a receiver with several subscriptions at one URL can tell them apart. Not sent for a subscription that has no id (some old campaign subscriptions).","example":"DHFG2C09n_3qrsSymZjjm"},"required":false,"name":"webhook-subscription-id","in":"header"},{"schema":{"type":"string","description":"The signature of this attempt, for a subscription that has a signing secret: `v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed with the secret. Every retry has a new timestamp and so a new signature. Not sent for a subscription without a secret (`signed` is `false`). How to check it is under Webhook events, Verifying a delivery.","example":"v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE="},"required":false,"name":"webhook-signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoRenderedEvent"},"example":{"video":{"id":"XEKcAejz6cWRlUOtn0SGw","shortId":"OFcf-PfxLI9q","title":"Video for John","campaignId":"5jTuhVapNA0uDohhB00xl","campaignName":"Example Campaign","createdAt":"2026-11-23T09:47:30.172Z","variables":{"first_name":"John","website_0":"https://example.com"},"originalRow":{"first_name":"John","email":"john@example.com","website":"https://example.com"},"overrideRow":{},"originalUid":"john@example.com","importId":"manual import","videoUrl":"https://videos.example.com/OFcf-PfxLI9q","videoFileUrl":"https://media.example.com/outputs/XEKcAejz6cWRlUOtn0SGw.mp4","thumbnailUrl":"https://videos.example.com/thumbnail/OFcf-PfxLI9q.gif","thumbnailStorageUrl":"https://media.example.com/outputs/XEKcAejz6cWRlUOtn0SGw.gif","thumbnailUrlPNG":"https://videos.example.com/thumbnail/OFcf-PfxLI9q.png","thumbnailStorageUrlPNG":"https://media.example.com/outputs/XEKcAejz6cWRlUOtn0SGw.png","thumbnailEmbed":"<div><a target=\"_blank\" href=\"https://videos.example.com/OFcf-PfxLI9q\"><img style=\"margin:0px;box-sizing:border-box;padding:0px;width:100%;max-width:300px;height:auto\" src=\"https://videos.example.com/thumbnail/OFcf-PfxLI9q.gif\" alt=\"Video for John\"></a><br /></div>","thumbnailStorageEmbed":"<div><a target=\"_blank\" href=\"https://videos.example.com/OFcf-PfxLI9q\"><img style=\"margin:0px;box-sizing:border-box;padding:0px;width:100%;max-width:300px;height:auto\" src=\"https://media.example.com/outputs/XEKcAejz6cWRlUOtn0SGw.gif\" alt=\"Video for John\"></a><br /></div>","thumbnailEmbedPNG":"<div><a target=\"_blank\" href=\"https://videos.example.com/OFcf-PfxLI9q\"><img style=\"margin:0px;box-sizing:border-box;padding:0px;width:100%;max-width:300px;height:auto\" src=\"https://videos.example.com/thumbnail/OFcf-PfxLI9q.png\" alt=\"Video for John\"></a><br /></div>","thumbnailStorageEmbedPNG":"<div><a target=\"_blank\" href=\"https://videos.example.com/OFcf-PfxLI9q\"><img style=\"margin:0px;box-sizing:border-box;padding:0px;width:100%;max-width:300px;height:auto\" src=\"https://media.example.com/outputs/XEKcAejz6cWRlUOtn0SGw.png\" alt=\"Video for John\"></a><br /></div>","renderedAt":"2026-11-23T09:52:10.885Z"},"rawVideo":{"_id":"XEKcAejz6cWRlUOtn0SGw","shortId":"OFcf-PfxLI9q","campaignId":"5jTuhVapNA0uDohhB00xl","title":"Video for John","userId":"auth0|649c36d5e23299e4e1365980","importId":"manual import","variables":{"first_name":"John","website_0":"https://example.com"},"originalRow":{"first_name":"John","email":"john@example.com","website":"https://example.com"},"overrideRow":{},"originalUid":"john@example.com","createdAt":"2026-11-23T09:47:30.172Z","renderedAt":"2026-11-23T09:52:10.885Z"},"event":"VIDEO_RENDERED","eventAt":"2026-11-23T10:00:00.000Z","eventId":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}}}},"responses":{"410":{"description":"The URL is gone for good: the subscription is removed."},"2XX":{"description":"Any `2xx`: delivered. Any other answer, or none within the timeout, is tried again."}}}},"VIDEO_UNRENDERABLE":{"post":{"summary":"VIDEO_UNRENDERABLE: A video cannot be rendered.","description":"Its lead or its pages cannot be rendered; `error` says why. The video is not rendered: `renderedAt` is absent and its media URLs and embeds are `null`. Sent once per video; a video queued to render again can send it again.","tags":["Webhook events"],"security":[],"parameters":[{"schema":{"type":"string","description":"The event's id (`eventId`), the same on every attempt.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"},"required":true,"name":"webhook-id","in":"header"},{"schema":{"type":"string","description":"When this attempt was made, in seconds since the Unix epoch.","example":"1795430400"},"required":true,"name":"webhook-timestamp","in":"header"},{"schema":{"type":"string","description":"The `id` of the subscription this delivery is for, so that a receiver with several subscriptions at one URL can tell them apart. Not sent for a subscription that has no id (some old campaign subscriptions).","example":"DHFG2C09n_3qrsSymZjjm"},"required":false,"name":"webhook-subscription-id","in":"header"},{"schema":{"type":"string","description":"The signature of this attempt, for a subscription that has a signing secret: `v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed with the secret. Every retry has a new timestamp and so a new signature. Not sent for a subscription without a secret (`signed` is `false`). How to check it is under Webhook events, Verifying a delivery.","example":"v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE="},"required":false,"name":"webhook-signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoUnrenderableEvent"},"example":{"video":{"id":"XEKcAejz6cWRlUOtn0SGw","shortId":"OFcf-PfxLI9q","title":"Video for John","campaignId":"5jTuhVapNA0uDohhB00xl","campaignName":"Example Campaign","createdAt":"2026-11-23T09:47:30.172Z","variables":{"first_name":"John","website_0":"https://example.com"},"originalRow":{"first_name":"John","email":"john@example.com","website":"https://example.com"},"overrideRow":{},"originalUid":"john@example.com","importId":"manual import","videoUrl":null,"videoFileUrl":null,"thumbnailUrl":null,"thumbnailStorageUrl":null,"thumbnailUrlPNG":null,"thumbnailStorageUrlPNG":null,"thumbnailEmbed":null,"thumbnailStorageEmbed":null,"thumbnailEmbedPNG":null,"thumbnailStorageEmbedPNG":null},"rawVideo":{"_id":"XEKcAejz6cWRlUOtn0SGw","shortId":"OFcf-PfxLI9q","campaignId":"5jTuhVapNA0uDohhB00xl","title":"Video for John","userId":"auth0|649c36d5e23299e4e1365980","importId":"manual import","variables":{"first_name":"John","website_0":"https://example.com"},"originalRow":{"first_name":"John","email":"john@example.com","website":"https://example.com"},"overrideRow":{},"originalUid":"john@example.com","createdAt":"2026-11-23T09:47:30.172Z"},"error":{"type":"INVALID_LEAD","code":"website_unreachable","message":"The website https://example.com did not load.","erroredAt":"2026-11-23T09:50:00.000Z"},"event":"VIDEO_UNRENDERABLE","eventAt":"2026-11-23T10:00:00.000Z","eventId":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}}}},"responses":{"410":{"description":"The URL is gone for good: the subscription is removed."},"2XX":{"description":"Any `2xx`: delivered. Any other answer, or none within the timeout, is tried again."}}}},"CAMPAIGN_READY":{"post":{"summary":"CAMPAIGN_READY: A campaign that was set up or changed can have videos made from it.","description":"`campaign` is the Campaign object, as `POST /campaigns` answers with it.","tags":["Webhook events"],"security":[],"parameters":[{"schema":{"type":"string","description":"The event's id (`eventId`), the same on every attempt.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"},"required":true,"name":"webhook-id","in":"header"},{"schema":{"type":"string","description":"When this attempt was made, in seconds since the Unix epoch.","example":"1795430400"},"required":true,"name":"webhook-timestamp","in":"header"},{"schema":{"type":"string","description":"The `id` of the subscription this delivery is for, so that a receiver with several subscriptions at one URL can tell them apart. Not sent for a subscription that has no id (some old campaign subscriptions).","example":"DHFG2C09n_3qrsSymZjjm"},"required":false,"name":"webhook-subscription-id","in":"header"},{"schema":{"type":"string","description":"The signature of this attempt, for a subscription that has a signing secret: `v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed with the secret. Every retry has a new timestamp and so a new signature. Not sent for a subscription without a secret (`signed` is `false`). How to check it is under Webhook events, Verifying a delivery.","example":"v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE="},"required":false,"name":"webhook-signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignReadyEvent"},"example":{"campaignId":"5jTuhVapNA0uDohhB00xl","campaign":{"id":"5jTuhVapNA0uDohhB00xl","name":"Example Campaign","titleTemplate":"Video for {{first_name}}","folderId":null,"languagePreference":null,"createdAt":"2026-11-20T11:47:30.172Z","status":"ready","problems":[],"revision":"m0e1r2s3-m0e1r2s4","durationSeconds":45,"pitchVideo":{"mediaId":"med_V1StGXR8Z5jdHi6BmyT"},"pages":[{"id":"kq3Jm0Zr8Yw2","title":"Company Website","notes":"","durationSeconds":45,"type":"lead_url","template":"website","variable":"website_0","scroll":"auto"}],"outro":null,"variableSchema":{},"testVideoApproval":{"videoId":null,"approvedAt":null}},"event":"CAMPAIGN_READY","eventAt":"2026-11-23T10:00:00.000Z","eventId":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}}}},"responses":{"410":{"description":"The URL is gone for good: the subscription is removed."},"2XX":{"description":"Any `2xx`: delivered. Any other answer, or none within the timeout, is tried again."}}}},"CAMPAIGN_FAILED":{"post":{"summary":"CAMPAIGN_FAILED: A campaign's setup or processing failed.","description":"`campaign.problems` says why.","tags":["Webhook events"],"security":[],"parameters":[{"schema":{"type":"string","description":"The event's id (`eventId`), the same on every attempt.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"},"required":true,"name":"webhook-id","in":"header"},{"schema":{"type":"string","description":"When this attempt was made, in seconds since the Unix epoch.","example":"1795430400"},"required":true,"name":"webhook-timestamp","in":"header"},{"schema":{"type":"string","description":"The `id` of the subscription this delivery is for, so that a receiver with several subscriptions at one URL can tell them apart. Not sent for a subscription that has no id (some old campaign subscriptions).","example":"DHFG2C09n_3qrsSymZjjm"},"required":false,"name":"webhook-subscription-id","in":"header"},{"schema":{"type":"string","description":"The signature of this attempt, for a subscription that has a signing secret: `v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed with the secret. Every retry has a new timestamp and so a new signature. Not sent for a subscription without a secret (`signed` is `false`). How to check it is under Webhook events, Verifying a delivery.","example":"v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE="},"required":false,"name":"webhook-signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignFailedEvent"},"example":{"campaignId":"5jTuhVapNA0uDohhB00xl","campaign":{"id":"5jTuhVapNA0uDohhB00xl","name":"Example Campaign","titleTemplate":"Video for {{first_name}}","folderId":null,"languagePreference":null,"createdAt":"2026-11-20T11:47:30.172Z","status":"failed","problems":[{"code":"media_missing_audio_track","message":"A pitch_video needs an audio track.","path":"pitchVideo.mediaId"}],"revision":"m0e1r2s3-m0e1r2s4","durationSeconds":45,"pitchVideo":{"mediaId":"med_V1StGXR8Z5jdHi6BmyT"},"pages":[{"id":"kq3Jm0Zr8Yw2","title":"Company Website","notes":"","durationSeconds":45,"type":"lead_url","template":"website","variable":"website_0","scroll":"auto"}],"outro":null,"variableSchema":{},"testVideoApproval":{"videoId":null,"approvedAt":null}},"event":"CAMPAIGN_FAILED","eventAt":"2026-11-23T10:00:00.000Z","eventId":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}}}},"responses":{"410":{"description":"The URL is gone for good: the subscription is removed."},"2XX":{"description":"Any `2xx`: delivered. Any other answer, or none within the timeout, is tried again."}}}},"VIDEO_VIEWED":{"post":{"summary":"VIDEO_VIEWED: A video's page was opened.","description":"Every time. Not sent for email link scanners (security tools that open every link): a session that looks like one is held back, and sent if it then interacts.","tags":["Webhook events"],"security":[],"parameters":[{"schema":{"type":"string","description":"The event's id (`eventId`), the same on every attempt.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"},"required":true,"name":"webhook-id","in":"header"},{"schema":{"type":"string","description":"When this attempt was made, in seconds since the Unix epoch.","example":"1795430400"},"required":true,"name":"webhook-timestamp","in":"header"},{"schema":{"type":"string","description":"The `id` of the subscription this delivery is for, so that a receiver with several subscriptions at one URL can tell them apart. Not sent for a subscription that has no id (some old campaign subscriptions).","example":"DHFG2C09n_3qrsSymZjjm"},"required":false,"name":"webhook-subscription-id","in":"header"},{"schema":{"type":"string","description":"The signature of this attempt, for a subscription that has a signing secret: `v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed with the secret. Every retry has a new timestamp and so a new signature. Not sent for a subscription without a secret (`signed` is `false`). How to check it is under Webhook events, Verifying a delivery.","example":"v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE="},"required":false,"name":"webhook-signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoViewedEvent"},"example":{"video":{"_id":"XEKcAejz6cWRlUOtn0SGw","shortId":"OFcf-PfxLI9q","campaignId":"5jTuhVapNA0uDohhB00xl","title":"Video for John","userId":"auth0|649c36d5e23299e4e1365980","importId":"manual import","variables":{"first_name":"John","website_0":"https://example.com"},"originalRow":{"first_name":"John","email":"john@example.com","website":"https://example.com"},"overrideRow":{},"originalUid":"john@example.com","createdAt":"2026-11-23T09:47:30.172Z","renderedAt":"2026-11-23T09:52:10.885Z","campaignName":"Example Campaign"},"viewedAt":"2026-11-23T10:00:00.000Z","viewerUrl":"https://videos.example.com/OFcf-PfxLI9q","event":"VIDEO_VIEWED","eventAt":"2026-11-23T10:00:00.000Z","eventId":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}}}},"responses":{"410":{"description":"The URL is gone for good: the subscription is removed."},"2XX":{"description":"Any `2xx`: delivered. Any other answer, or none within the timeout, is tried again."}}}},"VIDEO_FIRST_VIEWED":{"post":{"summary":"VIDEO_FIRST_VIEWED: A video's page was opened for the first time.","description":"Sent once per video, for the first such event of a session that is not a link scanner's. Not sent for email link scanners (security tools that open every link): a session that looks like one is held back, and sent if it then interacts.","tags":["Webhook events"],"security":[],"parameters":[{"schema":{"type":"string","description":"The event's id (`eventId`), the same on every attempt.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"},"required":true,"name":"webhook-id","in":"header"},{"schema":{"type":"string","description":"When this attempt was made, in seconds since the Unix epoch.","example":"1795430400"},"required":true,"name":"webhook-timestamp","in":"header"},{"schema":{"type":"string","description":"The `id` of the subscription this delivery is for, so that a receiver with several subscriptions at one URL can tell them apart. Not sent for a subscription that has no id (some old campaign subscriptions).","example":"DHFG2C09n_3qrsSymZjjm"},"required":false,"name":"webhook-subscription-id","in":"header"},{"schema":{"type":"string","description":"The signature of this attempt, for a subscription that has a signing secret: `v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed with the secret. Every retry has a new timestamp and so a new signature. Not sent for a subscription without a secret (`signed` is `false`). How to check it is under Webhook events, Verifying a delivery.","example":"v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE="},"required":false,"name":"webhook-signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoFirstViewedEvent"},"example":{"video":{"_id":"XEKcAejz6cWRlUOtn0SGw","shortId":"OFcf-PfxLI9q","campaignId":"5jTuhVapNA0uDohhB00xl","title":"Video for John","userId":"auth0|649c36d5e23299e4e1365980","importId":"manual import","variables":{"first_name":"John","website_0":"https://example.com"},"originalRow":{"first_name":"John","email":"john@example.com","website":"https://example.com"},"overrideRow":{},"originalUid":"john@example.com","createdAt":"2026-11-23T09:47:30.172Z","renderedAt":"2026-11-23T09:52:10.885Z","campaignName":"Example Campaign"},"viewedAt":"2026-11-23T10:00:00.000Z","viewerUrl":"https://videos.example.com/OFcf-PfxLI9q","event":"VIDEO_FIRST_VIEWED","eventAt":"2026-11-23T10:00:00.000Z","eventId":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}}}},"responses":{"410":{"description":"The URL is gone for good: the subscription is removed."},"2XX":{"description":"Any `2xx`: delivered. Any other answer, or none within the timeout, is tried again."}}}},"VIDEO_STARTED":{"post":{"summary":"VIDEO_STARTED: A video started playing.","description":"Every time: on a click, or where the browser allows it, on its own when the page opens.","tags":["Webhook events"],"security":[],"parameters":[{"schema":{"type":"string","description":"The event's id (`eventId`), the same on every attempt.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"},"required":true,"name":"webhook-id","in":"header"},{"schema":{"type":"string","description":"When this attempt was made, in seconds since the Unix epoch.","example":"1795430400"},"required":true,"name":"webhook-timestamp","in":"header"},{"schema":{"type":"string","description":"The `id` of the subscription this delivery is for, so that a receiver with several subscriptions at one URL can tell them apart. Not sent for a subscription that has no id (some old campaign subscriptions).","example":"DHFG2C09n_3qrsSymZjjm"},"required":false,"name":"webhook-subscription-id","in":"header"},{"schema":{"type":"string","description":"The signature of this attempt, for a subscription that has a signing secret: `v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed with the secret. Every retry has a new timestamp and so a new signature. Not sent for a subscription without a secret (`signed` is `false`). How to check it is under Webhook events, Verifying a delivery.","example":"v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE="},"required":false,"name":"webhook-signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoStartedEvent"},"example":{"video":{"_id":"XEKcAejz6cWRlUOtn0SGw","shortId":"OFcf-PfxLI9q","campaignId":"5jTuhVapNA0uDohhB00xl","title":"Video for John","userId":"auth0|649c36d5e23299e4e1365980","importId":"manual import","variables":{"first_name":"John","website_0":"https://example.com"},"originalRow":{"first_name":"John","email":"john@example.com","website":"https://example.com"},"overrideRow":{},"originalUid":"john@example.com","createdAt":"2026-11-23T09:47:30.172Z","renderedAt":"2026-11-23T09:52:10.885Z","campaignName":"Example Campaign"},"viewedAt":"2026-11-23T10:00:00.000Z","viewerUrl":"https://videos.example.com/OFcf-PfxLI9q","event":"VIDEO_STARTED","eventAt":"2026-11-23T10:00:00.000Z","eventId":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}}}},"responses":{"410":{"description":"The URL is gone for good: the subscription is removed."},"2XX":{"description":"Any `2xx`: delivered. Any other answer, or none within the timeout, is tried again."}}}},"VIDEO_FIRST_STARTED":{"post":{"summary":"VIDEO_FIRST_STARTED: A video started playing for the first time.","description":"Sent once per video, for the first such event of a session that is not a link scanner's. Playing starts on a click, or where the browser allows it, on its own when the page opens.","tags":["Webhook events"],"security":[],"parameters":[{"schema":{"type":"string","description":"The event's id (`eventId`), the same on every attempt.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"},"required":true,"name":"webhook-id","in":"header"},{"schema":{"type":"string","description":"When this attempt was made, in seconds since the Unix epoch.","example":"1795430400"},"required":true,"name":"webhook-timestamp","in":"header"},{"schema":{"type":"string","description":"The `id` of the subscription this delivery is for, so that a receiver with several subscriptions at one URL can tell them apart. Not sent for a subscription that has no id (some old campaign subscriptions).","example":"DHFG2C09n_3qrsSymZjjm"},"required":false,"name":"webhook-subscription-id","in":"header"},{"schema":{"type":"string","description":"The signature of this attempt, for a subscription that has a signing secret: `v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed with the secret. Every retry has a new timestamp and so a new signature. Not sent for a subscription without a secret (`signed` is `false`). How to check it is under Webhook events, Verifying a delivery.","example":"v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE="},"required":false,"name":"webhook-signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoFirstStartedEvent"},"example":{"video":{"_id":"XEKcAejz6cWRlUOtn0SGw","shortId":"OFcf-PfxLI9q","campaignId":"5jTuhVapNA0uDohhB00xl","title":"Video for John","userId":"auth0|649c36d5e23299e4e1365980","importId":"manual import","variables":{"first_name":"John","website_0":"https://example.com"},"originalRow":{"first_name":"John","email":"john@example.com","website":"https://example.com"},"overrideRow":{},"originalUid":"john@example.com","createdAt":"2026-11-23T09:47:30.172Z","renderedAt":"2026-11-23T09:52:10.885Z","campaignName":"Example Campaign"},"viewedAt":"2026-11-23T10:00:00.000Z","viewerUrl":"https://videos.example.com/OFcf-PfxLI9q","event":"VIDEO_FIRST_STARTED","eventAt":"2026-11-23T10:00:00.000Z","eventId":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}}}},"responses":{"410":{"description":"The URL is gone for good: the subscription is removed."},"2XX":{"description":"Any `2xx`: delivered. Any other answer, or none within the timeout, is tried again."}}}},"VIDEO_FINISHED":{"post":{"summary":"VIDEO_FINISHED: A video was watched to the end.","description":"Every time.","tags":["Webhook events"],"security":[],"parameters":[{"schema":{"type":"string","description":"The event's id (`eventId`), the same on every attempt.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"},"required":true,"name":"webhook-id","in":"header"},{"schema":{"type":"string","description":"When this attempt was made, in seconds since the Unix epoch.","example":"1795430400"},"required":true,"name":"webhook-timestamp","in":"header"},{"schema":{"type":"string","description":"The `id` of the subscription this delivery is for, so that a receiver with several subscriptions at one URL can tell them apart. Not sent for a subscription that has no id (some old campaign subscriptions).","example":"DHFG2C09n_3qrsSymZjjm"},"required":false,"name":"webhook-subscription-id","in":"header"},{"schema":{"type":"string","description":"The signature of this attempt, for a subscription that has a signing secret: `v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed with the secret. Every retry has a new timestamp and so a new signature. Not sent for a subscription without a secret (`signed` is `false`). How to check it is under Webhook events, Verifying a delivery.","example":"v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE="},"required":false,"name":"webhook-signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoFinishedEvent"},"example":{"video":{"_id":"XEKcAejz6cWRlUOtn0SGw","shortId":"OFcf-PfxLI9q","campaignId":"5jTuhVapNA0uDohhB00xl","title":"Video for John","userId":"auth0|649c36d5e23299e4e1365980","importId":"manual import","variables":{"first_name":"John","website_0":"https://example.com"},"originalRow":{"first_name":"John","email":"john@example.com","website":"https://example.com"},"overrideRow":{},"originalUid":"john@example.com","createdAt":"2026-11-23T09:47:30.172Z","renderedAt":"2026-11-23T09:52:10.885Z","campaignName":"Example Campaign"},"viewedAt":"2026-11-23T10:00:00.000Z","viewerUrl":"https://videos.example.com/OFcf-PfxLI9q","event":"VIDEO_FINISHED","eventAt":"2026-11-23T10:00:00.000Z","eventId":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}}}},"responses":{"410":{"description":"The URL is gone for good: the subscription is removed."},"2XX":{"description":"Any `2xx`: delivered. Any other answer, or none within the timeout, is tried again."}}}},"VIDEO_FIRST_FINISHED":{"post":{"summary":"VIDEO_FIRST_FINISHED: A video was watched to the end for the first time.","description":"Sent once per video, for the first such event of a session that is not a link scanner's.","tags":["Webhook events"],"security":[],"parameters":[{"schema":{"type":"string","description":"The event's id (`eventId`), the same on every attempt.","example":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"},"required":true,"name":"webhook-id","in":"header"},{"schema":{"type":"string","description":"When this attempt was made, in seconds since the Unix epoch.","example":"1795430400"},"required":true,"name":"webhook-timestamp","in":"header"},{"schema":{"type":"string","description":"The `id` of the subscription this delivery is for, so that a receiver with several subscriptions at one URL can tell them apart. Not sent for a subscription that has no id (some old campaign subscriptions).","example":"DHFG2C09n_3qrsSymZjjm"},"required":false,"name":"webhook-subscription-id","in":"header"},{"schema":{"type":"string","description":"The signature of this attempt, for a subscription that has a signing secret: `v1,` and the base64 HMAC-SHA256 of `{webhook-id}.{webhook-timestamp}.{body}`, keyed with the secret. Every retry has a new timestamp and so a new signature. Not sent for a subscription without a secret (`signed` is `false`). How to check it is under Webhook events, Verifying a delivery.","example":"v1,g0hM9SsE+OTPJTGt/tmIKtSyZlE3uFJELVlNIOLJ1OE="},"required":false,"name":"webhook-signature","in":"header"}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/VideoFirstFinishedEvent"},"example":{"video":{"_id":"XEKcAejz6cWRlUOtn0SGw","shortId":"OFcf-PfxLI9q","campaignId":"5jTuhVapNA0uDohhB00xl","title":"Video for John","userId":"auth0|649c36d5e23299e4e1365980","importId":"manual import","variables":{"first_name":"John","website_0":"https://example.com"},"originalRow":{"first_name":"John","email":"john@example.com","website":"https://example.com"},"overrideRow":{},"originalUid":"john@example.com","createdAt":"2026-11-23T09:47:30.172Z","renderedAt":"2026-11-23T09:52:10.885Z","campaignName":"Example Campaign"},"viewedAt":"2026-11-23T10:00:00.000Z","viewerUrl":"https://videos.example.com/OFcf-PfxLI9q","event":"VIDEO_FIRST_FINISHED","eventAt":"2026-11-23T10:00:00.000Z","eventId":"evt_3Kx9VhQ2mLwP8sTzR4nB1c"}}}},"responses":{"410":{"description":"The URL is gone for good: the subscription is removed."},"2XX":{"description":"Any `2xx`: delivered. Any other answer, or none within the timeout, is tried again."}}}}}}