webhook field when
creating a diarization, identify
or voiceprint job.
You can also set webhookStatusOnly to true when creating the job (default:
false). When this option is enabled, webhook payloads only include jobId
and status (the output field is excluded), which is useful for large
payloads.
Webhooks are sent when the job status is one of:
succeededfailedcanceled
pending, created, or running statuses.
The request body will be a JSON object containing job data. Here’s an example of what the request body will look like for a succeeded diarization job:
Request body
output field will be different depending on the type of job you created.
- Diarization jobs will have a diarization schema as the value of the
outputfield. - Identify jobs will have an identify schema as the value of the
outputfield. - Voiceprint jobs will have a voiceprint schema as the value of the
outputfield.
If a job fails, the
status field will be failed and there will be no
output field. If a job is canceled, the status field will be canceled
and there will be no output field. If webhookStatusOnly is true, there
will be no output field for any status, including succeeded.Retries
pyannoteAI will retry sending the webhook up to 3 times. The first retry is immediate, the second retry after 1 minute, and the third retry after 5 minutes. With each retry attempt, you’ll also be given ax-retry-num HTTP header indicating the attempt number: 1, 2, or 3.
An attempt will be considered unsuccessful if your webhook doesn’t behave as expected.
This will be communicated to you in the x-retry-reason HTTP header, where you’ll find a string describing the reason why the previous attempt failed.
Here is a list of all the possible failure codes and their reason:
http_timeout: We didn’t receive a response from your server within 10 seconds.too_many_redirects: The request was redirected more than twice.connection_failed: We couldn’t connect to your server.ssl_error: We couldn’t verify the authenticity of your SSL certificate.http_error: Your server responded with an HTTP status code that was not in the HTTP 200 OK range.unknown_error: We encountered an unknown error.
Example webhook payloads
For a successful diarization job, the webhook payload will look like the following:Request body
Request body
Request body
webhookStatusOnly: true, the webhook payload will
look like the following even if the job succeeded:
Request body