Skip to content
Pitchlane API

Guide

Webhooks

Get an HTTP POST when a video is created, rendered or watched, or when a campaign is ready. Every event, its payload and how it is delivered.

A webhook subscription asks Pitchlane to POST a JSON body to your URL whenever one kind of event happens. Each subscription is for one event type, its trigger. Subscribe several times to hear about several.

Subscribe

Create a subscription with the API, sending your URL and the trigger:

curl https://api.pitchlane.com/api/public/v1/webhooks \
  -H "X-API-Key: $PITCHLANE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "webhookUrl": "https://example.com/hooks/pitchlane", "trigger": "VIDEO_RENDERED" }'
  • POST /webhooks subscribes to the event in every campaign of your account.
  • POST /campaigns/{campaignId}/webhooks subscribes to it in one campaign.

Both answer with the subscription’s id, which DELETE /webhooks/{webhookId} removes. The Webhooks section of the API reference has every subscription endpoint. Your account’s subscriptions are also listed in the app under Profile → All Webhooks, where Send Test Webhook posts an example body to the URL once.

An event goes to the subscriptions that exist when it happens. A subscription made later is not sent events from before it, and nothing is sent for a campaign that has been deleted.

Event types

Trigger When it is sent
VIDEO_CREATED A video was added to a campaign: created with the API, imported, or added in the app.
VIDEO_UPDATED POST /campaigns/{campaignId}/videos with "upsert": true matched an existing video and changed it.
VIDEO_RENDERED A video finished rendering and can be watched.
VIDEO_UNRENDERABLE A video cannot be rendered: its lead or website is invalid, unsupported, or could not be recorded.
CAMPAIGN_READY A campaign that was created or changed has been processed, and videos can be made from it.
CAMPAIGN_FAILED A campaign’s setup or processing failed. Its problems say why.
VIDEO_VIEWED Someone opened the video’s page. Sent for every view.
VIDEO_FIRST_VIEWED The video’s page was opened for the first time.
VIDEO_STARTED Someone started playing the video. Sent every time.
VIDEO_FIRST_STARTED The video was played for the first time.
VIDEO_FINISHED Someone watched the video to the end. Sent every time.
VIDEO_FIRST_FINISHED The video was watched to the end for the first time.

VIDEO_RENDERED_FULLY is still accepted as a trigger, but the current rendering pipeline does not send it. Subscribe to VIDEO_RENDERED instead.

Sent once per video

VIDEO_CREATED, VIDEO_RENDERED, VIDEO_UNRENDERABLE and the three FIRST events are sent at most once for a video until it is queued to render again. A video that is re-rendered sends VIDEO_RENDERED again, and its next view sends VIDEO_FIRST_VIEWED again. VIDEO_UPDATED is sent on every update.

VIDEO_UNRENDERABLE is sent only for problems with the lead or its website, errors of type UNRECORDABLE, INVALID_LEAD, UNSUPPORTED or VALIDATION_ERROR reported by the renderer. Internal errors do not send it, so our team can fix and retry those videos.

What counts as a view

The viewing events (VIDEO_VIEWED, VIDEO_STARTED, VIDEO_FINISHED and their FIRST versions) are reported by the video’s page.

  • A video link opened with ?dnt=1 at the end records nothing and sends no webhooks. Use it to preview your own videos.
  • Email security scanners open every link in an email. Views from sessions that look like such a scanner do not send VIDEO_VIEWED or VIDEO_FIRST_VIEWED. If the same session then interacts with the page, it was a person after all, and the held-back view events are sent then.

Campaign events

After a campaign is created, duplicated, or changed in a way that has to be processed (its pitch video, pages, page images or videos, or outro), Pitchlane watches it until its status is no longer processing. It then sends CAMPAIGN_READY (status ready) or CAMPAIGN_FAILED (status failed). Several changes made while it is processing give one event, for the state the campaign settles in. Drafts and archived campaigns send neither, and a campaign that is still processing when the watch ends sends nothing.

Delivery

Video and campaign events are delivered with retries spread over a day. Viewing events are sent as the video’s page reports them, with only a few quick retries.

Video and campaign events

This covers VIDEO_CREATED, VIDEO_UPDATED, VIDEO_RENDERED, VIDEO_UNRENDERABLE, CAMPAIGN_READY and CAMPAIGN_FAILED.

Each event is a POST with Content-Type: application/json and two headers:

Header Value
webhook-id The event’s id, evt_…. The same as the body’s eventId, and the same on every attempt.
webhook-timestamp When this attempt was made, in seconds since 1970 (Unix time).

Answer with any 2xx status within 15 seconds. Anything else is a failed attempt: another status, a timeout or a connection error.

A failed attempt is retried on this schedule, each delay counted from the attempt before:

Attempt 1 2 3 4 5 6 7 8
Delay at once 5 s 5 min 30 min 2 h 5 h 10 h 10 h

That is eight attempts over about 27.5 hours, after which the event is given up for that URL. If a failed answer carries a Retry-After header (seconds, or an HTTP date), the next attempt waits at least that long, but never more than an hour past the schedule.

  • Answering 410 Gone deletes the subscription. Zapier does this when a Zap is turned off. Nothing more is sent to it.
  • Each subscription is delivered on its own: a failing URL does not hold up the others, and they are not sent the event again.
  • Each attempt reads the subscription again. If it was deleted, nothing more is sent. If its URL was changed, the next attempt goes to the new URL.
  • Every attempt sends the same body. Use eventId to skip an event you have already handled: if your server processed an attempt but its answer did not reach us, the next attempt brings the same event again.
  • Events are delivered independently of each other, so they can arrive out of order. Order them by eventAt.

Viewing events

VIDEO_VIEWED, VIDEO_FIRST_VIEWED, VIDEO_STARTED, VIDEO_FIRST_STARTED, VIDEO_FINISHED and VIDEO_FIRST_FINISHED are sent as a JSON POST without the webhook-id and webhook-timestamp headers, and without an eventId in the body.

A failed attempt is retried up to three times, after short pauses, and only after a connection error or a 5xx answer. There is no later retry, and no fixed time your server must answer within. Answering 410 Gone deletes the subscription, as above.

Verifying a webhook

Pitchlane does not sign webhook requests. To check that a request came from your subscription, put a long random secret in the URL you subscribe, for example https://example.com/hooks/pitchlane?token=…, and reject requests without it.

When an action matters (sending an email, updating a CRM), treat the webhook as a notification and read the current state from the API, for example GET /videos/{videoId}, before you act on it.

Payloads

Every body is a JSON object with the trigger in event and the time it happened in eventAt (ISO 8601, UTC).

Video events

VIDEO_CREATED, VIDEO_UPDATED, VIDEO_RENDERED and VIDEO_UNRENDERABLE:

Field Type
event string The trigger.
eventAt string (date-time) When it happened.
eventId string evt_…, unique per event. Also in the webhook-id header.
video object The video: the same Video object that GET /videos/{videoId} returns.
rawVideo object The video as Pitchlane stores it. Its fields are internal and can change, so use video.
error object VIDEO_UNRENDERABLE only: why the video cannot be rendered.

The fields of video you will use most:

Field Type
id string The video’s id.
shortId string The id in the video’s link.
campaignId string Its campaign.
campaignName string The campaign’s name.
title string From the campaign’s title template, unless it was set.
createdAt string (date-time) When the video was created.
renderedAt string (date-time) When it was rendered.
renderingStatus string Where its render is: QUEUED_FOR_RECORDING, RECORDING, QUEUED_FOR_RENDERING, RENDERING, RATE_LIMITED, RENDERED or ERROR.
variables object The values of the campaign’s variables for this video (first_name, website_0…).
originalRow object The lead as you sent or imported it, with your own field names.
originalUid string or number Your identifier of the lead, when you sent one.
videoUrl string or null The video’s page, where the lead watches it. null until rendered.
videoFileUrl string or null The rendered MP4 file. null until rendered.
thumbnailUrl string or null An animated GIF of the video. null until rendered.
thumbnailUrlPNG string or null A still PNG of the video. null until it exists.
thumbnailEmbed string or null HTML for an email: the GIF, linked to videoUrl. null until rendered.
processingError object Why the video failed, when it did.

The Video object in the API reference lists the rest. A field with no value yet, such as renderedAt before the render, is left out of the body.

A VIDEO_RENDERED body, with rawVideo shortened and storage hosts elided:

{
  "video": {
    "id": "XEKcAejz6cWRlUOtn0SGw",
    "shortId": "OFcf-PfxLI9q",
    "title": "Video for John",
    "createdAt": "2026-11-20T11:47:30.172Z",
    "queuedAt": "2026-11-20T11:47:30.410Z",
    "startedProcessingAt": "2026-11-20T11:48:02.118Z",
    "backgroundRecordedAt": "2026-11-20T11:48:41.902Z",
    "startedRenderingAt": "2026-11-20T11:49:10.355Z",
    "renderedAt": "2026-11-20T11:50:03.871Z",
    "meta": {},
    "variables": {
      "first_name": "John",
      "company_name": "John SEO",
      "website_0": "https://johnseo.com"
    },
    "importId": "API import",
    "originalUid": "john@johnseo.com",
    "campaignId": "5jTuhVapNA0uDohhB00xl",
    "renderingStatus": "RENDERED",
    "campaignName": "Example Campaign",
    "thumbnailUrl": "https://pitchlane.video/thumbnail/OFcf-PfxLI9q.gif",
    "thumbnailStorageUrl": "https://<storage host>/s2ELq_HDs6udzoVhPuBM1.gif",
    "thumbnailUrlPNG": "https://pitchlane.video/thumbnail/OFcf-PfxLI9q.png",
    "thumbnailStorageUrlPNG": "https://<storage host>/YXW6Ie9mgdWQenC7c1YFz.png",
    "thumbnailEmbed": "<div><a target=\"_blank\" href=\"https://pitchlane.video/video/OFcf-PfxLI9q\"><img style=\"margin:0px;box-sizing:border-box;padding:0px;width:100%;max-width:300px;height:auto\" src=\"https://pitchlane.video/thumbnail/OFcf-PfxLI9q.gif\" alt=\"Video for John\"></a><br /></div>",
    "thumbnailStorageEmbed": "<div>…</div>",
    "thumbnailEmbedPNG": "<div>…</div>",
    "thumbnailStorageEmbedPNG": "<div>…</div>",
    "videoFileUrl": "https://<storage host>/hBPGjWK0Ld9FhXZvxeqSx.mp4",
    "videoUrl": "https://pitchlane.video/video/OFcf-PfxLI9q",
    "originalRow": {
      "first_name": "John",
      "company": "John SEO",
      "website": "https://johnseo.com",
      "email": "john@johnseo.com"
    },
    "overrideRow": {}
  },
  "rawVideo": {
    "_id": "XEKcAejz6cWRlUOtn0SGw",
    "shortId": "OFcf-PfxLI9q",
    "campaignId": "5jTuhVapNA0uDohhB00xl"
  },
  "event": "VIDEO_RENDERED",
  "eventAt": "2026-11-20T11:50:04.002Z",
  "eventId": "evt_Q2xGx5V0bQ8a1kq3J9mZr"
}

The video’s page and thumbnails are on your campaign’s custom domain when it has one, and on pitchlane.video otherwise.

VIDEO_CREATED has the same shape. The video has just been made, so it has no render times yet and its URLs are null.

VIDEO_UPDATED describes the row you sent, not the stored video. Its video.id, shortId and createdAt were made for that row and are not the stored video’s. Match it to your lead with originalUid (or your campaign’s duplicate field), or list the campaign’s videos with GET /campaigns/{campaignId}/videos.

VIDEO_UNRENDERABLE adds error, the video’s processing error:

Field Type
error.type string UNRECORDABLE, INVALID_LEAD, UNSUPPORTED or VALIDATION_ERROR.
error.code string A more specific code.
error.message string For a person to read.
error.cause string More detail, when known.
error.pageUrl string The page that could not be recorded, when there is one.

It can carry other diagnostic fields beside these.

{
  "video": {
    "id": "Vb2r6PqLk0xYtN3sW8eZa",
    "shortId": "mQ7tY2pLx9Rc",
    "title": "Video for Ana",
    "createdAt": "2026-11-20T12:01:10.044Z",
    "variables": { "first_name": "Ana", "website_0": "https://ana-example.com" },
    "importId": "API import",
    "campaignId": "5jTuhVapNA0uDohhB00xl",
    "renderingStatus": "ERROR",
    "campaignName": "Example Campaign",
    "videoFileUrl": null,
    "videoUrl": null,
    "originalRow": {},
    "overrideRow": {},
    "processingError": {
      "type": "UNRECORDABLE",
      "code": "BrowserCaptureFailure",
      "message": "Page failed to deliver any frames after standard and highresource attempts",
      "pageUrl": "https://ana-example.com"
    }
  },
  "rawVideo": { "_id": "Vb2r6PqLk0xYtN3sW8eZa" },
  "error": {
    "type": "UNRECORDABLE",
    "code": "BrowserCaptureFailure",
    "message": "Page failed to deliver any frames after standard and highresource attempts",
    "pageUrl": "https://ana-example.com"
  },
  "event": "VIDEO_UNRENDERABLE",
  "eventAt": "2026-11-20T12:04:12.530Z",
  "eventId": "evt_7mJb0yQe2Lr5WvX1cN8tKa"
}

Campaign events

CAMPAIGN_READY and CAMPAIGN_FAILED:

Field Type
event string CAMPAIGN_READY or CAMPAIGN_FAILED.
eventAt string (date-time) When the campaign was seen to settle.
eventId string evt_…. Also in the webhook-id header.
campaignId string The campaign’s id.
campaign object The campaign as it was then: the same Campaign object that GET /campaigns/{campaignId} returns, with its status (ready or failed) and problems.
{
  "campaignId": "5jTuhVapNA0uDohhB00xl",
  "campaign": {
    "id": "5jTuhVapNA0uDohhB00xl",
    "name": "Example Campaign",
    "titleTemplate": "Video for {{first_name}}",
    "folderId": null,
    "languagePreference": null,
    "createdAt": "2026-11-20T11:40:12.301Z",
    "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-20T11:44:51.017Z",
  "eventId": "evt_c3RkZXZ0X2V4YW1wbGVfMQ"
}

A CAMPAIGN_READY body is the same with "status": "ready" and empty problems.

Viewing events

VIDEO_VIEWED, VIDEO_FIRST_VIEWED, VIDEO_STARTED, VIDEO_FIRST_STARTED, VIDEO_FINISHED and VIDEO_FIRST_FINISHED:

Field Type
event string The trigger.
eventAt string (date-time) When the video’s page reported it.
viewedAt string (date-time) The same time, kept for older integrations.
viewerUrl string The page the report came from, when the browser sent it.
video object The video as Pitchlane stores it, plus campaignName.

video here is the stored record, not the API’s Video object: its id is _id, and it has no videoUrl or thumbnail URLs. You can rely on _id, shortId, campaignId, campaignName and createdAt, and, when they are set, title, variables, originalRow, originalUid and renderedAt. For the Video object, call GET /videos/{videoId} with video._id.

{
  "video": {
    "_id": "qHJqGpTe0qxm_3kqXHENL",
    "shortId": "PtIpJKUD0lRp",
    "title": "Video for Ryane",
    "campaignId": "vDMeo5EmtGBIP7NMqW5RF",
    "storagePaths": {
      "video": "hBPGjWK0Ld9FhXZvxeqSx.mp4",
      "video_mp4": "hBPGjWK0Ld9FhXZvxeqSx.mp4",
      "thumbnail": "s2ELq_HDs6udzoVhPuBM1.gif",
      "thumbnail_png": "YXW6Ie9mgdWQenC7c1YFz.png"
    },
    "variables": {
      "website_0": "https://pitchlane.com",
      "first_name": "Ryane"
    },
    "importId": "example.csv-2026-11-18-16-03",
    "createdAt": "2026-11-18T15:03:57.613Z",
    "originalRow": {
      "first_name": "Ryane",
      "last_name": "Tully",
      "website": "https://pitchlane.com",
      "email": "ryane@pitchlane.io",
      "company": "Pitchlane"
    },
    "originalRowIndex": 0,
    "originalUid": "ryane@pitchlane.io",
    "importSource": "CSV",
    "renderedAt": "2026-11-18T15:07:10.885Z",
    "campaignName": "Some Campaign Name"
  },
  "viewedAt": "2026-11-21T12:29:51.167Z",
  "eventAt": "2026-11-21T12:29:51.167Z",
  "viewerUrl": "https://pitchlane.video/video/PtIpJKUD0lRp",
  "event": "VIDEO_STARTED"
}

Checklist for your receiver

  1. Check the secret you put in the URL.
  2. Answer 2xx quickly (video and campaign events wait 15 seconds), and do slow work afterwards.
  3. Skip an eventId you have already handled (video and campaign events carry one).
  4. Answer 410 Gone from a URL you have retired, so Pitchlane stops sending to it.