COSS
Webhook endpoints

Retry a delivery

POST
/v1/webhook_endpoints/{id}/deliveries/{delivery_id}/retry

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).

Authorization

bearerAuth
headerAuthorizationBearer <token>

A secret API key from the dashboard: coss_live_… for production environments, coss_test_… for sandbox environments.

Path Parameters

id*string

The webhook endpoint's id.

delivery_id*string

The delivery's id.

Header Parameters

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.

Value in"2026-10-10"

Response Body

The delivery, now pending.

application/json
  1. response
object*"webhook_delivery"
Value in"webhook_delivery"
id*string
endpoint_id*string
event_id*string

The event's id: the id of the payload and the webhook-id header.

event_type*string
status*WebhookDeliveryStatus

pending: waiting for its next attempt. succeeded: the endpoint answered with a 2xx status. failed: every attempt failed, or the endpoint was disabled.

Value in"pending""succeeded""failed"
attempt_count*integer
next_attempt_at*|

When the next attempt is due; null once the delivery is finished.

Formatdate-time
last_status_code*integer|null
last_error*string|null
payload*

The event body, exactly as posted to the endpoint.

attempts*array<>

Every HTTP attempt of this delivery, oldest first.

created_at*string
Formatdate-time
updated_at*string
Formatdate-time
import { 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"}