Webhooks
Outbound delivery webhook endpoints.
Delivery webhook endpoints. PostShiba POSTs each delivery event to the url as a one-item array in the SendGrid Event Webhook format. Every POST carries X-Capsule-Timestamp and X-Capsule-Signature, which is sha256= plus the hex HMAC-SHA256 of {timestamp}.{body} keyed with secret. secret is returned on create and show, not on the list. Omit cluster_id and tenant_id to receive the whole team's events, or set one of them to receive only that cluster's or tenant's. Any response outside 2xx is a failure. An event gets up to 6 attempts, retried after about 5 minutes, 30 minutes, 2 hours, 8 hours, and 24 hours, each up to a fifth early, and is then marked dead. Replay dead deliveries from the dashboard. The API has no replay action. After 8 failed attempts in a row, status is down: new events queue instead of sending, and one queued event is retried at next_canary_at, waiting longer the longer the endpoint stays down, up to an hour. The first success sets status back to up and sends the queue. Changing url resets the count. PostShiba sends nothing else to the url: no health checks. send_test posts one signed sample event with "test": true and the X-Capsule-Test: 1 header; a 2xx also sets status to up. status is idle before the first delivery, retrying after a failure, up after a success, and down as above. The url must be public, and https in production.
GET /api/v1/teams/:obfuscated_team_id/webhook_endpoints
List webhook endpoints. secret is omitted.
GET /api/v1/webhook_endpoints/:id
Get one endpoint, including the signing secret.
id: Public webhook endpoint id
POST /api/v1/teams/:obfuscated_team_id/webhook_endpoints
Create an endpoint. Optional event_types, cluster_id, and tenant_id. Defaults to the SendGrid delivery set and team scope.
PATCH /api/v1/webhook_endpoints/:id
Update url, enabled, event_types, or scope. secret is omitted.
id: Public webhook endpoint id
POST /api/v1/webhook_endpoints/:id/send_test
Post one signed sample event to the url now and return what it answered. ok is true on 2xx.
id: Public webhook endpoint id