Webhooks

Receive real-time notifications when annotation events occur — batch completion, quality certification, and more.

Setup

Register a webhook endpoint to receive event notifications:

curl -X POST https://api.scriptnetwork.com/v1/webhooks \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://your-app.com/webhooks/scriptnetwork",
    "events": ["batch.completed", "batch.certified", "batch.failed"]
  }'

Events

EventDescription
batch.createdA new batch has been created
batch.processingAnnotation has started on the batch
batch.completedAll annotations in the batch are complete
batch.certifiedThe batch has passed quality certification
batch.failedThe batch failed quality checks
project.updatedProject settings were modified

Payload Example

{
  "id": "evt_xyz789",
  "type": "batch.certified",
  "created_at": "2025-01-15T14:30:00Z",
  "data": {
    "batch_id": "batch_abc123",
    "project_id": "proj_abc123",
    "quality_score": 92,
    "certification_level": "elite",
    "file_count": 150,
    "download_url": "https://api.scriptnetwork.com/v1/batches/batch_abc123/download"
  }
}

Verification

All webhook payloads include a X-Signature header containing an HMAC-SHA256 signature. Verify this signature using your webhook secret to ensure the payload is authentic.

Retry Policy

Failed deliveries (non-2xx responses) are retried with exponential backoff: 1 min, 5 min, 30 min, 2 hours, 24 hours. After 5 failed attempts, the webhook is disabled and you'll receive an email notification.