All webhooks
Messages
Message deleted
message.deletedFires when a message is deleted. Includes the actor who deleted it — a user (operator), the contact (e.g. WhatsApp "Delete for Everyone"), or system for bulk deletions triggered by the channel platform — and an optional reason. Use message_id to remove the message from your local state.
HTTP request
AISAR sends a signed POST request to your webhook_url:
http
POST {webhook_url}
Content-Type: application/json
X-AISAR-Signature: sha256=...
{
"event": "message.deleted",
"event_id": "evt_01JXXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2026-03-26T12:00:00.000000Z",
"company_id": 1,
"data": {
"message_id": 123,
"conversation_id": 45,
"channel_id": 2,
"deletion": {
"actor": {
"type": "user",
"contact_id": null,
"user_id": 3,
"name": "Manager Name"
},
"deleted_at": "2026-03-26T12:00:00+00:00",
"reason": null
}
}
}The X-AISAR-Signature header carries an HMAC-SHA256 signature of the request body — use it to verify the request came from AISAR.
Example payload
json
{
"event": "message.deleted",
"event_id": "evt_01JXXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2026-03-26T12:00:00.000000Z",
"company_id": 1,
"data": {
"message_id": 123,
"conversation_id": 45,
"channel_id": 2,
"deletion": {
"actor": {
"type": "user",
"contact_id": null,
"user_id": 3,
"name": "Manager Name"
},
"deleted_at": "2026-03-26T12:00:00+00:00",
"reason": null
}
}
}Payload fields
| Field | Type | Description |
|---|---|---|
message_id | integer | Internal message ID |
conversation_id | integer | Conversation ID |
channel_id | integer | Channel ID |
deletion.actor | object | Who deleted the message |
deletion.actor.type | string | user, contact, or system (bulk deletions triggered by the channel platform) |
deletion.actor.contact_id | integer|null | Contact ID (when deleted by the contact) |
deletion.actor.user_id | integer|null | User ID (when deleted by a user) |
deletion.actor.name | string | Actor display name |
deletion.deleted_at | string | ISO 8601 timestamp of the deletion |
deletion.reason | string|null | Deletion reason (if provided by the user) |