---
title: Set up webhooks in Label Studio
short: Webhooks
type: guide
tier: all
order: 407
order_enterprise: 407
meta_title: Configure Webhooks in Label Studio
meta_description: Label Studio documentation for setting up and configuring webhooks to integrate Label Studio with your machine learning pipeline.
section: "Integrate & Extend"
Webhooks in Label Studio let you set up integrations that subscribe to certain events that occur inside Label Studio. When an event is triggered, Label Studio sends an HTTP POST request to the configured webhook URL. For example:json { "action": "TASK_CREATED", "tasks": [ {"id": 1, ...}, ... ] }
Your application or service can then respond to that event information however you want.
Some events that happen in Label Studio happen in response to an API call. For those, the API response is sufficient to know that the action has occurred. But other events happen inside the Label Studio UI, such as project changes and task annotation activities. To find out immediately when those changes occur, you can use webhooks to notify your application or machine learning pipeline to take specific actions.
The actions your webhook takes in your application or pipeline can vary depending on the event. For example, you might use events sent to your webhook URL to do the following:
- Start training a machine learning model after a certain number of tasks have been annotated.
- Perform active learning after a task has been annotated.
- Prompt annotators to begin working on a project after it is fully set up.
- Create a new version of training data in a dataset versioning repository.
Limit the number of requests to your server by subscribing only to the events relevant for your use case.
Label Studio makes two main types of events available to integrate with webhooks: project-level task events and organization events.
| Event Action | Details | Use Case |
|---|---|---|
| Task Created | For a specific project, triggers when new tasks are created. One event per import action. Bulk task creation is sent as one event. | Use to take action in your machine learning pipeline. |
| Task Deleted | For a specific project, triggers when tasks are deleted. One event per deletion action. Bulk task deletion is sent as one event. | Use to update a training dataset version. |
| Annotation Created | For a specific project, triggers when new annotations are created for any tasks. One event per annotation. | Use to start training in an active learning scenario. |
| Annotation Updated | For a specific project, triggers when an existing annotation is updated, overwritten, or when a task is skipped. | Use to prompt model retraining. |
| Annotation Deleted | For a specific project, triggers when an annotation is deleted. Bulk annotation deletion is sent as one event. | Use to create a new version of a training dataset. |
| Project Created | For an organization, triggers when a project is created. You must enable organization-level webhooks to send this event. | Use to create a new pipeline for data management. |
| Project Updated | Triggers when project settings, such as the labeling configuration, are updated, created, or saved. | Use to update an existing data management pipeline. |
| Project Deleted | For an organization, triggers when a project is deleted. You must enable organization-level webhooks to send this event. | Use to remove a data management pipeline. |
To use the organization-level webhooks that trigger events for each project, you must set an environment variable.shell LABEL_STUDIO_ALLOW_ORGANIZATION_WEBHOOKS=true
To integrate with webhooks in Label Studio, you must do the following:
1. Create a webhook endpoint or URL as part of your application or machine learning model pipeline.
2. Make sure the webhook endpoint or URL is accessible to your Label Studio instance and can accept HTTP POST requests.
3. Add the webhook to Label Studio.
Set up your webhook endpoint to read the event payload from Label Studio and take action based on the event.
Set up a webhook URL in Label Studio and associate it with one or more event triggers. You can set up a webhook URL in the Label Studio UI, or using the API. You can configure as many webhook connections as you want, but too many might overwhelm your instance.
Add a webhook URL to Label Studio. The webhook URL must be set up to accept HTTP POST requests.
https://www.example.com/webhook.Authorization and Basic bGFiZWxzdHVkaW86ZXhhbXBsZQ==action key is sent. For example, choose to send the payload for Annotation created events to update the correct pipeline based on the project ID sent in the payload.Annotation created event.Make a POST request to the Create a webhook endpoint to add a webhook using the API. If you want to extend webhooks with custom events, see Create a custom webhook event.
Webhook connections time out after 1 second. You can adjust the timeout by setting an environment variable, WEBHOOK_TIMEOUT.
If the webhook URL is inaccessible by Label Studio, you can see this in a traceback in the logs.
Label Studio does not retry webhook connections that fail. You can see successful webhook deliveries in the logs in DEBUG mode.