Callbacks REST
REST API · openapi/partner-api/openapi.yaml · 1 callback
JobStatusChangedCallback
Job Status Change Callback
Callback notification sent when a job status changes.
The callback payload contains the complete Job object with updated status information. Partners can use this callback to track the status of their jobs and get notified when the job is complete.
Callback Payload Authentication
To protect the payload of the callback from tampering in transit, SASHA provides a signature of the request payload using the HMAC-SHA256 algorithm. The Callback Secret that the Partner receives from SASHA is a 64-character hex string; the key for the HMAC-SHA256 algorithm is the 32 bytes it decodes to, not the hex characters themselves.
The request signature is calculated over a few fields concatenated together:
HMAC-SHA256(request_method || request_url || request_id || request_payload)
Where || is the concatenation operator without any separator or padding.
- The request method is the HTTP method of the request in uppercase, e.g.
POST. - The request url is the URL of the request without the fragment and query parameters.
- The request id is the value of the
SASHA-Request-IDheader. - The request payload is the JSON request body.
The request signature is included in the SASHA-Request-Signature header.
The Callback Secret used to sign the request payload is identified by its
Callback Secret ID, returned in the SASHA-Callback-Secret-ID header. Use this
header to look up the matching signing key when you have more than one Callback
Secret configured (for example, during a key rotation). You can also pin a
specific Callback Secret per job by passing callback_secret_id when submitting
the job.
While validating the signature is not mandatory, SASHA recommends to do so to ensure the payload genuinely comes from SASHA and was not modified in transit.
Validating the request signature
Your application should verify that the callback request is genuine and was sent by SASHA before responding to the request. This is important for securing sensitive data and protecting your application from abuse.
SASHA includes the request signature in the SASHA-Request-Signature HTTP header.
Example
Here is an example of how to validate the request signature for the request below:
- Callback Secret:
4f8a9b2c1d3e5f7081a2b3c4d5e6f7081928374655a6b7c8d9e0f1a2b3c4d5e6(decode the hex to 32 bytes for the HMAC key) - Request method:
POST - Request url:
https://your-app.com/callbacks/sasha-job-update - Request id:
aa-b-c-d-ee - Request payload:
{"job_id":"44cab986-0385-470a-8e5c-c657b0543d19","type":"embed-signature","status":"completed","output_url":"https://storage.sasha.eu/1420f12bb0e7a31104f90311d6e","output_url_expires_at":"2026-01-01T13:00:00.000Z","signature_id":"340558932877813735","creator_id":1,"created_at":"2026-01-01T12:00:00.000Z","updated_at":"2026-01-01T12:00:02.000Z"}
The concatenated string would be:
POSThttps://your-app.com/callbacks/sasha-job-updateaa-b-c-d-ee{"job_id":"44cab986-0385-470a-8e5c-c657b0543d19","type":"embed-signature","status":"completed","output_url":"https://storage.sasha.eu/1420f12bb0e7a31104f90311d6e","output_url_expires_at":"2026-01-01T13:00:00.000Z","signature_id":"340558932877813735","creator_id":1,"created_at":"2026-01-01T12:00:00.000Z","updated_at":"2026-01-01T12:00:02.000Z"}
The request signature is 8c37da02969bcc8fc9392a1e4ffac332a0c7248df7301a2484f2d40d4822db2d.
Request Identification
Each callback delivery includes a unique SASHA-Request-ID header that you can use for tracking,
debugging, and ensuring idempotency.
Header notes
SASHA-Callback-Secret-ID
Identifier of the Callback Secret that was used to sign this callback request.
Use it to look up the matching signing key when validating the
SASHA-Request-Signature. This is how SASHA tells you which of
your configured Callback Secrets was selected — either the one
you pinned via callback_secret_id on the original job, or the
one SASHA chose automatically when no ID was provided.
A job with a callback needs an enabled Callback Secret, so the header names one of your Callback Secrets.
If you only have a single Callback Secret configured, you can ignore this header.
SASHA-Request-Signature
HMAC-SHA256 signature of the request payload.
See https://developer.sasha.eu/partner-api/api-reference/rest/Callbacks/#callback-payload-authentication
- Authentication
- No security scheme; see its headers
Headers
- SASHA-Callback-Secret-IDstringrequiredIdentifier of the Callback Secret that was used to sign this callback request.
- SASHA-Request-SignaturestringrequiredHMAC-SHA256 signature of the request payload.
- SASHA-Request-IDstringrequiredUnique identifier for this callback delivery request
Request body
- job_
idstringrequired The ID of the job - The error that occurred while processing the job, if the job
statusisfailed - output_
urlstringoptional The URL of the result media file (only populated if jobstatusiscompletedandtypeisembed-signature) - output_
url_ expires_ atstring (date-time)optional The date and time the output URL will expire - The Signature identifier (populated when job
statusiscompleted). Will benullif no signature was found in the media. - creator_
idinteger (uint32)optional0..4294967295 The CreatorID of the business entity that owns the signature insignature_id(populated exactly whensignature_idholds a value). For anembed-signaturejob, this is the CreatorID of the Partner that submitted the job. For alookup-signaturejob, this is the CreatorID of the found signature's owner. - SASHA-evaluated distribution guidance for the found signature (populated when job
statusiscompleted,typeislookup-signature, and an active signature was found). A signature without a Record yields guidance with theprivateshare state. - A field-filtered Record for the found signature. Populated only when job
statusiscompleted,typeislookup-signature, an active signature was found, and the partner either owns the signature or has at least one field disclosed to it by the owner. The owning partner receives the full Record; any other partner receives only the fields the owner has granted to it or marked public. Absent for a partner with no such field, and never present for revoked signatures. - What the job left out of its result, or where the result differs from the input, without failing (only populated if job
statusiscompletedandtypeisembed-signature). Empty or absent when there is nothing to report. The protected media was still produced; each warning names what was left out or what differs from the input. A failed job reports its cause inerrorinstead. - created_
atstring (date-time)required The date and time the job was created - updated_
atstring (date-time)required The date and time the job was last updated
Responses
What the receiving endpoint answers.
- 200Callback received successfully
- 201Callback received successfully
- 202Callback received successfully
- 204Callback received successfully
- 400Bad request
- 401Unauthorized
- 403Forbidden
- 404Not found
- 500Internal server error
- 502Bad gateway
- 503Service unavailable
- 504Gateway timeout