Skip to content
Get started

Webhooks

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

Retrieve a worker webhook
client.Workers.Webhooks.Get(ctx, workerID) (*Webhook, error)
GET/api/workers/{workerId}/webhook
Update a worker webhook
client.Workers.Webhooks.Update(ctx, workerID, body) (*Webhook, error)
PUT/api/workers/{workerId}/webhook
Delete a worker webhook
client.Workers.Webhooks.Delete(ctx, workerID) (*Webhook, error)
DELETE/api/workers/{workerId}/webhook
Regenerate a worker webhook token
client.Workers.Webhooks.RegenerateToken(ctx, workerID) (*Webhook, error)
POST/api/workers/{workerId}/webhook/regenerate-token
List worker webhook executions
client.Workers.Webhooks.ListExecutions(ctx, workerID, query) (*WebhookExecutionList, error)
GET/api/workers/{workerId}/webhook/executions
ModelsExpand Collapse
type UpdateWebhook struct{…}
URL string

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

maxLength2048
formaturi
type Webhook struct{…}
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.

type WebhookExecution struct{…}
ID string
CreatedAt Time
formatdate-time
DurationMs int64

Wall-clock time spent on the delivery attempt.

ErrorMessage string

Failure reason when requestStatus is error.

RequestStatus WebhookExecutionRequestStatus

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

One of the following:
const WebhookExecutionRequestStatusSuccess WebhookExecutionRequestStatus = "success"
const WebhookExecutionRequestStatusError WebhookExecutionRequestStatus = "error"
ResponseStatus int64

HTTP status returned by the endpoint, when reachable.

TaskID string

Task that triggered the delivery, when available.

TaskTitle string

Title of the originating task, when available.

URL string

Endpoint Handinger attempted to deliver to.

WorkerID string
type WebhookExecutionList struct{…}
ID string
CreatedAt Time
formatdate-time
DurationMs int64

Wall-clock time spent on the delivery attempt.

ErrorMessage string

Failure reason when requestStatus is error.

RequestStatus WebhookExecutionRequestStatus

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

One of the following:
const WebhookExecutionRequestStatusSuccess WebhookExecutionRequestStatus = "success"
const WebhookExecutionRequestStatusError WebhookExecutionRequestStatus = "error"
ResponseStatus int64

HTTP status returned by the endpoint, when reachable.

TaskID string

Task that triggered the delivery, when available.

TaskTitle string

Title of the originating task, when available.

URL string

Endpoint Handinger attempted to deliver to.

WorkerID string
Page int64

Current page number.

PageCount int64

Total number of pages available.

TotalCount int64

Total number of executions recorded.