Skip to main content

Webhooks

Webhooks let VoiceCheap notify your server as soon as something happens, so you can stop polling GET /v1/translate/{projectId}/status.
Deliveries are attempted once. There are no retries, so keep polling as a safety net for events you cannot afford to miss.

Setup

  1. Open the API page in your VoiceCheap account.
  2. In Webhooks, select Generate signing secret. The whsec_ secret appears once; copy it and store it on your server.
  3. Enter an https URL in Endpoint URL and select Save.
That is all. Every project you start from then on delivers events to that endpoint.
Webhook URLs must use HTTPS on port 443 and resolve to a public network address. URLs with credentials or fragments, private or reserved addresses, and redirects are rejected. This applies to the account endpoint and per-project overrides.
Use webhooks_get, webhooks_update, and webhooks_delete through the action API or MCP. Use webhooks_create_secret through the REST action API only. Save the signing secret securely when it is returned; MCP cannot call or poll this action.

Overriding the endpoint per request

POST /v1/translate and POST /v1/projects accept an optional webhookUrl field that overrides the account endpoint for that project only. It is handy for sending staging traffic somewhere else: You can also set webhookUrl on POST /v1/projects/{projectId}/dub to update the destination for an existing project.
The signing secret is always the account secret; only the destination changes.

Events

There is no separate transcription event. Project creation returns before transcription finishes. project.created is sent only after the transcript is stored; you can then retrieve it with POST /v1/projects/{projectId}/transcript.

Payload

Every delivery is a POST with a JSON body:
The payload is intentionally thin. Call the REST API for the content itself.

Verifying the signature

Every delivery carries these headers: The signature covers <timestamp>.<raw body>, so it is different on every delivery and proves both that the request came from VoiceCheap and that the body was not modified in transit.
Verify the signature before trusting a delivery. Your endpoint is a public URL, and the signature is what distinguishes a real VoiceCheap event from anything else that reaches it.

Responding

Reply with any 2xx status to acknowledge. Answer within 10 seconds — acknowledge first and do the work afterwards, rather than processing before you reply. A non-2xx response or a timeout is recorded as a failed delivery and, for now, is not retried.

Rotating the secret

Select Rotate on the API page to generate a new secret. The previous one stops working immediately, so deploy the new secret to your server as soon as you rotate. Deleting the webhook removes both the endpoint and the secret, and deliveries stop.