List failed messages
/v1/messages/failedMessages you sent that WhatsApp refused to deliver, newest first, with the customer’s number, what the message said and why it failed (for example error 130497, a number restricted from messaging a country). Use it to find what to send again by another route, then report it with POST /v1/messages/:id/resent-outside. Failures already reported as sent again are left out unless includeResent is true. The message.failed webhook event carries the same item the moment a message fails.
Permission: conversations:read · 120 requests / minute
Query parameters
- connectionIdstringOptional
- Only failures on this WhatsApp connection.
- sincestringOptional
- Only failures at or after this time (ISO 8601).
- includeResentstringOptional
- true also lists failures already marked as sent again. Default false.
- cursorstringOptional
- nextCursor from the previous page.
- limitintegerOptional
- Items per page. Default 25, maximum 100.
curl -X GET "https://public-api.wsmartsender.com/v1/messages/failed" \
-H "X-Api-Key: wss_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx"{ items: [{ id, conversationId, connectionId, to, type, text, template: { name, language } | null, error: { code, message }, failedAt, resentOutside: { at, source, channel, externalId, echoMessageId } | null }], nextCursor }