Retry a delivery
Queues a finished delivery (succeeded or failed) for one more attempt, made within seconds, signed with the endpoint's current secret and sent to its current URL. A delivery that is still pending is returned unchanged: it is already scheduled for next_attempt_at (automatic retries stop after 8 attempts).
bearerAuthAuthorizationBearer <token>A secret API key from the dashboard: coss_live_… for production environments, coss_test_… for sandbox environments.
id*stringThe webhook endpoint's id.
delivery_id*stringThe delivery's id.
Coss-Version?"2026-10-10"The API version (a date) to use for this request. Defaults to your organization's version, pinned to the latest one when it first used the API and upgraded from the dashboard. The SDK always sends the version it was built for.
"2026-10-10"The delivery, now pending.
application/json- response
object*"webhook_delivery""webhook_delivery"id*stringendpoint_id*stringevent_id*stringThe event's id: the id of the payload and the webhook-id header.
event_type*stringstatus*WebhookDeliveryStatuspending: waiting for its next attempt. succeeded: the endpoint answered with a 2xx status. failed: every attempt failed, or the endpoint was disabled.
"pending""succeeded""failed"attempt_count*integernext_attempt_at*|When the next attempt is due; null once the delivery is finished.
date-timelast_status_code*integer|nulllast_error*string|nullpayload*The event body, exactly as posted to the endpoint.
attempts*array<>Every HTTP attempt of this delivery, oldest first.
created_at*stringdate-timeupdated_at*stringdate-timeimport { Coss } from "coss";const coss = new Coss({ apiKey: process.env.COSS_API_KEY, baseUrl: "https://api.coss.com",});const { data, error } = await coss.webhookEndpoints.deliveries.retry("whep_01k7c8m4q2f3e9v6t5r1n0p8yz", "whdel_01k7c8n2b5d7f9h1k3m5p7r9tv");{ "object": "webhook_delivery", "id": "whdel_01k7c8n2b5d7f9h1k3m5p7r9tv", "endpoint_id": "whep_01k7c8m4q2f3e9v6t5r1n0p8yz", "event_id": "evt_01k7c8n1z4c6e8g0j2l4n6q8sa", "event_type": "email.delivered", "status": "succeeded", "attempt_count": 1, "next_attempt_at": null, "last_status_code": 200, "last_error": null, "payload": { "id": "evt_01k7c8n1z4c6e8g0j2l4n6q8sa", "object": "event", "type": "email.delivered", "created_at": "2026-01-15T09:30:00.000Z", "data": { "email_id": "email_01k7c8m9x3a5c7e9g1j3l5n7q9", "recipient": "user@example.com" } }, "attempts": [ { "object": "webhook_attempt", "id": "whatt_01k7c8n2c9e1g3j5l7n9q1s3uw", "attempted_at": "2026-01-15T09:30:01.000Z", "status_code": 200, "duration_ms": 182, "error": null, "response_excerpt": "ok" } ], "created_at": "2026-01-15T09:30:00.000Z", "updated_at": "2026-01-15T09:30:01.000Z"}List webhook endpoints GET
Every endpoint of the API key's environment, oldest first. Webhook endpoints belong to the API key's own environment: a `coss_test_…` key only ever sees sandbox endpoints, and a `coss_live_…` key only production ones.
Roll a signing secret POST
Replaces the endpoint's signing secret with a new one, returned in the response (the only time it is). Until `previous_secret_expires_at`, every delivery is signed with both secrets (`webhook-signature` lists two signatures), so receivers verifying with either one accept it: deploy the new secret, then let the old one expire. Rolling again in that time stops the older secret at once. Not idempotent: after a lost response, roll again.