Image and video jobs run in the background, so instead of repeatedly checking whether a job is done, you can have Samsa notify your app the moment it finishes. That's what webhooks are for.
When you start a generation through the API, you can include a webhook URL — an address in your own app. When the job finishes, Samsa sends a message to that address with the result, so your app can react right away. Exactly how to include the webhook URL is covered in the Webhooks guide in the developer docs (opens in a new tab).
So you can trust the notifications, Samsa signs each webhook and gives you a webhook signing secret to check that signature.
To find your secret:
Open Organization Settings > API Keys.
Find the Webhook signing secret and choose Reveal (or Copy).
Keep this secret private, just like an API key. Your app uses it to confirm each incoming message is genuine — the step-by-step verification is in the Webhooks guide (opens in a new tab).
Webhooks are optional — you can always check a job's status yourself instead.
If you think your signing secret has been exposed, treat it like a key: rotate it and update your app.