API webhooks
Webhooks notify your service when an associated training completes or fails. The supported event types are training.completed and training.failed. Polling remains available as a fallback.
Register and attach
POST to /webhooks with training:write, an Idempotency-Key and your HTTPS destination:
{
"url": "https://your-service.example/splatware-events"
}Replace the example address with your deployed endpoint. The destination must use HTTPS on port 443, resolve only to public internet addresses and contain no credentials or URL fragment. Localhost and private-network URLs are rejected.
Store the returned id and signing_secret securely. Include the id as webhook_id in POST /trainings. Registration alone does not attach the webhook to every job.
Webhook availability depends on the deployed service. A 503 webhooks_unavailable response means registration is unavailable; use status polling and contact support if required.
Verify signatures
Read the raw request body before any JSON parser changes it. The signature header has this form:
Splatware-Signature: t=TIMESTAMP,v1=HEX_DIGEST
Splatware-Event-Id: EVENT_ID
HEX_DIGEST = HMAC-SHA256(signing_secret, timestamp + "." + raw_body)- Parse the timestamp and digest from Splatware-Signature.
- Reject timestamps outside your allowed clock window; the supplied helpers use five minutes.
- Calculate the HMAC from the timestamp and exact raw bytes.
- Compare digests using a constant-time comparison.
- After verification, parse the JSON and persist the event id to deduplicate retries.
Use the complete Python and Node.js verification helpers. They verify signatures; your application must still store processed event ids.
Delivery and retries
The event body includes id, type, created_at and data. Data identifies the training and status, with capture_id/capture_url on completion. It does not contain the model’s binary data.
A 2xx response accepts delivery. The sender uses a 10-second timeout and can retry failed delivery up to five times after the initial attempt, with scheduled delays of 60 seconds, 5 minutes, 30 minutes, 2 hours and 6 hours. Actual dispatch time also depends on the service scheduler.
Disable a webhook
DELETE /webhooks/ID with training:write disables an owned destination. The account can retain at most 20 webhook records, including disabled records. Disabling a webhook does not cancel its training jobs. See training status and error handling.