Webhooks

Instant HTTP callbacks on every completed task

Webhooks are POST requests sent by the Human Lambdas API towards a callback URL of your choice, which you can register per queue in its corresponding Connections screen.

Currently, Webhooks can only be enabled for completed tasks. The callback structure mimics the format of the task object.

Here's how you can replicate a sample Webhooks callback:

curl $CALLBACK_URL -H "Content-Type: application/json" -d '
{
"id": 169578,
"status": "completed",
"completed_at": "2020-10-08T12:56:04.206Z",
"created_at": "2020-10-08T12:55:08.546Z",
"completed_by": "[email protected]",
"queue": "Example",
"queue_id": 165,
"data": {
"text_test": "Some text"
},
"source": "manual"
}'

Fetching and setting a queue's webhook

We currently only support setting one webhook per queue between the UI and the API. The webhook object is represented in the API as:

{
"target": "https://webhook.site/6f768315-d21c-428f-9125-e7f467faecce"
}

With target being the URL that will receive a callback every time a task in a specific queue is completed.

get
Get a queue's webhook

https://api.humanlambdas.com/orgs/$ORGANIZATION_ID/queues/$QUEUE_ID/webhook
Request
Response
Request
Path Parameters
ORGANIZATION_ID
required
integer
The organization's identifier
QUEUE_ID
required
integer
The queue's identifier
Headers
Authorization
required
string
Token $API_KEY or visit the Introduction page for more details
Response
200: OK
{
"target": "https://webhook.site/6f768315-d21c-428f-9125-e7f467faecce"
}

put
Set a queue's webhook

https://api.humanlambdas.com/orgs/$ORGANIZATION_ID/queues/$QUEUE_ID/webhook
Request
Response
Request
Path Parameters
ORGANIZATION_ID
required
integer
The organization's identifier
QUEUE_ID
required
integer
The queue's identifier
Headers
Authorization
required
string
Token $API_KEY or visit the Introduction page for more details
Content-Type
required
string
application/json
Response
200: OK