Configure Webhook Delivery
Delivery
Configure Webhook Delivery
Set up real-time webhook notifications for squid run events
POST
Configure Webhook Delivery
Configure webhooks to receive real-time HTTP POST notifications when your squid’s events occur. Subscribe to specific events like run start, completion, pause, or errors.
Event Types
| Event | Description | Trigger Condition |
|---|---|---|
| run.running | Run is actively executing | Emitted when a Squid run begins or resumes |
| run.paused | Run paused | Emitted when the run is temporarily halted (e.g., account limits reached) |
| run.done | Run completed successfully | Emitted when the run finishes without errors |
| run.error | Unexpected error occurred | When a run has crashed with an error |
Webhook Payload
Lobstr sends a JSON payload to your webhook URL:Payload Fields
| Field | Type | Description |
|---|---|---|
| id | string | Unique identifier for the run (hash) |
| object | string | Always “run” |
| event | string | One of the subscribed Event Types |
| squid.id | string | Squid hash |
| squid.name | string | Human-friendly Squid name |
| timestamp | string | Event timestamp in YYYY/MM/DD HH:MM:SS format (UTC) |
Retry Mechanism
Whenretry is enabled:
- Failed webhook deliveries are retried up to 3 times
- Retries occur with a 15-minute delay between attempts
Webhook Response Requirements
- Your endpoint should respond within 30 seconds
- Return HTTP 200, 201, or 202 to indicate successful receipt
Headers
Your API authentication token. Value:
Token YOUR_API_KEYMust be application/json. Value:
application/jsonQuery Parameters
The unique identifier (hash) of the squid for which to configure webhook delivery. Example:
c106a44a98044ef18acc59986ae10967Request Body
Your webhook endpoint URL that will receive POST requests. Example:
"https://your-webhook.com/endpoint"Master switch to enable/disable webhooks. Example:
trueEnable automatic retries for failed webhook deliveries (up to 3 attempts with 15-minute delays). Example:
falseSubscribe to run start/resume events. Example:
trueSubscribe to run pause events. Example:
falseSubscribe to run completion events. Example:
falseSubscribe to run error events. Example:
trueResponse Field Explanations
Configured webhook endpoint URL. Example:
"https://your-webhook.com/endpoint"Whether webhooks are active. Example:
trueWhether retry mechanism is enabled. Example:
falseSubscription status for run.running events. Example:
trueSubscription status for run.paused events. Example:
falseSubscription status for run.done events. Example:
falseSubscription status for run.error events. Example:
trueWebhook payloads are sent as JSON with Content-Type: application/json header. Parse the request body to extract event data.
Code Examples
Response
201