Skip to main content

Overview

Webhooks allow you to receive real-time HTTP callbacks when specific events occur in CVAT. This enables you to build custom integrations, automate workflows, and trigger actions based on CVAT activities.
Webhooks are available for both CVAT Cloud and self-hosted installations.

What are Webhooks?

Webhooks are HTTP callbacks triggered by events in CVAT. When an event occurs (like task creation, annotation updates, or job completion), CVAT sends an HTTP POST request to your specified endpoint with event details. Common use cases:
  • Send notifications to Slack or Discord when tasks are completed
  • Trigger automated quality checks after annotation updates
  • Update external project management systems
  • Start model training pipelines when datasets reach certain thresholds
  • Log annotation activities to analytics platforms
  • Sync data with external databases

Webhook Types

CVAT supports two types of webhooks:

Organization Webhooks

Receive events from all resources within an organization:
  • Project events (create, update, delete)
  • Task events (create, update, delete)
  • Job events (create, update, delete)
  • Issue events (create, update, delete)
  • Comment events (create, update, delete)
  • Organization events (update, delete)
  • Membership events (create, update, delete)
  • Invitation events (create, delete)

Project Webhooks

Receive events only from a specific project:
  • Task events (create, update, delete)
  • Job events (create, update, delete)
  • Issue events (create, update, delete)
  • Comment events (create, update, delete)
  • Project events (update, delete)

Creating a Webhook

Via CVAT UI

  1. Navigate to the Webhooks page in CVAT
  2. Click Create webhook
  3. Configure the webhook:
    • Target URL: Your endpoint URL (must be HTTPS)
    • Description: Optional description for identification
    • Type: Organization or Project
    • Project: (If Project type) Select the project
    • Events: Select which events to subscribe to
    • Content Type: application/json (default)
    • Secret: Optional secret for signature verification
    • Enable SSL: Verify SSL certificates (recommended)
  4. Click Create

Via API

Create a webhook using the REST API:

Via Python SDK

Available Events

Subscribe to specific events based on your needs:

Resource Events

Organization Events

Webhook Payload

When an event occurs, CVAT sends a POST request with this payload structure:

Payload Structure

Payload Fields

  • event: The event type (e.g., create:task, update:job)
  • webhook_id: ID of the webhook that triggered
  • sender: User who performed the action
  • [resource]: The affected resource (task, job, project, etc.)
  • before_update: (Update events only) Previous values of changed fields

Example: Task Update Event

Securing Webhooks

Signature Verification

CVAT signs webhook payloads using HMAC-SHA256. Verify signatures to ensure requests are from CVAT:

Python Example

Node.js Example

SSL/TLS

Always use HTTPS endpoints and enable SSL verification:
  • Use valid SSL certificates (not self-signed)
  • Keep the Enable SSL option checked in webhook settings
  • Use certificate pinning for additional security

IP Allowlisting

For self-hosted CVAT, restrict webhook endpoints to your CVAT server IP addresses.

Testing Webhooks

Using Webhook.site

Test webhooks without setting up a server:
  1. Go to webhook.site
  2. Copy your unique URL
  3. Create a webhook in CVAT with this URL
  4. Trigger an event in CVAT
  5. View the received payload on webhook.site

Ping Endpoint

Test webhook connectivity using the ping endpoint:
This sends a test ping event to your webhook URL.

Local Testing with ngrok

Test webhooks on your local machine:

Webhook Management

List Webhooks

Update Webhook

View Delivery History

Redeliver Failed Webhooks

Delete Webhook

Example Integrations

Slack Notifications

Automated Quality Checks

Best Practices

  • Return a 200 response within 10 seconds
  • Process webhook data asynchronously if needed
  • Use job queues for long-running tasks
  • CVAT will retry failed deliveries (5xx errors)
  • Webhooks may be delivered multiple times
  • Use event IDs or timestamps to detect duplicates
  • Design handlers to be idempotent
  • Store processed event IDs to avoid reprocessing
  • Regularly check webhook delivery status
  • Set up alerts for failed deliveries
  • Review and redeliver failed webhooks
  • Update webhook URLs when infrastructure changes
  • Always verify webhook signatures
  • Use HTTPS with valid certificates
  • Implement rate limiting
  • Log suspicious requests

Troubleshooting

Webhook Not Firing

  • Verify webhook is active (is_active: true)
  • Check event type is in the webhook’s subscribed events
  • Ensure the resource is within scope (organization/project)
  • Review webhook configuration for typos

Failed Deliveries

  • Check target URL is accessible from CVAT servers
  • Verify SSL certificate is valid
  • Ensure endpoint returns 2xx status code
  • Check server logs for errors
  • Review timeout settings (webhooks timeout after 10s)

Missing Events

  • Some events may not fire for bulk operations
  • Check the before_update field to detect actual changes
  • Review CVAT logs for event processing

Signature Verification Failing

  • Ensure secret matches exactly (no extra spaces)
  • Use raw request body for signature computation
  • Verify HMAC algorithm is SHA256
  • Check header name is X-Signature-256

Additional Resources