Create a Pitchlane webhook subscription
create_webhookSubscribe a URL to a Pitchlane event: Pitchlane POSTs a JSON body to webhook_url each time trigger happens, in any of the user's campaigns or, with campaign_id, in that one only. Subscribe only a URL the user gave and explicitly wants these events sent to: deliveries carry their campaign and video data. Check list_webhooks first: the same URL and trigger can be subscribed twice and would then get every event twice. The answer holds the subscription's signing secret (whsec_…), returned this once and never again: give it to the user and tell them to store it now. Deliveries carry webhook-id, webhook-timestamp and webhook-signature headers, which the receiving endpoint verifies with that secret. Triggers: VIDEO_CREATED: a video was added. VIDEO_UPDATED: adding a video with upsert changed an existing one. VIDEO_RENDERED: a video finished rendering and can be shared. VIDEO_UNRENDERABLE: a video cannot be rendered (invalid website or lead, or the page could not be reached). VIDEO_VIEWED / VIDEO_STARTED / VIDEO_FINISHED: a prospect opened, started playing or watched a video to the end, every time; the FIRST_ variants fire only the first time for each video. CAMPAIGN_READY: a created or changed campaign was processed and videos can be made from it. CAMPAIGN_FAILED: its setup or processing failed.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"trigger": "<trigger>",
"webhook_url": "<webhook_url>"
},
"name": "create_webhook"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| trigger | Yes | The event to send. See the tool's description for what each one means. | |
| campaign_id | No | Send only this campaign's events: its id, as list_campaigns returns it. Leave it out to send the event for every campaign of the account, present and future. | |
| webhook_url | Yes | The full URL Pitchlane sends each event to, e.g. `https://example.com/hooks/pitchlane`. Only one the user gave for this. |