All webhooks
Messages
Message updated
message.updatedFires when a message is edited. Carries both the new and the previous content along with the actor who made the edit — a user (operator) or the contact (e.g. a WhatsApp message edit). new_content and previous_content can be either a plain string or a structured object like {"text": "..."} depending on the message source.
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.updated",
"event_id": "evt_01JXXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2026-03-26T12:00:00.000000Z",
"company_id": 1,
"data": {
"message_id": 123,
"conversation_id": 45,
"channel_id": 2,
"edit": {
"new_content": "Updated message text",
"previous_content": "Original message text",
"actor": {
"type": "user",
"contact_id": null,
"user_id": 3,
"name": "Manager Name"
},
"edited_at": "2026-03-26T12:00:00+00:00"
}
}
}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.updated",
"event_id": "evt_01JXXXXXXXXXXXXXXXXXXXXX",
"timestamp": "2026-03-26T12:00:00.000000Z",
"company_id": 1,
"data": {
"message_id": 123,
"conversation_id": 45,
"channel_id": 2,
"edit": {
"new_content": "Updated message text",
"previous_content": "Original message text",
"actor": {
"type": "user",
"contact_id": null,
"user_id": 3,
"name": "Manager Name"
},
"edited_at": "2026-03-26T12:00:00+00:00"
}
}
}Payload fields
| Field | Type | Description |
|---|---|---|
message_id | integer | Internal message ID |
conversation_id | integer | Conversation ID |
channel_id | integer | Channel ID |
edit.new_content | string|object | New message content after the edit |
edit.previous_content | string|object | Message content before the edit |
edit.actor | object | Who performed the edit |
edit.actor.type | string | user or contact |
edit.actor.contact_id | integer|null | Contact ID (when edited by the contact) |
edit.actor.user_id | integer|null | User ID (when edited by a user) |
edit.actor.name | string | Actor display name |
edit.edited_at | string | ISO 8601 timestamp of the edit |