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:
1
curl $CALLBACK_URL -H "Content-Type: application/json" -d '
2
{
3
"id": 169578,
4
"status": "completed",
5
"completed_at": "2020-10-08T12:56:04.206Z",
6
"created_at": "2020-10-08T12:55:08.546Z",
7
"completed_by": "[email protected]",
8
"queue": "Example",
9
"queue_id": 165,
10
"data": {
11
"text_test": "Some text"
12
},
13
"source": "manual"
14
}'
Copied!

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:
1
{
2
"target": "https://webhook.site/6f768315-d21c-428f-9125-e7f467faecce"
3
}
Copied!
With target being the URL that will receive a callback every time a task in a specific queue is completed.
get
https://api.humanlambdas.com
/orgs/$ORGANIZATION_ID/queues/$QUEUE_ID/webhook
Get a queue's webhook
put
https://api.humanlambdas.com
/orgs/$ORGANIZATION_ID/queues/$QUEUE_ID/webhook
Set a queue's webhook
Last modified 8mo ago