A webhook is an endpoint on your server that receives requests from Labelbox. The purpose of a webhook event is to notify your application whenever something interesting happens in one of your Labelbox projects. Rather than periodically polling the Labelbox API to check for any updates in Labelbox, setting up webhooks means your application will receive updates automatically.

For security purposes, Labelbox includes a signature in each webhook event it sends to your application endpoint. Setting up your webhooks configuration to verify the signature in each webhook message allows you to verify that the events were sent by Labelbox. See an example here.

Any traffic coming out of Labelbox will be coming from this IP address: 35.223.142.181. Make sure this IP address is whitelisted when you are setting up your webhooks.

Sample webhooks payload

127.0.0.1 - - [17/Mar/2021 09:52:00] "POST /webhook-endpoint HTTP/1.1" 200 -
=========== New Webhook Delivery ============
Delivery ID: ckmdi74ew57lq063553kuzekq
Event: LABEL_UPDATED
Payload: {
    "id": "ckmb8h50t008f3h683tugqsap",
    "createdAt": "2021-03-15T23:44:18Z",
    "updatedAt": "2021-03-17T13:51:59Z",
    "secondsToLabel": 79.173,
    "label": "{\"objects\":[{\"featureId\":\"ckmb8gvd9008b3h68l5tcmrt1\",\"schemaId\":\"ckm3se1a5010y0y6rcdc0bvvl\",\"title\":\"animal\",\"value\":\"animal\",\"color\":\"#1CE6FF\",\"bbox\":{\"top\":325,\"left\":233,\"height\":266,\"width\":413},\"instanceURI\":\"https://api.labelbox.com/masks/feature/ckmb8gvd9008b3h68l5tcmrt1\"},{\"featureId\":\"ckmbdp94300013h68y14zluto\",\"schemaId\":\"ckmbdol5s1ybk0y96fje86ktu\",\"title\":\"human\",\"value\":\"human\",\"color\":\"#FF34FF\",\"bbox\":{\"top\":75,\"left\":527,\"height\":453,\"width\":155},\"instanceURI\":\"https://api.labelbox.com/masks/feature/ckmbdp94300013h68y14zluto\"},{\"featureId\":\"ckmbdpdda00043h688pqrsoku\",\"schemaId\":\"ckmbdol5s1ybk0y96fje86ktu\",\"title\":\"human\",\"value\":\"human\",\"color\":\"#FF34FF\",\"bbox\":{\"top\":81,\"left\":666,\"height\":396,\"width\":134},\"instanceURI\":\"https://api.labelbox.com/masks/feature/ckmbdpdda00043h688pqrsoku\"},{\"featureId\":\"ckmbdpgd200073h68cu3vhjf2\",\"schemaId\":\"ckmbdol5s1ybk0y96fje86ktu\",\"title\":\"human\",\"value\":\"human\",\"color\":\"#FF34FF\",\"bbox\":{\"top\":0,\"left\":722,\"height\":535,\"width\":259},\"instanceURI\":\"https://api.labelbox.com/masks/feature/ckmbdpgd200073h68cu3vhjf2\"},{\"featureId\":\"ckmdi72l700043g68i52bq31i\",\"schemaId\":\"ckm3se1a5010y0y6rcdc0bvvl\",\"title\":\"animal\",\"value\":\"animal\",\"color\":\"#1CE6FF\",\"bbox\":{\"top\":94,\"left\":65,\"height\":104,\"width\":67},\"instanceURI\":\"https://api.labelbox.com/masks/feature/ckmdi72l700043g68i52bq31i\"}],\"classifications\":[{\"featureId\":\"ckmb8h0t7008e3h68hhmuf3y4\",\"schemaId\":\"ckm3se1a4010w0y6rd579gyl3\",\"title\":\"image\",\"value\":\"image\",\"answers\":[{\"featureId\":\"ckmb8h0t6008d3h689yq6cnm6\",\"schemaId\":\"ckm3se1aw01120y6r7zkcd93v\",\"title\":\"contains_human\",\"value\":\"contains_human\"}]}]}",
    "agreement": null,
    "benchmarkAgreement": null,
    "deleted": false,
    "project": {
        "id": "ckm4xyfncfgja0760vpfdxoro",
        "createdAt": "2021-03-11T14:03:12Z",
        "updatedAt": "2021-03-11T18:22:08.523Z",
        "name": "animal_demo_proj",
        "description": "",
        "deleted": false
    },
    "dataRow": {
        "id": "ckm4y6s5a1s7e0rb6bgf00oqa",
        "createdAt": "2021-03-11T14:09:41Z",
        "updatedAt": "2021-03-11T14:09:41Z",
        "deletedAt": null,
        "externalId": "uploaded_images/177.jpg",
        "rowData": "https://storage.labelbox.com/ckk4q1vgapsau07324awnsjq2%2F7b7f4198-3ea4-68db-9bf7-01dfd0bf3e8c-177.jpg?Expires=1617198719&KeyName=labelbox-assets-key-1&Signature=9mjtUoc61rooqsI8I2unQNU4N-o="
    },
    "dataset": {
        "id": "ckm4xyfua04cf0z7a3wz58kgj",
        "createdAt": "2021-03-11T14:03:12Z",
        "updatedAt": "2021-03-11T14:03:12Z",
        "name": "animal_demo_ds",
        "description": "",
        "deleted": false
    },
    "user": {
        "id": "ckm570mgm7q880795an0rfzmz",
        "email": "[email protected]"
    }
}

Set webhooks via the Python SDK (recommended)

Python Tutorial

Github

Google Colab

Webhooks

Open in Github

Open in Google Colab

Using GraphQL API

Follow the instructions here: Webhooks


Did this page help you?