Documentation Index
Fetch the complete documentation index at: https://docs.soundpiece.co/llms.txt
Use this file to discover all available pages before exploring further.
Overview
Supply acallback_url on the original PUT and we’ll POST the final response to that URL when the operation reaches ready or failed. This eliminates polling latency for production integrations.
Webhooks follow the Standard Webhooks specification, so any standards-compliant client library can verify them out of the box.
Polling is canonical. Webhooks are a best-effort latency optimisation; if you didn’t receive one within a reasonable window, fall back to polling the
GET endpoint. Don’t rely on webhook receipt as proof of operation state.Registering a callback
Addcallback_url to any PUT request body:
- Be publicly accessible over HTTPS with a valid TLS certificate (self-signed certs are rejected).
- Return a 2xx status code within 10 seconds.
- Handle duplicate deliveries idempotently — use the
webhook-idheader as your deduplication key.
Payload shape
The body is the same DTO you’d get from polling, wrapped:type is <route>.<status> — either .ready or .failed — for fan-out routing on your side.
The data field is exactly the DTO from the matching GET endpoint. Anything you can do with a polled response, you can do with a webhook payload.
Correlate webhook deliveries with your own records using the echoed idempotency_key — you chose it on the PUT, so you already have it on your side.
Signature verification
Every delivery includes three headers (per the Standard Webhooks spec):| Header | Value |
|---|---|
webhook-id | A stable id for this event. Retries reuse the same id, so consumers dedupe on it. |
webhook-timestamp | Unix seconds at first delivery attempt. |
webhook-signature | v1,<base64(HMAC-SHA256(secret, "<id>.<timestamp>.<body>"))>. Multiple signatures are space-separated during secret rotation. |
- Compute
HMAC-SHA256(your_signing_secret, "<webhook-id>.<webhook-timestamp>.<raw-body>"). - Base64-encode it.
- Compare against the
v1,…signature inwebhook-signatureusing constant-time comparison. - Reject if the signature doesn’t match, or if
webhook-timestampis more than 5 minutes from the current time.
whsec_… value. See authentication.
Using the Standard Webhooks library (recommended)
There are official libraries that hide the HMAC math. From github.com/standard-webhooks/standard-webhooks:Manual verification
If you’d rather not pull in a library, here’s the equivalent in plain Python:Python
Retry behaviour
If your endpoint doesn’t return a2xx, we retry with exponential backoff up to 3 attempts:
| Attempt | Delay before retry |
|---|---|
| 1st retry | 1 second |
| 2nd retry | 5 seconds |
| 3rd retry | 30 seconds |
| Response | Action |
|---|---|
2xx | Delivered. We won’t call again for this operation. |
4xx (except 429) | Fail immediately — this indicates a configuration issue we can’t fix by retrying. |
5xx, 429, network error or timeout | Retry. |
GET endpoint indefinitely — fall back to polling if you suspect a delivery was missed.
Secret rotation
To rotate your webhook signing secret without dropping deliveries:- Create a new key in the dashboard (which generates a new signing secret too).
- Roll out the new secret to your webhook handler.
- During the cutover, our
webhook-signatureheader includes both signatures (space-separated,v1,<new> v1,<old>) for deliveries from operations submitted under the old key. The Standard Webhooks libraries handle multi-signature verification automatically. - Once you’re confident every old-key operation has drained, revoke the old key.
Local testing
Use a tunnelling tool like ngrok to expose your local server during development:callback_url when submitting test operations.