Skip to content

message.failed ​

POSTyour webhook address

Message failed. The message will not reach the recipient. status is one of rejected, failed, expired or cancelled, and error says why (see failure codes).

Body ​

FieldTypeDescription
typestringAlways message.failed.
timestampstring (date-time)When the event happened, UTC.
dataMessage
json
{
  "type": "message.failed",
  "timestamp": "2026-11-02T12:00:04+00:00",
  "data": {
    "id": "msg_CgdWeHQNqtkmHvG3auyN5",
    "status": "rejected",
    "to": "+5521998120938",
    "from": null,
    "country": "BR",
    "channel": "whatsapp",
    "template": {
      "name": "welcome_bonus",
      "version": 3
    },
    "language": "pt",
    "reference": "crm-43",
    "text": "Olá Bruno! Seu bônus BONUS10 já está ativo.",
    "text_masked": false,
    "segments": 1,
    "encoding": null,
    "price": {
      "amount": "0.062500",
      "currency": "USD"
    },
    "error": {
      "code": "no_whatsapp",
      "text": "The number does not use WhatsApp"
    },
    "test": false,
    "campaign": null,
    "created_at": "2026-11-02T12:00:00+00:00",
    "updated_at": "2026-11-02T12:00:02+00:00"
  }
}

Objects ​

Message object ​

FieldTypeDescription
idstringThe message, msg_….
statusstringOne of: accepted, queued, submitted, sent, delivered, read, rejected, failed, expired, cancelled.
tostringThe number in E.164.
fromstring, nullableThe sender name of an SMS; null for WhatsApp (its number is not shown) and for a test SMS.
countrystringISO 3166-1 alpha-2 of the number.
channelstringOne of: whatsapp, sms.
templateobject, nullableThe template and the number of the version the message was sent with; null for an own SMS text.
template.namestring
template.versioninteger
languagestring, nullableThe language of the template; null for an own SMS text.
referencestring, nullableYour own id of the message, as you sent it.
textstring, nullableThe text as sent; null once it is past its retention period (90 days, text_masked).
text_maskedbooleanWhether text was erased after the retention period (90 days).
segmentsintegerThe parts the SMS is sent and priced in (its price is the price of a segment times them); 1 for WhatsApp.
encodingstring, nullableThe encoding of the SMS: gsm7 (160 characters, 153 a segment of a longer text) or ucs2 (70, 67); null for WhatsApp. One of: gsm7, ucs2.
priceobject, nullableThe price fixed at acceptance, in the currency of the account; for an SMS, the price of a segment times segments. Null for a test message.
price.amountstring
price.currencystring
errorobject, nullableWhy the message did not reach the recipient: a stable code and a text in the language of Accept-Language. Null while it is on its way or when delivered.
error.codestring
error.textstring
testbooleanSent with a test key: through the sandbox, free.
campaignobject, nullableThe console campaign that sent the message; null for a message of the API.
campaign.idstring
campaign.namestring
created_atstringWhen the message was accepted.
updated_atstringWhen the message last changed.

Headers ​

HeaderDescription
webhook-idThe delivery, whd_…. The same on every attempt of one delivery: use it to drop a repeated delivery.
webhook-timestampUnix time of the attempt, in seconds. Refuse deliveries older than 5 minutes.
webhook-signaturev1, and the base64 HMAC-SHA256 of {webhook-id}.{webhook-timestamp}.{body}, keyed with the secret (the part after whsec_, base64-decoded).
content-typeapplication/json
user-agentACE-SEND-Webhooks/1

Check the signature before you trust the body, answer 2xx within 5 seconds and do the work afterwards. See Webhooks for the signature check, retries and duplicates.

ACE SEND API v1