---
title: "Audio analysis failed"
method: POST
path: "audio.failed"
tags: ["Webhooks"]
---

# Audio analysis failed

`POST audio.failed` (webhook)

Sent once when an audio you submitted with a `callback_url` has failed.

**Delivery.** Imentiv sends an HTTPS `POST` with a JSON body to the `callback_url` you submitted.
Answer with any `2xx` status to acknowledge it. A connection error, a timeout, `408`, `429` or a
`5xx` answer is retried with backoff for up to about 24 hours (eight attempts in all); a `Retry-After`
header on `429` and `503` is honoured. Any other answer is final, and redirects are not followed.
Attempts can repeat an event, so ignore an `event_id` you have already processed.

**Verifying the signature.** Every request carries
`Imentiv-Signature: t=<unix seconds>,v1=<hex>[,v1=<hex>]`. Each `v1` is the hex HMAC-SHA256, keyed
with your signing secret (`whsec_...`, including the prefix), of the string `<t>.<raw request body>`.
Compute it over the exact bytes you received, compare in constant time, and reject a `t` further from
your clock than the tolerance you choose (five minutes is typical). `t` is the time of that attempt,
so it changes on a retry while the body does not. While a rotated-out secret is still valid the header
carries two `v1` values; accept the request if either matches. Read or rotate your secret with
`POST /v2/webhooks/secret`; see `GET /v2/webhooks/deliveries` for the attempt log.

## Headers

- `imentiv-signature` string, required: `t=<unix seconds>,v1=<hex>[,v1=<hex>]`. See above.
- `imentiv-event-id` string, required: The event's `event_id`. Identical on every attempt.
- `imentiv-delivery-attempt` integer, required: 1 for the first attempt, then 2, 3, ...

## Payload

- AudioFailedEvent
  - `event_id` string, required: Unique per event and identical on every delivery attempt. Use it to ignore duplicates.
  - `timestamp` integer, required: When the event was created, in Unix seconds.
  - `payload_version` 'v1'
  - `event_type` 'audio.failed', required
  - `resource_type` 'audio', required
  - `data` AudioFailedData, required
    - `id` string, required: The audio id.
    - `status` 'failed', required
    - `error` string, required: A short, fixed description of the failure.
    - `error_code` 'processing_failed' | 'timeout', required: A stable code to branch on.

## Acknowledgement `200`

Successful Response

- unknown

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/imentiv/apis/welcome-to-imentiv-ai.md) - [All operations](https://skmtc.dev/imentiv/apis/welcome-to-imentiv-ai/llms.txt) - [OpenAPI document](https://skmtc.dev/imentiv/apis/welcome-to-imentiv-ai/revisions/bc15cec7e794?raw)
