Skip to content

Click2CallHandleWebhook

POST click2call/handleWebhooks/:uuid

The public endpoint a telephony provider posts call events to. It is not called by integrations — the URL is configured in the provider dashboard and comes from Click2CallAddWebhook.

The module finds the webhook by uuid, verifies the signature with the webhook secret, asks the provider adapter to translate the payload, and applies the result to the call.

Access Control

Public. There is no session: the request is authenticated by the unguessable uuid plus the signature check against the webhook secret.

Request

POST https://{broker_domain}/click2call/handleWebhooks/{uuid}
{}
{
  "command": "Click2CallHandleWebhook",
  "extID": "1",
  "data": {}
}
const res = await platform.Click2CallHandleWebhook({});

Path Parameters

Parameter Type Description
uuid string Webhook identifier from the URL

Behavior

  • The endpoint always answers 200, even when the event is rejected: a provider retry cannot fix a wrong signature or an unknown call, and retry storms are worse than a recorded rejection.
  • The real outcome is in result, and every event — accepted or not — is stored and visible through Click2CallGetWebhookEvents.
  • Events are deduplicated by the provider event id, so a repeated delivery does not move the call state twice.
  • A payload the adapter cannot map to a call is answered with NO_EXTERNAL_CALL_ID rather than guessed at — writing a status onto the wrong call is worse than dropping the event.

Response Data

A rejected event answers with the same shape, where result is not PROCESSED and reason says why: WEBHOOK_NOT_FOUND, PROFILE_NOT_FOUND, PROFILE_NOT_IN_WEBHOOK_MODE, PROVIDER_NOT_FOUND, PROVIDER_WEBHOOKS_DISABLED, ADAPTER_HAS_NO_WEBHOOK_SUPPORT, NO_EXTERNAL_CALL_ID, UNVERIFIED, NO_CALL.

{
  "result": "PROCESSED",
  "callId": 501,
  "changed": true,
  "status": "ANSWERED"
}

Errors

Code Error Description
200 UNVERIFIED Signature did not match the webhook secret; the event is stored and ignored
200 DUPLICATE This provider event was already applied
500 INTERNAL_ERROR Module could not process the event; it is stored with result: "ERROR"