Skip to main content
POST

Overview

Create a webhook in your organization. Once it’s added to a campaign under Track Call Outcomes (pushingCrms with type: "webhook"), the result of each finished call in that campaign is sent to its URL as a JSON POST request.

Prerequisites

  • An API key for your workspace
  • A public https (or http) URL that accepts POST requests

Request

string
required
Your workspace API key. Create one from the profile menu in the dashboard → API Keys.

Request Parameters

string
required
URL that call outcomes are sent to. Must be a valid http or https URL.
string
A name to identify the webhook.
string
If your endpoint requires authentication, its token. It is sent as Authorization: Bearer <token> with each request (the Bearer prefix is added if missing).

Response

object
required
The new webhook. data._id is the ID to use as crmId and schemaId in a campaign’s pushingCrms.

Error Handling

Errors return status: false, with the reason in errorMessage.
  • 400 Bad Request – Webhook URL is required, Invalid Webhook URL format, or Invalid protocol. Only http and https are allowed.
  • 401 Unauthorized – Missing or invalid API key.
  • 500 Internal Server Error – Unexpected server error.

Delivery

  • The first request is sent about 5 minutes after the call ends, so the recording and call analysis can be included.
  • Your endpoint has 10 seconds to respond. Redirects are followed.
  • Network errors, 408, 429 and 5xx responses are retried, up to 8 attempts in about 22 hours. A Retry-After header is respected. Other 4xx responses are not retried.
  • A completed call is sent only once its call analysis is ready. If the analysis isn’t ready within 30 minutes, the call is not sent.
  • Each finished call attempt is sent separately, so a contact that is called again can be sent more than once.
  • Attempts that never reached the telephony provider, attempts the provider dropped because it was at capacity, and expired contacts are not sent.
  • If a recording arrives after the first request, the call is sent again.
After creating a webhook, add it to a campaign with pushingCrms: [{ "type": "webhook", "crmId": "<webhook _id>", "schemaId": "<webhook _id>" }] when creating or updating the campaign. Calls that ended before the webhook was added are not sent.