Events
message.refused
# message.refused
A message of the workspace will not go: the checks did not let it through, for example with no consent from the customer or the window closed, or a person dismissed the draft or a newer one replaced it. `data` is the whole message as `GET /v1/messages/{id}` returns it, the reason in `error`. For a send through the API the same reason also comes in the response to the request.
`data` is the [message object](https://airbox.kz/en/docs/api/messages#the-message-object).
```json
{
"type": "message.refused",
"timestamp": "2026-10-09T09:30:00+00:00",
"workspace": {
"id": "0199c5e2-0d4b-7e21-a3f6-8c2b1e7d9a40",
"name": "Smile Clinic"
},
"data": {
"id": "0199c5e2-7b3a-7c51-9f0e-3a1d2b4c5e6f",
"to": "+77011234567",
"contact_id": "0199c5e2-1f0a-7a42-8d1e-5b7c9a2e4f10",
"channel": "whatsapp",
"type": "text",
"text": {
"body": "Hello! Your order #1042 is ready, and you can pick it up today until 8 pm."
},
"status": "refused",
"error": {
"code": "no_consent",
"message": "The customer has not agreed to hear from you. Once they agree, record it with POST /v1/contacts/{phone}/consent."
},
"sent_by": "api",
"created_at": "2026-10-09T09:30:00+00:00",
"sent_at": null,
"delivered_at": null,
"read_at": null
}
}
```
Updated 4 December 2026
A message of the workspace will not go: the checks did not let it through, for example with no consent from the customer or the window closed, or a person dismissed the draft or a newer one replaced it. data is the whole message as GET /v1/messages/{id} returns it, the reason in error. For a send through the API the same reason also comes in the response to the request.
data is the message object.
JSON
{
"type": "message.refused",
"timestamp": "2026-10-09T09:30:00+00:00",
"workspace": {
"id": "0199c5e2-0d4b-7e21-a3f6-8c2b1e7d9a40",
"name": "Smile Clinic"
},
"data": {
"id": "0199c5e2-7b3a-7c51-9f0e-3a1d2b4c5e6f",
"to": "+77011234567",
"contact_id": "0199c5e2-1f0a-7a42-8d1e-5b7c9a2e4f10",
"channel": "whatsapp",
"type": "text",
"text": {
"body": "Hello! Your order #1042 is ready, and you can pick it up today until 8 pm."
},
"status": "refused",
"error": {
"code": "no_consent",
"message": "The customer has not agreed to hear from you. Once they agree, record it with POST /v1/contacts/{phone}/consent."
},
"sent_by": "api",
"created_at": "2026-10-09T09:30:00+00:00",
"sent_at": null,
"delivered_at": null,
"read_at": null
}
}