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": "bernat@humanlambdas.com",
  "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 a queue's webhook

GET https://api.humanlambdas.com/orgs/$ORGANIZATION_ID/queues/$QUEUE_ID/webhook

Path Parameters

Headers

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

Set a queue's webhook

PUT https://api.humanlambdas.com/orgs/$ORGANIZATION_ID/queues/$QUEUE_ID/webhook

Path Parameters

Headers

Last updated