Skip to content
Chatwise
Skip to Content
Developer docs

Redeliver

POST /v1/webhook-deliveries/{deliveryId}/redeliver. Sends a delivery again, with the same event id, starting from its first attempt.

View as Markdown

POSThttps://api.chatwise.so/v1/webhook-deliveries/{deliveryId}/redeliver

Sends a delivery again, with the same event id, starting from its first attempt. It can be delivered, failed, cancelled or waiting for a retry. A delivery to a paused or disabled endpoint waits until the endpoint is active.

The API key needs the webhooks:write scope. It also needs messages:read when the delivery is for a message.* event. See authentication and scopes.

Example

curl -X POST 'https://api.chatwise.so/v1/webhook-deliveries/wd_3f1c0a9b5d7e42688c1f0e2d4b6a8c90/redeliver' \
  -H "Authorization: Bearer $CHATWISE_API_KEY"

Path parameters

NameTypeDescription
deliveryIdstringRequired. The delivery's id (wd_…).

Response

200. The delivery, waiting to be sent.

{
  "data": {
    "id": "wd_3f1c0a9b5d7e42688c1f0e2d4b6a8c90",
    "eventId": "evt_01JE2Z3QK4T8M6N2R5S7V9W1X3",
    "eventType": "message.received",
    "occurredAt": "2026-11-12T09:25:36.000Z",
    "status": "PENDING",
    "attempts": 0,
    "lastStatusCode": 503,
    "lastError": null,
    "lastDurationMs": 214,
    "nextAttemptAt": "2026-11-12T10:02:11.000Z",
    "deliveredAt": null,
    "createdAt": "2026-11-12T09:25:37.000Z",
    "endpointId": "we_01JE2Z3K8Q9V7W5X4Y3Z2A1B0C",
    "payload": {
      "message": {
        "id": "5678",
        "conversationId": "1234",
        "channel": "WHATSAPP",
        "direction": "inbound",
        "type": "text",
        "text": "Is this available in blue?",
        "sentAt": "2026-11-12T09:25:36.000Z",
        "ingestedAt": "2026-11-12T09:25:36.412Z",
        "replyToMessageId": null,
        "attachments": []
      },
      "conversation": {
        "id": "1234",
        "channel": "WHATSAPP",
        "status": "open",
        "participant": {
          "name": "Jordan Example",
          "channelId": "12025550147",
          "phoneNumber": "12025550147",
          "instagramUsername": null
        },
        "createdAt": "2026-11-01T09:12:00.000Z",
        "lastMessageAt": "2026-11-12T09:25:36.000Z"
      },
      "account": {
        "id": "11",
        "channel": "WHATSAPP"
      }
    },
    "attemptLog": [
      {
        "attemptNumber": 1,
        "startedAt": "2026-11-12T09:25:37.120Z",
        "durationMs": 214,
        "statusCode": 503,
        "error": "http_503"
      }
    ]
  }
}
FieldTypeDescription
data.idstringThe delivery's id, also sent as the X-Chatwise-Delivery header.
data.eventIdstringThe event's id, also sent as the webhook-id header.
data.eventTypestringThe event's name. One of message.received, message.sent, message.delivered, message.read, message.failed, comment.received.
data.occurredAtstringWhen the event happened. ISO 8601, in UTC.
data.statusstringPENDING (waiting), PROCESSING (being sent), RETRY (waiting for its next attempt), DELIVERED, FAILED or CANCELLED.
data.attemptsintegerAttempts so far. Redelivering starts again from 0.
data.lastStatusCodeinteger or nullThe HTTP status the last attempt got. Null when there was no answer.
data.lastErrorstring or nullWhy the last attempt failed, such as http_500 or timeout. retry_exhausted once the last of all attempts failed.
data.lastDurationMsinteger or nullHow long the last attempt took, in milliseconds.
data.nextAttemptAtstring or nullWhen it is next due to be sent, while it is PENDING or RETRY. Otherwise null. ISO 8601, in UTC.
data.deliveredAtstring or nullWhen it was delivered. ISO 8601, in UTC.
data.createdAtstringWhen the delivery was created. ISO 8601, in UTC.
data.endpointIdstringThe endpoint it is for.
data.payloadobject or nullThe event's data. Null until the event is prepared, and once its message was unsent, deleted or hidden.
data.attemptLogarray of objectsThe attempts that were recorded: all but a success on the first try. After a redelivery the numbers start again and the earlier attempts stay, so sort by startedAt.
data.attemptLog[].attemptNumberintegerThe attempt's number, from 1.
data.attemptLog[].startedAtstringWhen it started. ISO 8601, in UTC.
data.attemptLog[].durationMsinteger or nullHow long it took, in milliseconds.
data.attemptLog[].statusCodeinteger or nullThe HTTP status your endpoint answered.
data.attemptLog[].errorstring or nullWhy it failed. Null when it succeeded.

Errors

StatusMessageWhat it means
400Validation failedA parameter or body field is missing, unknown or malformed. errors lists each one.
400This delivery is already waiting to be sent.It is PENDING or PROCESSING.
400The endpoint no longer subscribes to message.received.Subscribe the endpoint to the event again first.
400The message was unsent, deleted or hidden, so it can't be sent again.The message is no longer visible through the API either.
401A valid Bearer API key is requiredThe Authorization header is missing or isn't Bearer <API key>.
401Invalid or revoked API keyThe key doesn't exist, was revoked, or has expired.
401Invalid API keyChatwise couldn't check the key. Try again.
403API key does not have the required scope: webhooks:writeThe key lacks the route's scope. Create a key that has it.
403Reading a message event's delivery needs an API key with the messages:read scope too.The delivery is for a message.* event and the key lacks messages:read.
404Webhook delivery not foundNo delivery with this id, or its endpoint was deleted, or it is older than 30 days.
429API key rate limit exceededWait the number of seconds in the Retry-After header.
500Internal server errorSomething failed in Chatwise. Retry reads with backoff.

The body of an error is described in errors.

On this page