Skip to content
Get started

Webhooks

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

Retrieve a worker webhook
workers.webhooks.retrieve(strworker_id) -> Webhook
GET/api/workers/{workerId}/webhook
Update a worker webhook
workers.webhooks.update(strworker_id, WebhookUpdateParams**kwargs) -> Webhook
PUT/api/workers/{workerId}/webhook
Delete a worker webhook
workers.webhooks.delete(strworker_id) -> Webhook
DELETE/api/workers/{workerId}/webhook
Regenerate a worker webhook token
workers.webhooks.regenerate_token(strworker_id) -> Webhook
POST/api/workers/{workerId}/webhook/regenerate-token
List worker webhook executions
workers.webhooks.list_executions(strworker_id, WebhookListExecutionsParams**kwargs) -> WebhookExecutionList
GET/api/workers/{workerId}/webhook/executions
ModelsExpand Collapse
class UpdateWebhook:
url: Optional[str]

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: Optional[str]

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

url: Optional[str]

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

class WebhookExecution:
id: str
created_at: datetime
formatdate-time
duration_ms: int

Wall-clock time spent on the delivery attempt.

error_message: Optional[str]

Failure reason when requestStatus is error.

request_status: Literal["success", "error"]

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

One of the following:
"success"
"error"
response_status: Optional[int]

HTTP status returned by the endpoint, when reachable.

task_id: Optional[str]

Task that triggered the delivery, when available.

task_title: Optional[str]

Title of the originating task, when available.

url: str

Endpoint Handinger attempted to deliver to.

worker_id: str
class WebhookExecutionList:
logs: List[WebhookExecution]
id: str
created_at: datetime
formatdate-time
duration_ms: int

Wall-clock time spent on the delivery attempt.

error_message: Optional[str]

Failure reason when requestStatus is error.

request_status: Literal["success", "error"]

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

One of the following:
"success"
"error"
response_status: Optional[int]

HTTP status returned by the endpoint, when reachable.

task_id: Optional[str]

Task that triggered the delivery, when available.

task_title: Optional[str]

Title of the originating task, when available.

url: str

Endpoint Handinger attempted to deliver to.

worker_id: str
page: int

Current page number.

page_count: int

Total number of pages available.

total_count: int

Total number of executions recorded.