callback_url when you create a media task. When the task finishes,
OmniaKey sends one signed POST with the finished task to that URL. Polling
GET /v1/media/tasks/{id} keeps working, so you can use both.
Add a callback URL
Putcallback_url at the top level of the create body:
- start with
https://. Any port works. - point to a public host. Private and loopback addresses,
localhostand names such as*.localor*.internalare refused with400 invalid_requestbefore anything is charged. - be at most 2,048 characters, without a username or password.
callback_url is part of the idempotency check: the same Idempotency-Key
with a different callback_url returns 409 idempotency_key_reused.
Delivery state
For a task created withcallback_url, the create response and
GET /v1/media/tasks/{id} include a callback object:
The task’s details in the media library
show the same state. A delivered or failed event can be sent again there with
Send again, and it keeps its
webhook-id.
The event
data is the object GET /v1/media/tasks/{id} returns, so a succeeded task
carries assets[] with freshly signed URLs. timestamp is when the event was
created and stays the same on every attempt.
OmniaKey sends the event after the task’s billing is final, so a failed or
canceled task has normally been refunded by then. Most events leave within a
few seconds of the task finishing.
Verify the signature
Events follow the Standard Webhooks spec, so its libraries verify them. Find your signing secret (whsec_...) under
Task callbacks in Settings.
Each account has one secret, and an API key can’t read it.
Without a library
- Base64-decode the part of the secret after
whsec_. That is the HMAC key. - Build
{webhook-id}.{webhook-timestamp}.{raw body}. - Compute its HMAC-SHA256 with that key.
- Compare the result, in constant time, with each
v1,<base64>entry inwebhook-signature. Entries are separated by spaces. - Reject a
webhook-timestampmore than 5 minutes away from your clock.
Retries
After the first attempt, retries follow at 5 seconds, 5 minutes, 30 minutes,
2 hours, 5 hours, 10 hours and 10 hours: 8 attempts over about 27.6 hours.
After the last one the callback is
failed.
- Answer quickly and do slow work afterwards: an answer after 15 seconds counts as a failure.
- Redirects aren’t followed, so use the final URL.
- Delivery is at least once. Every attempt of an event carries the same
webhook-id, so skip an event whosewebhook-idyou’ve already handled. - At most two attempts run at once per receiving host.
- When you retry a failed task from the dashboard, its new run sends one more
event with a new
webhook-id.
Test your endpoint
Under Task callbacks in Settings, enter your URL and choose Send test. OmniaKey sends a signedwebhook.test
event right away and shows your endpoint’s status code and response time. No
media task is needed, so you can check your receiver before your first task.
Network
- Requests come straight from OmniaKey’s servers, not through a proxy. OmniaKey doesn’t publish a fixed list of source IP addresses, so check the signature instead of allowlisting IPs.
- Your host name is resolved again before every attempt. An attempt to a name that resolves to a private or loopback address is refused, and the event is not tried again.