AISARAISAR
All webhooks

Messages

Message updated

message.updated

Fires 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

FieldTypeDescription
message_idintegerInternal message ID
conversation_idintegerConversation ID
channel_idintegerChannel ID
edit.new_contentstring|objectNew message content after the edit
edit.previous_contentstring|objectMessage content before the edit
edit.actorobjectWho performed the edit
edit.actor.typestringuser or contact
edit.actor.contact_idinteger|nullContact ID (when edited by the contact)
edit.actor.user_idinteger|nullUser ID (when edited by a user)
edit.actor.namestringActor display name
edit.edited_atstringISO 8601 timestamp of the edit