> ## 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.

# sms.inbound.received

> Occurs when an SMS inbound message is received, which means a user replies to your message.

Use `sms.inbound.received` to handle this event at your webhook endpoint.

## Triggers

Occurs when an SMS inbound message is received, which means a user replies to your message.

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

## 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": "sms.inbound.received",
  "apiVersion": "<API_VERSION>",
  "createTime": "<CREATE_TIME>",
  "smsInbound": {
    "id": "<ID>",
    "from": "<FROM>",
    "to": "<TO>",
    "text": "<TEXT>",
    "sendTime": "<SEND_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 `sms.inbound.received`. |
| `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 |
| - | - | - | - |
| `smsInbound` | object | No | Event-specific `smsInbound` 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.

#### smsInbound

| Parameter | Type | Required | Description |
| - | - | - | - |
| `id` | string | No | Unique ID of the message. |
| `from` | string | No | The user's phone number who sent the message to your registered sender ID, formatted in [E.164](https://en.wikipedia.org/wiki/E.164) format. |
| `to` | string | No | The receiver's phone number, which is one of your registered Sender IDs. |
| `text` | string | No | The text of this message. |
| `sendTime` | string (date-time) | No | The time at which this message was sent, formatted in [RFC 3339](https://datatracker.ietf.org/doc/html/rfc3339). e.g., `2022-06-01T12:00:00.000Z`. |

## Example

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

```json theme={"theme":{"light":"github-light","dark":"github-dark"}}
{
  "id": "evt_example_sms_inbound_received",
  "type": "sms.inbound.received",
  "apiVersion": "v2",
  "createTime": "2026-05-26T12:00:00.000Z",
  "smsInbound": {
    "id": "sms_inbound_12345678",
    "from": "+12025550124",
    "to": "+12025550123",
    "text": "Please send the order details.",
    "sendTime": "2026-05-26T11:59: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
```

For scenario walkthroughs, see [annotated examples](https://docs.ycloud.com/en/api-reference/guides/examples/webhook-examples/whatsapp-inbound-message-webhook-examples).


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