Skip to content
Get started

Update a worker webhook

PUT/api/workers/{workerId}/webhook

Set or replace the webhook URL for a worker. A fresh token is generated the first time a URL is set; subsequent updates keep the existing token. Pass url: null to clear the webhook (use the dedicated DELETE for the same effect). Only the worker creator can update the webhook.

Path ParametersExpand Collapse
workerId: string
Body ParametersJSONExpand Collapse
url: string

HTTPS endpoint Handinger should POST to when a task finishes. Pass null to remove the webhook and clear its token.

maxLength2048
formaturi
ReturnsExpand Collapse
Webhook object { token, url }
token: string

Shared secret sent in the X-Handinger-Token header on each delivery. null when no webhook is configured.

url: string

HTTPS endpoint that receives webhook deliveries when a task completes. null when no webhook is configured.

Update a worker webhook

curl https://handinger.com/api/workers/$WORKER_ID/webhook \
    -X PUT \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $HANDINGER_API_KEY" \
    -d '{
          "url": "https://example.com/handinger-webhook"
        }'
{
  "token": "whk_01HZY31W2SZJ8MJ2FQTR3M1K9D",
  "url": "https://example.com/handinger-webhook"
}
Returns Examples
{
  "token": "whk_01HZY31W2SZJ8MJ2FQTR3M1K9D",
  "url": "https://example.com/handinger-webhook"
}