Skip to Content
TryItOn
DocsAPI ReferenceSDKsResources

Webhook Events

The events TryItOn POSTs to your webhook endpoint: tryon.completed, tryon.failed and webhook.test. Body fields, signature headers and responses.

We POST these events to the endpoint you set up in the dashboard. Set it up, verify signatures and handle retries with the Webhooks guide.

Good to know

  • Verify first. Check webhook-signature against the raw body before you trust any field.
  • id is stable. It equals the webhook-id header and stays the same on every retry. Use it to skip duplicates.
  • data matches GET /status/{id} for the job, plus jobId. Result URLs last 72 hours, like the status ones.
  • Any 2xx within 10 seconds counts as delivered.

Try-on completed

Sent once when a photo try-on made with an API key completes. data is what GET /status/{id} returns for the job, plus its jobId. Download the images within 72 hours.

Header Parameters

webhook-id*string

The event id. The same on every retry of an event, so use it to skip events you already handled.

webhook-timestamp*string

When this attempt was sent, in Unix seconds. Reject requests more than 5 minutes off your clock.

webhook-signature*string

Space-separated signatures, each v1,<base64>: HMAC-SHA256 of {webhook-id}.{webhook-timestamp}.{raw body}, keyed with the base64-decoded part of your whsec_ secret after the prefix. Accept the request when any one matches. For 24 hours after a secret rotation there is also one per older secret (at most three in all).

Request Body

application/json
  1. body
id*WebhookEventId

Unique per event and the same on every retry. Equal to the webhook-id header.

Match^evt_[0-9a-f]{24}$
type*string
created_at*string

When the event was created. Retries keep this value.

Formatdate-time
data*

Response Body

Any 2xx tells us the event arrived. Any other status, a redirect, or no response within 10 seconds counts as a failure and is retried.

Example Requests
POST/tryon.completed
Request Body
application/json
{  "id": "evt_5f0c8a1e2b3d4c5e6f708192",  "type": "tryon.completed",  "created_at": "2026-12-04T10:15:30.120Z",  "data": {    "jobId": "64b7f1a9d9a3b8e5c7f9a123",    "status": "completed",    "output": [      "https://cdn.tryiton.now/USER_ID/tryons/3f2c9a.png"    ],    "error": null  }}
Header Parameters
{  "webhook-id": "evt_5f0c8a1e2b3d4c5e6f708192",  "webhook-timestamp": "1796379330",  "webhook-signature": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4="}

Try-on failed

Sent once when a photo try-on made with an API key fails, including a job that timed out. Its held credits are released and it isn't charged. error says why, as text for people.

Header Parameters

webhook-id*string

The event id. The same on every retry of an event, so use it to skip events you already handled.

webhook-timestamp*string

When this attempt was sent, in Unix seconds. Reject requests more than 5 minutes off your clock.

webhook-signature*string

Space-separated signatures, each v1,<base64>: HMAC-SHA256 of {webhook-id}.{webhook-timestamp}.{raw body}, keyed with the base64-decoded part of your whsec_ secret after the prefix. Accept the request when any one matches. For 24 hours after a secret rotation there is also one per older secret (at most three in all).

Request Body

application/json
  1. body
id*WebhookEventId

Unique per event and the same on every retry. Equal to the webhook-id header.

Match^evt_[0-9a-f]{24}$
type*string
created_at*string

When the event was created. Retries keep this value.

Formatdate-time
data*

Response Body

Any 2xx tells us the event arrived. Any other status, a redirect, or no response within 10 seconds counts as a failure and is retried.

Example Requests
POST/tryon.failed
Request Body
application/json
{  "id": "evt_9a8b7c6d5e4f30211a2b3c4d",  "type": "tryon.failed",  "created_at": "2026-12-04T10:18:02.511Z",  "data": {    "jobId": "64b7f1a9d9a3b8e5c7f9a124",    "status": "failed",    "output": [],    "error": "Timed out."  }}
Header Parameters
{  "webhook-id": "evt_5f0c8a1e2b3d4c5e6f708192",  "webhook-timestamp": "1796379330",  "webhook-signature": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4="}

Test event

Sent when you press Send test event in the dashboard. Signed like every other event, so it checks your verification code end to end. It isn't retried.

Header Parameters

webhook-id*string

The event id. The same on every retry of an event, so use it to skip events you already handled.

webhook-timestamp*string

When this attempt was sent, in Unix seconds. Reject requests more than 5 minutes off your clock.

webhook-signature*string

Space-separated signatures, each v1,<base64>: HMAC-SHA256 of {webhook-id}.{webhook-timestamp}.{raw body}, keyed with the base64-decoded part of your whsec_ secret after the prefix. Accept the request when any one matches. For 24 hours after a secret rotation there is also one per older secret (at most three in all).

Request Body

application/json
  1. body
id*WebhookEventId

Unique per event and the same on every retry. Equal to the webhook-id header.

Match^evt_[0-9a-f]{24}$
type*string
created_at*string
Formatdate-time
data*

Response Body

Any 2xx tells us the event arrived. Any other status, a redirect, or no response within 10 seconds counts as a failure and is retried.

Example Requests
POST/webhook.test
Request Body
application/json
{  "id": "evt_0f1e2d3c4b5a69788796a5b4",  "type": "webhook.test",  "created_at": "2026-12-04T10:00:00.000Z",  "data": {    "message": "This is a test event from TryItOn."  }}
Header Parameters
{  "webhook-id": "evt_5f0c8a1e2b3d4c5e6f708192",  "webhook-timestamp": "1796379330",  "webhook-signature": "v1,K5oZfzN95Z9UVu1EsfQmfVNQhnkZ2pj9o9NDN/H/pI4="}