> ## Documentation Index
> Fetch the complete documentation index at: https://docs.heyy.io/llms.txt
> Use this file to discover all available pages before exploring further.

# message.updated

> Occurs when an existing message changes, such as a delivery status update.

export const MessageWebhookPayloadFields = () => <>
<ResponseField name="id" type="string" required>
  Unique identifier for this webhook payload delivery.
</ResponseField>

<ResponseField name="tenantId" type="string" required>
  The tenant that triggered this webhook event.
</ResponseField>

<ResponseField name="event" type="&quot;message.received&quot; | &quot;message.sent&quot; | &quot;message.updated&quot;" required>
  The event type for this webhook payload.
</ResponseField>

<ResponseField name="data" type="Message" required>
  The message object associated with the event.
  <Expandable title="properties">

<ResponseField name="id" type="string" required>
  Message id.
</ResponseField>

<ResponseField name="createdAt" type="string" required>
  ISO datetime when the message was created.
</ResponseField>

<ResponseField name="updatedAt" type="string" required>
  ISO datetime when the message was last updated.
</ResponseField>

<ResponseField name="chatId" type="string" required>
  Chat id this message belongs to.
</ResponseField>

<ResponseField name="channelId" type="string" required>
  Channel id this message belongs to.
</ResponseField>

<ResponseField name="type" type="&quot;message&quot;" required>
  Message type.
</ResponseField>

<ResponseField name="sender" type="&quot;outbound&quot; | &quot;inbound&quot; | &quot;unknown&quot; | &quot;system&quot;" required>
  Who sent the message.
</ResponseField>

<ResponseField name="sources" type="MessageSource[]" required>
  Provenance for the message (where it originated).
  <Expandable title="items">

<ResponseField name="type" type="&quot;campaign&quot; | &quot;automation&quot; | &quot;inbox&quot; | &quot;vendor&quot; | &quot;api&quot; | &quot;ai_agent&quot; | &quot;system&quot;" required>
  The source type.
</ResponseField>

<ResponseField name="campaignExecutionId" type="string">
  Present when `type` is `"campaign"`.
</ResponseField>

<ResponseField name="automationActionExecutionId" type="string">
  Present when `type` is `"automation"`.
</ResponseField>

<ResponseField name="userId" type="string">
  Present when `type` is `"inbox"`.
</ResponseField>

<ResponseField name="apiKeyId" type="string">
  Present when `type` is `"api"`.
</ResponseField>

<ResponseField name="aiAgentId" type="string">
  Present when `type` is `"ai_agent"`.
</ResponseField>

  </Expandable>
</ResponseField>

<ResponseField name="status" type="&quot;none&quot; | &quot;pending&quot; | &quot;sent&quot; | &quot;delivered&quot; | &quot;read&quot; | &quot;scheduled&quot; | &quot;deleted&quot; | &quot;failed&quot;" required>
  Message delivery status.
</ResponseField>

<ResponseField name="scheduledAt" type="string | null" required>
  Scheduled send time (ISO datetime) if scheduled; otherwise `null`.
</ResponseField>

<ResponseField name="content" type="object" required>
  Message content.
  <Expandable title="properties">

<ResponseField name="body" type="string | null">
  Text body of the message (if present).
</ResponseField>

<ResponseField name="attachments" type="MessageAttachment[]">
  Attachments for the message (if present).
  <Expandable title="items">

<ResponseField name="id" type="string" required>
  Attachment id.
</ResponseField>

<ResponseField name="type" type="&quot;image&quot; | &quot;video&quot; | &quot;document&quot; | &quot;audio&quot; | &quot;location&quot; | &quot;contact&quot; | &quot;button&quot; | &quot;list_section&quot; | &quot;quick_reply&quot; | &quot;comment&quot; | &quot;ai_tool_call&quot; | &quot;referral&quot; | &quot;content_reference&quot;" required>
  Attachment type discriminator.
</ResponseField>

<ResponseField name="file" type="File | null">
  Present for media attachments (`image`, `video`, `document`, `audio`) when available.
  <Expandable title="properties">
    <ResponseField name="id" type="string">
      File id.
    </ResponseField>

    <ResponseField name="createdAt" type="string">
      File created timestamp.
    </ResponseField>

    <ResponseField name="type" type="&quot;image&quot; | &quot;video&quot; | &quot;audio&quot; | &quot;document&quot;">
      File type.
    </ResponseField>

    <ResponseField name="name" type="string">
      File name.
    </ResponseField>

    <ResponseField name="contentType" type="string">
      MIME type.
    </ResponseField>

    <ResponseField name="url" type="string">
      Download URL.
    </ResponseField>

    <ResponseField name="size" type="number">
      File size in bytes.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="isVoice" type="boolean">
  Present for `audio` attachments; indicates a voice note.
</ResponseField>

<ResponseField name="latitude" type="number | null">
  Present for `location` attachments.
</ResponseField>

<ResponseField name="longitude" type="number | null">
  Present for `location` attachments.
</ResponseField>

<ResponseField name="name" type="string | null">
  Present for `location` attachments.
</ResponseField>

<ResponseField name="address" type="string | null">
  Present for `location` attachments.
</ResponseField>

<ResponseField name="addresses" type="object[]">
  Present for `contact` attachments.
</ResponseField>

<ResponseField name="emails" type="object[]">
  Present for `contact` attachments.
</ResponseField>

<ResponseField name="name" type="object">
  Present for `contact` attachments.
</ResponseField>

<ResponseField name="org" type="object">
  Present for `contact` attachments.
</ResponseField>

<ResponseField name="phones" type="object[]">
  Present for `contact` attachments.
</ResponseField>

<ResponseField name="urls" type="object[]">
  Present for `contact` attachments.
</ResponseField>

<ResponseField name="buttonType" type="&quot;quick_reply&quot; | &quot;url&quot; | &quot;phone_number&quot; | &quot;list_title&quot;">
  Present for `button` attachments.
</ResponseField>

<ResponseField name="text" type="string | null">
  Present for `button` and `list_section` attachments.
</ResponseField>

<ResponseField name="data" type="object | null">
  Present for `button` attachments when available.
  <Expandable title="properties">
    <ResponseField name="type" type="&quot;phone_number&quot; | &quot;static_url&quot; | &quot;dynamic_url&quot;">
      Present for `button` attachments.
    </ResponseField>

    <ResponseField name="phoneNumber" type="string">
      Present for `button` attachments with `data.type = "phone_number"`.
    </ResponseField>

    <ResponseField name="url" type="string">
      Present for `button` attachments with a URL.
    </ResponseField>

    <ResponseField name="urlExtension" type="string">
      Present for `button` attachments with `data.type = "dynamic_url"`.
    </ResponseField>

  </Expandable>
</ResponseField>

<ResponseField name="payload" type="string | null">
  Present for `button` attachments and for `quick_reply` attachments.
</ResponseField>

<ResponseField name="title" type="string | null">
  Present for `list_section` attachments.
</ResponseField>

<ResponseField name="rows" type="object[]">
  Present for `list_section` attachments.
</ResponseField>

<ResponseField name="rows[].id" type="string">
  Present for `list_section` attachments.
</ResponseField>

<ResponseField name="rows[].title" type="string">
  Present for `list_section` attachments.
</ResponseField>

<ResponseField name="rows[].description" type="string | null">
  Present for `list_section` attachments.
</ResponseField>

<ResponseField name="toolCallId" type="string">
  Present for `ai_tool_call` attachments.
</ResponseField>

<ResponseField name="toolName" type="string">
  Present for `ai_tool_call` attachments.
</ResponseField>

<ResponseField name="input" type="any">
  Present for `ai_tool_call` attachments.
</ResponseField>

<ResponseField name="output" type="any">
  Present for `ai_tool_call` attachments.
</ResponseField>

<ResponseField name="providerDetails" type="any">
  Present for `ai_tool_call` attachments.
</ResponseField>

<ResponseField name="source" type="&quot;whatsapp&quot;">
  Present for `referral` attachments.
</ResponseField>

<ResponseField name="sourceUrl" type="string">
  Present for `referral` attachments.
</ResponseField>

<ResponseField name="sourceType" type="string">
  Present for `referral` attachments.
</ResponseField>

<ResponseField name="sourceId" type="string">
  Present for `referral` attachments.
</ResponseField>

<ResponseField name="headline" type="string">
  Present for `referral` attachments.
</ResponseField>

<ResponseField name="body" type="string">
  Present for `referral` attachments.
</ResponseField>

<ResponseField name="mediaType" type="string">
  Present for `referral` attachments.
</ResponseField>

<ResponseField name="imageUrl" type="string">
  Present for `referral` attachments.
</ResponseField>

<ResponseField name="videoUrl" type="string">
  Present for `referral` attachments.
</ResponseField>

<ResponseField name="thumbnailUrl" type="string">
  Present for `referral` attachments.
</ResponseField>

<ResponseField name="ctwaClid" type="string">
  Present for `referral` attachments.
</ResponseField>

<ResponseField name="contentType" type="&quot;story&quot;">
  Present for `content_reference` attachments.
</ResponseField>

<ResponseField name="url" type="string">
  Present for `content_reference` attachments.
</ResponseField>

<ResponseField name="externalId" type="string">
  Present for `content_reference` attachments.
</ResponseField>

  </Expandable>
</ResponseField>

<ResponseField name="header" type="string | null">
  Optional header text (if present).
</ResponseField>

<ResponseField name="footer" type="string | null">
  Optional footer text (if present).
</ResponseField>

<ResponseField name="payload" type="string">
  Optional payload (e.g. interactive response payload) if present.
</ResponseField>

  </Expandable>
</ResponseField>

<ResponseField name="forwarded" type="boolean" required>
  Whether the message was forwarded.
</ResponseField>

<ResponseField name="replyTo" type="MessagePreview">
  Present when the message is a reply to another message.
  <Expandable title="properties">
    <ResponseField name="id" type="string" required>
      Replied-to message id.
    </ResponseField>

    <ResponseField name="vendorId" type="string | null" required>
      Vendor message id (if available).
    </ResponseField>

    <ResponseField name="sender" type="&quot;outbound&quot; | &quot;inbound&quot; | &quot;unknown&quot; | &quot;system&quot;" required>
      Sender of the replied-to message.
    </ResponseField>

    <ResponseField name="type" type="&quot;text&quot; | &quot;media&quot; | &quot;audio&quot; | &quot;location&quot; | &quot;contact&quot;" required>
      Preview type.
    </ResponseField>

    <ResponseField name="timestamp" type="string" required>
      Timestamp of the replied-to message.
    </ResponseField>

    <ResponseField name="text" type="string | null" required>
      Preview text (if applicable).
    </ResponseField>

  </Expandable>
</ResponseField>

<ResponseField name="reactions" type="object[]" required>
  Message reactions.
  <Expandable title="items">
    <ResponseField name="sender" type="&quot;outbound&quot; | &quot;inbound&quot; | &quot;unknown&quot; | &quot;system&quot;" required>
      Reaction sender.
    </ResponseField>

    <ResponseField name="userId" type="string">
      Present for inbox/user reactions.
    </ResponseField>

    <ResponseField name="text" type="string" required>
      Reaction text/emoji.
    </ResponseField>

    <ResponseField name="timestamp" type="string" required>
      Reaction timestamp.
    </ResponseField>

  </Expandable>
</ResponseField>

<ResponseField name="errors" type="object[]" required>
  Errors associated with this message (if any).
  <Expandable title="items">
    <ResponseField name="messageKey" type="string" required>
      Machine-readable error key.
    </ResponseField>

    <ResponseField name="message" type="string" required>
      Human-readable error message.
    </ResponseField>

    <ResponseField name="vendorError" type="object">
      Vendor-specific error details (if provided).
      <Expandable title="properties">
        <ResponseField name="code" type="number | null">
          Vendor error code.
        </ResponseField>

        <ResponseField name="title" type="string | null">
          Vendor error title.
        </ResponseField>

        <ResponseField name="type" type="string | null">
          Vendor error type.
        </ResponseField>

        <ResponseField name="message" type="string | null">
          Vendor error message.
        </ResponseField>

        <ResponseField name="errorData" type="object">
          Vendor error data payload.
          <Expandable title="properties">
            <ResponseField name="messagingProduct" type="string">
              Vendor messaging product (if present).
            </ResponseField>

            <ResponseField name="details" type="string">
              Vendor error details (if present).
            </ResponseField>
          </Expandable>
        </ResponseField>

        <ResponseField name="fbtraceId" type="string | null">
          Vendor trace id (if present).
        </ResponseField>
      </Expandable>
    </ResponseField>

  </Expandable>
</ResponseField>

<ResponseField name="history" type="object[]" required>
  Status transition history entries.
  <Expandable title="items">
    <ResponseField name="event" type="&quot;status_update&quot;" required>
      History event type.
    </ResponseField>

    <ResponseField name="newStatus" type="&quot;none&quot; | &quot;pending&quot; | &quot;sent&quot; | &quot;delivered&quot; | &quot;read&quot; | &quot;scheduled&quot; | &quot;deleted&quot; | &quot;failed&quot;" required>
      New status after the update.
    </ResponseField>

    <ResponseField name="timestamp" type="string" required>
      Status update timestamp.
    </ResponseField>

  </Expandable>
</ResponseField>

<ResponseField name="vendorId" type="string | null" required>
  Vendor message id (if available).
</ResponseField>

<ResponseField name="timestamp" type="string" required>
  Message timestamp (ISO datetime).
</ResponseField>

<ResponseField name="vendorDetails" type="object | null" required>
  Vendor-specific details (if available).
  <Expandable title="properties">

<ResponseField name="whatsapp" type="object">
  WhatsApp vendor details (if available).
  <Expandable title="properties">

<ResponseField name="context" type="object">
  WhatsApp context details (if available).
  <Expandable title="properties">

<ResponseField name="frequentlyForwarded" type="boolean">
  Whether WhatsApp marks this as frequently forwarded.
</ResponseField>

<ResponseField name="referredProduct" type="object">
  Referred product details (if present).
  <Expandable title="properties">

<ResponseField name="catalogId" type="string">
  Catalog id.
</ResponseField>

<ResponseField name="productRetailerId" type="string">
  Product retailer id.
</ResponseField>

  </Expandable>
</ResponseField>

  </Expandable>
</ResponseField>

<ResponseField name="order" type="object">
  WhatsApp order details (if present).
  <Expandable title="properties">

<ResponseField name="catalogId" type="string | null">
  Catalog id (if present).
</ResponseField>

<ResponseField name="productItems" type="object[]">
  Ordered product items (if present).
  <Expandable title="items">

<ResponseField name="productRetailerId" type="string">
  Product retailer id.
</ResponseField>

<ResponseField name="quantity" type="string">
  Quantity.
</ResponseField>

<ResponseField name="itemPrice" type="string">
  Item price.
</ResponseField>

<ResponseField name="currency" type="string">
  Currency.
</ResponseField>

  </Expandable>
</ResponseField>

  </Expandable>
</ResponseField>

  </Expandable>
</ResponseField>

<ResponseField name="instagram" type="object">
  Instagram vendor details (if available).
  <Expandable title="properties">

<ResponseField name="commentId" type="string">
  Instagram comment id (if present).
</ResponseField>

  </Expandable>
</ResponseField>

  </Expandable>
</ResponseField>

<ResponseField name="metadata" type="object | null" required>
  Integration metadata (if present).
  <Expandable title="properties">

<ResponseField name="campaignContactId" type="string">
  Campaign contact id (if present).
</ResponseField>

<ResponseField name="campaignExecutionId" type="string">
  Campaign execution id (if present).
</ResponseField>

  </Expandable>
</ResponseField>

<ResponseField name="isSensitive" type="boolean" required>
  Whether this message is marked sensitive.
</ResponseField>

<ResponseField name="aiGenerationId" type="string | null" required>
  AI generation id (if the message was generated by AI); otherwise `null`.
</ResponseField>

<ResponseField name="chat" type="object" required>
  The chat this message belongs to.
  <Expandable title="properties">
    <ResponseField name="id" type="string" required>
      Chat id.
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="handle" type="object" required>
  The contact handle (identity) used for this chat.
  <Expandable title="properties">
    <ResponseField name="id" type="string" required>
      Handle id.
    </ResponseField>

    <ResponseField name="type" type="&quot;phone_number&quot; | &quot;email&quot; | &quot;instagram&quot; | &quot;messenger&quot; | &quot;live_chat&quot;" required>
      Handle type.
    </ResponseField>

    <ResponseField name="value" type="string" required>
      Handle value (for example, a phone number in E.164 format, an email address, an Instagram id etc.).
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="contact" type="object" required>
  The contact associated with the message.
  <Expandable title="properties">
    <ResponseField name="id" type="string" required>
      Contact id.
    </ResponseField>

    <ResponseField name="firstName" type="string">
      Contact first name (if present).
    </ResponseField>

    <ResponseField name="lastName" type="string">
      Contact last name (if present).
    </ResponseField>

    <ResponseField name="phoneNumber" type="string | null">
      Contact phone number (if present).
    </ResponseField>

    <ResponseField name="email" type="string | null">
      Contact email (if present).
    </ResponseField>
  </Expandable>
</ResponseField>

<ResponseField name="channel" type="object" required>
  The channel this message was sent/received on.
  <Expandable title="properties">
    <ResponseField name="id" type="string" required>
      Channel id.
    </ResponseField>

    <ResponseField name="type" type="&quot;whatsapp&quot;" required>
      Channel type.
    </ResponseField>

    <ResponseField name="name" type="string" required>
      Channel display name.
    </ResponseField>
  </Expandable>
</ResponseField>

  </Expandable>
</ResponseField>

  </>;

Event triggered when an **existing message changes** — most commonly delivery status transitions like `sent` → `delivered` → `read`.

## Payload fields

<MessageWebhookPayloadFields />

<ResponseExample>
  ```json theme={null}
  {
    "id": "c9d0e1f2-a3b4-4c5d-6e7f-8a9b0c1d2e3f",
    "tenantId": "a98d0e1f2-a1b4-4c4d-6e7f-8a9b0c1d2e3f",
    "event": "message.updated",
    "data": {
      "id": "d0e1f2a3-b4c5-4d6e-7f8a-9b0c1d2e3f4a",
      "type": "message",
      "sender": "outbound",
      "sources": [
        {
          "type": "inbox",
          "userId": "a3b4c5d6-e7f8-4a9b-0c1d-2e3f4a5b6c7d"
        }
      ],
      "status": "delivered",
      "scheduledAt": null,
      "content": {
        "body": "Hello world"
      },
      "forwarded": false,
      "reactions": [],
      "errors": [],
      "history": [
        {
          "event": "status_update",
          "newStatus": "pending",
          "timestamp": "2026-03-13T23:26:57.275Z"
        },
        {
          "event": "status_update",
          "newStatus": "sent",
          "timestamp": "2026-03-13T23:26:58.000Z"
        },
        {
          "event": "status_update",
          "newStatus": "delivered",
          "timestamp": "2026-03-13T23:26:58.000Z"
        }
      ],
      "vendorId": "a1f2e3d4-c5b6-4a97-8e8f-0d1c2b3a4e5f",
      "timestamp": "2026-03-13T23:26:57.275Z",
      "vendorDetails": null,
      "isSensitive": false,
      "aiGenerationId": null,
      "metadata": {},
      "chat": {
        "id": "5f3700cd-a5cf-4b2b-be5a-23b013025c11"
      },
      "handle": {
        "id": "1a9559d7-3c53-4cd5-a076-962193b206e9",
        "type": "phone_number",
        "value": "+12135550123"
      },
      "contact": {
        "id": "259c9fec-c831-41ad-8a43-3fdad389d015",
        "firstName": "John",
        "lastName": "Doe",
        "phoneNumber": "+12135550123",
        "email": "john@example.com"
      },
      "channel": {
        "id": "h9dd4c3e-b049-4903-b047-e2717f1e88e3",
        "type": "whatsapp",
        "name": "Examply"
      }
    }
  }
  ```
</ResponseExample>
