Skip to content
Get started

Webhooks

Configure outbound webhooks delivered when a worker’s tasks complete.

Retrieve a worker webhook
workers.webhooks.retrieve(worker_id) -> Webhook { token, url }
GET/api/workers/{workerId}/webhook
Update a worker webhook
workers.webhooks.update(worker_id, **kwargs) -> Webhook { token, url }
PUT/api/workers/{workerId}/webhook
Delete a worker webhook
workers.webhooks.delete(worker_id) -> Webhook { token, url }
DELETE/api/workers/{workerId}/webhook
Regenerate a worker webhook token
workers.webhooks.regenerate_token(worker_id) -> Webhook { token, url }
POST/api/workers/{workerId}/webhook/regenerate-token
List worker webhook executions
workers.webhooks.list_executions(worker_id, **kwargs) -> WebhookExecutionList { logs, page, page_count, total_count }
GET/api/workers/{workerId}/webhook/executions
ModelsExpand Collapse
class UpdateWebhook { url }
url: String

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

maxLength2048
formaturi
class Webhook { 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.

class WebhookExecution { id, created_at, duration_ms, 7 more }
id: String
created_at: Time
formatdate-time
duration_ms: Integer

Wall-clock time spent on the delivery attempt.

error_message: String

Failure reason when requestStatus is error.

request_status: :success | :error

success when the endpoint returned a 2xx response, error otherwise.

One of the following:
:success
:error
response_status: Integer

HTTP status returned by the endpoint, when reachable.

task_id: String

Task that triggered the delivery, when available.

task_title: String

Title of the originating task, when available.

url: String

Endpoint Handinger attempted to deliver to.

worker_id: String
class WebhookExecutionList { logs, page, page_count, total_count }
logs: Array[WebhookExecution { id, created_at, duration_ms, 7 more } ]
id: String
created_at: Time
formatdate-time
duration_ms: Integer

Wall-clock time spent on the delivery attempt.

error_message: String

Failure reason when requestStatus is error.

request_status: :success | :error

success when the endpoint returned a 2xx response, error otherwise.

One of the following:
:success
:error
response_status: Integer

HTTP status returned by the endpoint, when reachable.

task_id: String

Task that triggered the delivery, when available.

task_title: String

Title of the originating task, when available.

url: String

Endpoint Handinger attempted to deliver to.

worker_id: String
page: Integer

Current page number.

page_count: Integer

Total number of pages available.

total_count: Integer

Total number of executions recorded.