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 yet, so keep polling as a safety net for anything you cannot afford to miss. Retries with exponential backoff are planned.

Setup

  1. Open the API page in your VoiceCheap account.
  2. In Webhooks, select Generate signing secret. The secret starts with whsec_ and is shown once — copy it and store it on your server.
  3. Enter your endpoint URL and save it. It must use https.
That is all. Every project you start from then on delivers events to that endpoint.

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:
The signing secret is always the account secret; only the destination changes.

Events

There is no separate transcription event. Transcription runs inside project creation, and a project only exists once its transcript is stored — so project.created already means the transcript is ready to fetch 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.