Table of Contents

Webhooks

Use webhooks to set up a workflow to receive automatic notifications when an event happens in Labelbox. For a tutorial on setting up a simple webhooks workflow, see Webhooks setup.

Below are some common operations the GraphQL API supports for webhooks.

Create a webhook

Use the createWebhook mutation to create a webhook for a project.

mutation CreateWebhook {
createWebhook(data:{
project:{
id:"<PROJECT_ID>"
},
url:"<HTTP_URL>",
secret:"example_secret",
topics:{set:[LABEL_CREATED, LABEL_UPDATED, LABEL_DELETED]}
# topics:{set:[REVIEW_CREATED, REVIEW_UPDATED]}
}){
id
}
}

Update a webhook

After verifying and when entering production, use the updateWebhook mutation to update a specific webhook.

mutation UpdateWebhook {
updateWebhook(where:{
id:"<WEBHOOK_ID>"
},
data:{
url:"<PRODUCTION_URL>",
}){
id
}
}

Remove a webhook

Use the updateWebhook mutation to set the webhook status to INACTIVE.

mutation{
updateWebhook(
data:{
status: INACTIVE
}
where:{
id:"<WEBHOOK_ID>"
}
){
id
}
}

Was this page helpful?

Review queue

Contact