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

# messenger.inbound_message.updated

> Occurs when a customer edits a saved Messenger inbound text message.

Use `messenger.inbound_message.updated` to handle this event at your webhook endpoint.

## Triggers

Occurs when a customer edits a saved Messenger inbound text message.

Subscribe to `messenger.inbound_message.updated` when you [configure your webhook endpoint](https://docs.ycloud.com/en/api-reference/guides/api-fundamentals/configure-webhooks.md).

An edit keeps the same message IDs, `sendTime`, and original message `createTime`. The event envelope’s `createTime` is the edit time. Use `editCount` and `editTime` to track cumulative edit facts.

## Syntax

YCloud sends an HTTP `POST` request to your configured webhook URL. The following shape shows one payload variant. Angle-bracket values are placeholders; their types are listed under **Parameters**. Optional fields and other variants are described below.

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "<ID>",
  "type": "messenger.inbound_message.updated",
  "apiVersion": "<API_VERSION>",
  "createTime": "<CREATE_TIME>",
  "messengerInboundMessage": {
    "id": "<ID>",
    "metaMessageId": "<META_MESSAGE_ID>",
    "from": "<FROM>",
    "to": "<TO>",
    "type": "<TYPE>",
    "text": {
      "body": "<BODY>"
    },
    "sendTime": "<SEND_TIME>",
    "createTime": "<CREATE_TIME>",
    "editCount": "<EDIT_COUNT_VALUE>",
    "editTime": "<EDIT_TIME>"
  }
}
```

## Parameters

Validate the `YCloud-Signature` HTTP header before you process the JSON body. See [signature validation](https://docs.ycloud.com/en/api-reference/guides/api-fundamentals/configure-webhooks.md).

### Event envelope

| Parameter | Type | Required | Description |
| - | - | - | - |
| `id` | string | Yes | Unique ID for the event. Minimum length: `6`. Maximum length: `128`. |
| `type` | string | Yes | Always `messenger.inbound_message.updated`. |
| `apiVersion` | string | Yes | The API version used to render this event. |
| `createTime` | string (date-time) | Yes | The time at which this event was created, formatted in [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339). e.g., `2022-06-01T12:00:00.000Z`. |

### Event payload

| Parameter | Type | Required | Description |
| - | - | - | - |
| `messengerInboundMessage` | object | No | Event-specific `messengerInboundMessage` payload. |

The four common envelope fields are required. Payload fields depend on the event variant. In each object table, **Required** applies when its parent object is present. Optional fields can be omitted; a sample does not make a field required.

#### messengerInboundMessage

| Parameter | Type | Required | Description |
| - | - | - | - |
| `id` | string | Yes | YCloud inbound message ID as a decimal string. |
| `metaMessageId` | string | Yes | Meta message ID. |
| `from` | string | Yes | Customer PSID scoped to the Facebook Page. |
| `to` | string | Yes | Facebook Page ID. |
| `type` | string | Yes | Values: `text`. |
| `text` | object | Yes | Object fields are listed below. |
| `sendTime` | string (date-time) | Yes | Saved source event time in UTC RFC 3339 with millisecond precision. |
| `createTime` | string (date-time) | Yes | Local persistence time in UTC RFC 3339 with millisecond precision. |
| `editCount` | integer | No | Cumulative edit count supplied by Meta. Omitted before the first edit. |
| `editTime` | string (date-time) | No | Saved platform edit time in UTC RFC 3339 with millisecond precision. Omitted before the first edit. |

> [accordion] messengerInboundMessage.text
>
> | Parameter | Type | Required | Description |
> | - | - | - | - |
> | `body` | string | Yes | Nonblank text. Leading and trailing spaces are preserved and included when comparing a repeated request.Minimum length: `1`. |

## Example

The following JSON is the body delivered to your receiver. IDs, phone numbers, and other account values are illustrative.

The same saved message now carries the latest text and cumulative edit facts.

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "evt_cdef0123456789abcdef0123",
  "type": "messenger.inbound_message.updated",
  "apiVersion": "v2",
  "createTime": "2026-10-20T02:01:00.000Z",
  "messengerInboundMessage": {
    "id": "1308528868252065793",
    "metaMessageId": "m_EXAMPLE_IN_001",
    "from": "100800000000000",
    "to": "422500000000000",
    "type": "text",
    "text": {
      "body": "  Hello, corrected  "
    },
    "sendTime": "2026-10-20T02:00:00.000Z",
    "createTime": "2026-10-20T02:00:00.100Z",
    "editCount": 2,
    "editTime": "2026-10-20T02:01:00.000Z"
  }
}
```

After verifying the signature and durably accepting the event, return a `2xx` response. Process slow work asynchronously.

```http theme={"theme":{"light":"github-light","dark":"github-dark"}}
HTTP/1.1 200 OK
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.