Webhooks
Overview
Webhooks let your app automatically receive notifications when something happens in your Ittybit project — such as when a task succeeds, a run completes, or a task fails.
Instead of polling the API for status changes, you can register webhook endpoints that receive real-time POST requests with event data.
Webhook Endpoints
Webhook endpoints are a dedicated resource in the API. You create, list, update, and delete them via the /webhooks/endpoints API.
Creating a webhook endpoint
Webhook endpoint object
Event topics
Subscribe to any combination of event topics when creating a webhook endpoint:
| Topic | Description |
|---|---|
task.created | A new task has been created |
task.updated | A task's status or progress has changed |
task.succeeded | A task completed successfully |
task.failed | A task failed |
run.created | A new run has been created |
run.updated | A run's status or progress has changed |
run.succeeded | All tasks in a run completed successfully |
run.failed | One or more tasks in a run failed |
Webhook delivery
When an event matching one of your subscribed topics occurs, Ittybit sends an HTTPS POST request to your endpoint URL with the event data:
Handling webhooks
Your server should expose an endpoint that accepts POST requests and returns a 200 response promptly.
Managing endpoints
List endpoints
Update an endpoint
Delete an endpoint
Best practices
- Use HTTPS — HTTP endpoints will be rejected.
- Return 200 quickly — Your endpoint should respond within 5 seconds.
- Log payloads — Store incoming payloads for debugging.
- Handle retries — If your endpoint returns an error, Ittybit retries with exponential backoff.
- Use specific topics — Only subscribe to the events you need.
API Reference
See the API Reference for the full list of webhook endpoint operations.