

# Messaging Events
<a name="nx-features-messaging-events"></a>

AWS End User Messaging can stream event data for SMS, MMS, and voice message deliveries. Because it can take up to 72 hours to receive events generated by carriers, you should not use them to determine if there is a delay in outbound message delivery. After 72 hours, if AWS End User Messaging has not received a final event from a carrier, the service automatically returns an `UNKNOWN` `messageStatus` as we do not know what happened to that message.

**Topics**
+ [SMS example log](#configuration-sets-event-format-sms-example)
+ [SMS Protect example log](#configuration-sets-event-format-sms-protect-example)
+ [Voice example event log](#configuration-sets-event-format-voice-example)
+ [MMS example log](#configuration-sets-event-format-mms-example)
+ [RCS example log](#configuration-sets-event-format-rcs-example)
+ [Registration status change example](#configuration-sets-event-format-registration-example)

## SMS example log
<a name="configuration-sets-event-format-sms-example"></a>

The JSON object for an SMS event contains the data shown in the following example.

```
{
    "eventType": "TEXT_SUCCESSFUL",
    "eventVersion": "1.0",
    "eventTimestamp": 1686975103470,
    "isFinal": true,
    "originationPhoneNumber": "+12065550152",
    "destinationPhoneNumber": "+14255550156",
    "isInternationalSend": false,
    "mcc": "310",
    "mnc": "800",
    "messageId": "862a8790-60c0-4430-9b2b-658bdexample",
    "messageRequestTimestamp": 1686975103170,
    "messageEncoding": "GSM",
    "messageType": "PROMOTIONAL",
    "messageStatus": "SUCCESSFUL",
    "messageStatusDescription": "Message has been accepted by phone carrier",
    "context": {
        "account": "bar"
    },
    "totalMessageParts": 1,
    "totalMessagePrice": 0.09582,
    "totalCarrierFee": 0.0
}
```



| Attribute | Description | 
| --- | --- | 
| eventType | The type of event. Values are listed in [Event types for SMS, MMS, and voice](configuration-sets-event-types.md) | 
| eventVersion | The version of the event JSON schema. | 
| eventTimestamp | The time when the event was reported, shown as Unix time in milliseconds. | 
| isFinal | True if this is the final status for the message. There are intermediate message statuses and it can take up to 72 hours for the final message status to be received. | 
| originationPhoneNumber | The phone number or RCS agent ID that the message was sent from. For SMS and MMS messages, this value is an E.164 phone number or short code. For RCS messages delivered natively via RCS, this value is the RCS agent ID. For RCS messages that fell back to SMS, this value is the E.164 phone number or short code used for SMS delivery. If you send messages using the Amazon Pinpoint SendMessages API, the equivalent field in the delivery event is originationNumber. | 
| destinationPhoneNumber | The phone number that you attempted to send the message to. | 
| isInternationalSend | True if international messaging is enabled for this phone number. | 
| isoCountryCode | The country that's associated with the recipient's phone number, shown in ISO 3166-1 alpha-2 format. | 
| mcc | Mobile Country Codes identifies the country which a phone number belongs to. This field is optional and may not be present. | 
| mnc | Mobile Network Codes identifies a mobile network operator. This field is optional and may not be present. | 
| messageId | The unique ID that AWS End User Messaging generates when it accepts the message. | 
| messageRequestTimestamp | The time when the SMS message request was received, shown as Unix time in milliseconds. | 
| messageEncoding | The encoding of the message. Possible values are GSM and Unicode. For more information on message encoding, see the SMS character limits. | 
| messageType | The type of message. Possible values are Promotional and Transactional. | 
| messageStatus | The status of the message. Possible values are:+  **SUCCESSFUL** – The message has been accepted by the phone carrier. <br />+  **DELIVERED** – The message has been accepted by the recipient's device. <br />+  **PENDING** – The message hasn't yet been delivered to the recipient's device. <br />+  **INVALID** – The destination phone number is invalid. <br />+  **UNREACHABLE** – The recipient's device is currently unreachable or unavailable. For example, the device might be powered off, or might be disconnected from the network. You can try to send the message again later. <br />+  **UNKNOWN** – An error occurred that prevented the delivery of the message. This error is usually transient, and you can attempt to send the message again later. <br />+  **BLOCKED** – The recipient's device is blocking SMS messages from the originator phone number. <br />+  **CARRIER\_UNREACHABLE** – An issue with the mobile network of the recipient prevented the message from being delivered. This error is usually transient, and you can attempt to send the message again later. <br />+  **SPAM** – The recipient's mobile carrier identified the contents of the message as spam and blocked delivery of the message. <br />+  **INVALID\_MESSAGE** – The body of the SMS message is invalid and can't be delivered. <br />+  **CARRIER\_BLOCKED **– The recipient's carrier has blocked delivery of this message. This often occurs when the carrier identifies the contents of the message as unsolicited or malicious. <br />+  **TTL\_EXPIRED** – The SMS message couldn't be delivered within a certain time frame. This error is usually transient, and you can attempt to send the message again later. <br />+  **ACCEPTED** – The SMS message was accepted. <br />+  **FAILED** – The SMS message failed to be delivered to the recipient's device. <br />+  **SENT** – The message has been sent but not delivered to the recipient's device. <br />+  **UNROUTABLE** – Not able to route due to a bad account configuration. <br />+  **QUEUED** – The message is queued for delivery. <br />+  **PROTECT\_BLOCKED** – The SMS message was blocked by SMS Protect Rules.  | 
| messageStatusDescription | A description of the message status. | 
| context | Custom attributes you can specify and will be logged, when you send a message. | 
| totalMessageParts | The number of message parts that AWS End User Messaging created to send the message.<br />Generally, SMS messages can contain only 160 GSM-7 characters or 67 non-GSM characters, although these limits can vary by country . If you send a message that exceeds these limits, AWS End User Messaging automatically splits the message into smaller parts. We bill you based on the number of message parts that you send. For more information on message parts, see the message parts information. | 
| totalMessagePrice | The amount that we charged you to send the message. This price is shown in thousandths of a United States cent. For example, if the value of this attribute is 645, then we charged you 0.645¢ to send the message (645 / 1000 = 0.645¢ = $0.00645). | 
| totalCarrierFee | The total cost of carrier fees for a message. | 

## SMS Protect example log
<a name="configuration-sets-event-format-sms-protect-example"></a>

The JSON object for a SMS event when using [SMS Protect](nx-features-sms-protect.md) contains the data shown in the following example.

```
{
    "eventType": "TEXT_PROTECT_BLOCKED",
    "eventVersion": "1.0",
    "eventTimestamp": 1686975103470,
    "isFinal": true,
    "originationPhoneNumber": "+12065550152",
    "destinationPhoneNumber": "+14255550156",
    "isoCountryCode": "US",
    "mcc": "310",
    "mnc": "800",
    "messageId": "862a8790-60c0-4430-9b2b-658bdexample",
    "messageRequestTimestamp": 1686975103170,
    "messageEncoding": "GSM",
    "messageType": "PROMOTIONAL",
    "messageStatus": "PROTECT_BLOCKED",
    "messageStatusDescription": "Message blocked by protect configuration",
    "context": {
        "account": "bar"
    },
    "totalMessageParts": 1,
    "totalMessagePrice": 0,
    "totalCarrierFee": 0, 
    "protectConfiguration": {  
        "protectConfigurationId": "protect-d777777777777771bbd5d59f4d903479", 
        "protectStatus": "FILTER" 
    }, 
    "protectConfigurationAssessment": { 
        "protectRecommendation": "BLOCK"
         "protectInsights": { 
            "blockReason": "AIT_SUSPECTED" 
         }
         
    }
}
```



| Attribute | Description | 
| --- | --- | 
| eventType | The type of event. Values are listed in [Event types for SMS, MMS, and voice](configuration-sets-event-types.md) | 
| eventVersion | The version of the event JSON schema. | 
| eventTimestamp | The time when the event was reported, shown as Unix time in milliseconds. | 
| isFinal | True if this is the final status for the message. There are intermediate message statuses and it can take up to 72 hours for the final message status to be received. | 
| originationPhoneNumber | The phone number that the message was sent from. | 
| destinationPhoneNumber | The phone number that you attempted to send the message to. | 
| isoCountryCode | The country that's associated with the recipient's phone number, shown in ISO 3166-1 alpha-2 format. | 
| mcc | Mobile Country Codes identifies the country which a phone number belongs to. This field is optional and may not be present. | 
| mnc | Mobile Network Codes identifies a mobile network operator. This field is optional and may not be present. | 
| messageId | The unique ID that AWS End User Messaging generates when it accepts the message. | 
| messageRequestTimestamp | The time when the SMS message request was received, shown as Unix time in milliseconds. | 
| messageEncoding | The encoding of the message. Possible values are GSM and Unicode. For more information on message encoding, see the SMS character limits. | 
| messageType | The type of message. Possible values are Promotional and Transactional. | 
| messageStatus | The status of the message. Possible values are:+  **SUCCESSFUL** – The message has been accepted by the phone carrier. <br />+  **DELIVERED** – The message has been accepted by the recipient's device. <br />+  **PENDING** – The message hasn't yet been delivered to the recipient's device. <br />+  **INVALID** – The destination phone number is invalid. <br />+  **UNREACHABLE** – The recipient's device is currently unreachable or unavailable. For example, the device might be powered off, or might be disconnected from the network. You can try to send the message again later. <br />+  **UNKNOWN** – An error occurred that prevented the delivery of the message. This error is usually transient, and you can attempt to send the message again later. <br />+  **BLOCKED** – The recipient's device is blocking SMS messages from the originator phone number. <br />+  **CARRIER\_UNREACHABLE** – An issue with the mobile network of the recipient prevented the message from being delivered. This error is usually transient, and you can attempt to send the message again later. <br />+  **SPAM** – The recipient's mobile carrier identified the contents of the message as spam and blocked delivery of the message. <br />+  **INVALID\_MESSAGE** – The body of the SMS message is invalid and can't be delivered. <br />+  **CARRIER\_BLOCKED **– The recipient's carrier has blocked delivery of this message. This often occurs when the carrier identifies the contents of the message as unsolicited or malicious. <br />+  **TTL\_EXPIRED** – The SMS message couldn't be delivered within a certain time frame. This error is usually transient, and you can attempt to send the message again later. <br />+  **ACCEPTED** – The SMS message was accepted. <br />+  **FAILED** – The SMS message failed to be delivered to the recipient's device. <br />+  **SENT** – The message has been sent but not delivered to the recipient's device. <br />+  **UNROUTABLE** – Not able to route due to a bad account configuration. <br />+  **QUEUED** – The message is queued for delivery. <br />+  **PROTECT\_BLOCKED** – The SMS message was blocked by SMS Protect Rules.  | 
| messageStatusDescription | A description of the message status. | 
| context | Custom attributes you can specify and will be logged, when you send a message. | 
| totalMessageParts | The number of message parts that AWS End User Messaging created to send the message.<br />Generally, SMS messages can contain only 160 GSM-7 characters or 67 non-GSM characters, although these limits can vary by country . If you send a message that exceeds these limits, AWS End User Messaging automatically splits the message into smaller parts. We bill you based on the number of message parts that you send. For more information on message parts, see the message parts information. | 
| totalMessagePrice | The amount that we charged you to send the message. This price is shown in thousandths of a United States cent. For example, if the value of this attribute is 645, then we charged you 0.645¢ to send the message (645 / 1000 = 0.645¢ = $0.00645). | 
| totalCarrierFee | The total cost of carrier fees for a message. | 
| protectConfiguration | The Id of the protect configuration that was used when sending the message and the status the destination country was in at the time. For more information on SMS Protect, see [SMS Protect](nx-features-sms-protect.md). | 
| protectConfigurationAssessment | An assessment of whether SMS Protect thinks your message should be Allowed or Blocked from sending and the blocking reasons when available. | 

## Voice example event log
<a name="configuration-sets-event-format-voice-example"></a>

The JSON object for a Voice event contains the data shown in the following example.

```
{
    "eventType": "VOICE_COMPLETED",
    "eventVersion": "1.0",
    "eventTimestamp": 1697835373500,
    "isFinal": true,
    "originationPhoneNumber": "+12065550153",
    "destinationPhoneNumber": "+14255550159",
    "isoCountryCode": "US",
    "messageId": "567f6c11-6e8b-4352-9749-a42a0example",
    "messageRequestTimestamp": 1697835372720,
    "messageStatus": "COMPLETED",
    "callDurationInSeconds": 60,
    "totalDurationInMinutes": 1,
    "totalMessagePrice": 0.013,
    "context": {
        "account": "bar"
    }
}
```



| Attribute | Description | 
| --- | --- | 
| eventType | The type of event. Values are listed in [Event types for SMS, MMS, and voice](configuration-sets-event-types.md) | 
| eventVersion | The version of the event JSON schema. | 
| eventTimestamp | The time when the event was reported, shown as Unix time in milliseconds. | 
| isFinal | True if this is the final status for the message. There are intermediate message statuses. | 
| originationPhoneNumber | The phone number that the message was sent from. | 
| destinationPhoneNumber | The phone number that you attempted to send the message to. | 
| isoCountryCode | The country that's associated with the recipient's phone number, shown in ISO 3166-1 alpha-2 format. | 
| messageId | The unique ID that AWS End User Messaging generates when it accepts the message. | 
| messageRequestTimestamp | The time when the SMS message request was received, shown as Unix time in milliseconds. | 
| messageStatus | The status of the message. Possible values are:+  **INITIATED** – The voice message is ready to start dialing. <br />+  **RINGING** – Ringing events occur after the call has been placed, but before the recipient answers. <br />+  **COMPLETED** – Sends all completed events for voice messages to the specified destination. Completed events occur when the audio message is played to the recipient. This status doesn't necessarily mean that the message was delivered to a human recipient. For example, it could indicate that the message was delivered to a voicemail system. <br />+  **ANSWERED** – Answered events occur when the recipient answers the phone.  <br />+  **COMPLETED** – The call was answered and ended.  <br />+  **BUSY** – Busy events occur when the recipient's phone line is busy. <br />+  **NO\_ANSWER** – No answer events occur after the call has been placed, but the recipient (or their voicemail system) never answer. <br />+  **FAILED** – Failure events occur when the message fails to be delivered. <br />+  **TTL\_EXPIRED** – TTL Expired events occur when the time required to deliver the message exceeds the `TTL` value that you specified when you sent the message. <br />+  **SPAM** – The call was marked as spam and blocked. <br />+  **PROTECT\_BLOCKED** – The SMS message was blocked by SMS Protect Rules.  | 
| callDurationInSeconds | The duration of the call in seconds. | 
| totalDurationInMinutes | The duration of the call in minutes. | 
| totalMessagePrice | The amount that we charged you to send the voice message. This price is shown in thousandths of a United States cent.  | 
| context | Custom attributes you can specify and will be logged, when you send a message. | 

## MMS example log
<a name="configuration-sets-event-format-mms-example"></a>

The JSON object for an MMS event contains the data shown in the following example.

```
{
    "contentType":"MMS",
    "eventType": "MEDIA_DELIVERED",
    "eventVersion": "1.0",
    "eventTimestamp": 1635197695208,
    "isFinal": true,
    "originationPhoneNumber": "+12065550153",
    "destinationPhoneNumber": "+14255550159",
    "isoCountryCode": "US",
    "messageId": "b4a3196d-5b61-4884-a0d9-745acf1f6235example",
    "messageRequestTimestamp": 1635197693241,
    "messageType": "TRANSACTIONAL",
    "messageStatus": "DELIVERED",
    "messageStatusDescription": "Message has been accepted by phone",
    "context": {"foo":"bar"},
    "totalMessageParts": 1,
    "totalMessagePrice": 0.0195,
    "totalCarrierFee": 0.00266
}
```



| Attribute | Description | 
| --- | --- | 
| eventType | The type of event. Values are listed in [Event types for SMS, MMS, and voice](configuration-sets-event-types.md) | 
| eventVersion | The version of the event JSON schema. | 
| eventTimestamp | The time when the event was reported, shown as Unix time in milliseconds. | 
| isFinal | True if this is the final status for the message. There are intermediate message statuses and it can take up to 72 hours for the final message status to be received. | 
| originationPhoneNumber | The phone number that the message was sent from. | 
| destinationPhoneNumber | The phone number that you attempted to send the message to. | 
| isoCountryCode | The country that's associated with the recipient's phone number, shown in ISO 3166-1 alpha-2 format. | 
| messageId | The unique ID that AWS End User Messaging generates when it accepts the message. | 
| messageRequestTimestamp | The time when the SMS message request was received, shown as Unix time in milliseconds. | 
| messageType | The type of message. Possible values are Promotional and Transactional. | 
| messageStatus | The status of the message. Possible values are:+  **SUCCESSFUL** – The message has been accepted by the phone carrier. <br />+  **DELIVERED** – The message has been accepted by the recipient's device. <br />+  **PENDING** – The message hasn't yet been delivered to the recipient's device. <br />+  **INVALID** – The destination phone number is invalid. <br />+  **UNREACHABLE** – The recipient's device is currently unreachable or unavailable. For example, the device might be powered off, or might be disconnected from the network. You can try to send the message again later. <br />+  **UNKNOWN** – An error occurred that prevented the delivery of the message. This error is usually transient, and you can attempt to send the message again later. <br />+  **BLOCKED** – The recipient's device is blocking SMS/MMS messages from the originator phone number. <br />+  **CARRIER\_UNREACHABLE** – An issue with the mobile network of the recipient prevented the message from being delivered. This error is usually transient, and you can attempt to send the message again later. <br />+  **SPAM** – The recipient's mobile carrier identified the contents of the message as spam and blocked delivery of the message. <br />+  **INVALID\_MESSAGE** – The body of the SMS/MMS message is invalid and can't be delivered. <br />+  **CARRIER\_BLOCKED **– The recipient's carrier has blocked delivery of this message. This often occurs when the carrier identifies the contents of the message as unsolicited or malicious. <br />+  **TTL\_EXPIRED** – The SMS message couldn't be delivered within a certain time frame. This error is usually transient, and you can attempt to send the message again later. <br />+  **ACCEPTED** – The SMS message was accepted. <br />+  **FAILED** – The SMS message failed to be delivered to the recipient's device. <br />+  **SENT** – The message has been sent but not delivered to the recipient's device. <br />+  **UNROUTABLE** – Not able to route due to a bad account configuration. <br />+  **QUEUED** – The message is queued for delivery   | 
| messageStatusDescription | A description of the message status. | 
| context | Custom attributes you can specify and will be logged, when you send a message. | 
| totalMessageParts | The number of message parts that AWS End User Messaging created to send the message. For more information on message parts, see the message parts information.<br /> | 
| totalMessagePrice | The amount that we charged you to send the message. This price is shown in thousandths of a United States cent. For example, if the value of this attribute is 645, then we charged you 0.645¢ to send the message (645 / 1000 = 0.645¢ = $0.00645). | 
| totalCarrierFee | The total cost of carrier fees for a message. | 

## RCS example log
<a name="configuration-sets-event-format-rcs-example"></a>

RCS events use an `eventType` of `RCS_DELIVERED`, `RCS_READ`, and the related RCS status event types. Every RCS event also carries an `rcsBusinessId` and an `agentIsoCountryCode` that identify the RCS agent, which SMS and MMS events do not include. The `originationPhoneNumber` field contains the RCS agent ID when the message is delivered natively over RCS, and an E.164 phone number or short code when the message falls back to SMS.

**Delivery event.** A delivered message reports an `eventType` of `RCS_DELIVERED` and a `messageStatus` of `DELIVERED`. Rich RCS messages include billing metadata, where `rcsMetadata.billingEventType` is `RICH`:

```
{
    "eventType": "RCS_DELIVERED",
    "eventVersion": "1.0",
    "eventTimestamp": 1781661267660,
    "isFinal": true,
    "originationPhoneNumber": "rcs-c020de2520714385964ebf7b095c4b60",
    "destinationPhoneNumber": "+13022640220",
    "isoCountryCode": "US",
    "isInternationalSend": false,
    "messageId": "test-sc1-004",
    "messageRequestTimestamp": 1781300397157,
    "messageEncoding": "UNICODE",
    "messageType": "TRANSACTIONAL",
    "messageStatus": "DELIVERED",
    "messageStatusDescription": "Message has been accepted by phone",
    "totalMessageParts": 1,
    "totalMessagePrice": 0.007,
    "totalCarrierFee": 0.00494,
    "rcsMetadata": { "billingEventType": "RICH" },
    "rcsBusinessId": "endusermessagingtesting1_06fr8x6o_agent",
    "agentIsoCountryCode": "US"
}
```

**Read event.** A read receipt reports an `eventType` of `RCS_READ` and a `messageStatus` of `READ`. A `RCS_DELIVERED` event is always sent before or together with the `RCS_READ` event:

```
{
    "eventType": "RCS_READ",
    "eventVersion": "1.0",
    "eventTimestamp": 1781661267203,
    "isFinal": true,
    "originationPhoneNumber": "rcs-c020de2520714385964ebf7b095c4b60",
    "destinationPhoneNumber": "+13022640220",
    "isoCountryCode": "US",
    "isInternationalSend": false,
    "messageId": "test-sc1-004",
    "messageRequestTimestamp": 1781300397157,
    "messageEncoding": "UNICODE",
    "messageType": "TRANSACTIONAL",
    "messageStatus": "READ",
    "messageStatusDescription": "Message has been read by recipient",
    "totalMessageParts": 1,
    "totalMessagePrice": 0.0,
    "totalCarrierFee": 0.0,
    "rcsBusinessId": "endusermessagingtesting1_06fr8x6o_agent",
    "agentIsoCountryCode": "US"
}
```

**Delivery event within a conversation.** When a message is part of an active conversation session, the delivery event adds the conversation fields and reports a `totalMessagePrice` and `totalCarrierFee` of `0.0`, because the one-time `conversationSessionFee` covers the message:

```
{
    "eventType": "RCS_DELIVERED",
    "eventVersion": "1.0",
    "eventTimestamp": 1751234567890,
    "isFinal": true,
    "originationPhoneNumber": "rcs-f4e4252a5abe48bea50a6c176a056124",
    "destinationPhoneNumber": "+14376638816",
    "isoCountryCode": "CA",
    "isInternationalSend": false,
    "messageId": "b4a3196d-5b61-4884-a0d9-745acf1f6235",
    "messageRequestTimestamp": 1751234565000,
    "messageEncoding": "UNICODE",
    "messageType": "TRANSACTIONAL",
    "messageStatus": "DELIVERED",
    "messageStatusDescription": "Message has been accepted by phone",
    "totalMessageParts": 1,
    "totalMessagePrice": 0.0,
    "totalCarrierFee": 0.0,
    "rcsMetadata": { "billingEventType": "BASIC" },
    "rcsBusinessId": "endusermessagingtesting1_06fr8x6o_agent",
    "agentIsoCountryCode": "CA",
    "conversationInitiatingMessageId": "177930985040408106521449",
    "conversationInitiatingMessageType": "OUTBOUND",
    "conversationSessionFee": 0.012
}
```

**CONVERSATION\_STARTED event.** AWS End User Messaging sends this event to your RCS event Amazon SNS topic when a conversation session begins. The `messageBody` is a JSON string:

```
{
    "originationNumber": "14376638816",
    "destinationNumber": "rcs-e138fa39eabf4d6d8e95546248c8dfa7",
    "messageBody": "{\"type\":\"CONVERSATION_STARTED\",\"startTime\":\"2026-06-28T04:03:08.002+0000\",\"endTime\":\"2026-06-29T04:08:08.002+0000\",\"conversationInitiatingMessageId\":\"7e7da6ec-234a-4d4f-bbc5-943bcca663ab\",\"conversationInitiatingMessageType\":\"OUTBOUND\"}",
    "inboundMessageId": "7e7da6ec-234a-4d4f-bbc5-943bcca663ab"
}
```

**Inbound typing indicator.** Inbound interaction events are delivered to the two-way Amazon SNS topic on your RCS agent, not to a configuration set event destination. The `messageBody` is a JSON string with a `type` of `RCS_TYPING`:

```
{
    "originationNumber": "12679164820",
    "destinationNumber": "rcs-cb1e6e519e9049fabf8c0ae38e4d876b",
    "messageBody": "{\"type\":\"RCS_TYPING\",\"receivedAt\":\"2026-06-17T17:36:29.937+0000\"}",
    "inboundMessageId": "12679164820-2026-06-17T17:36:29.937+0000"
}
```

**Suggestion tap (postback).** When a recipient taps a suggestion, you receive a postback on the two-way Amazon SNS topic. The `messageBody` carries the `postbackData` you configured on the suggestion:

```
{
    "originationNumber": "12679164820",
    "destinationNumber": "rcs-cb1e6e519e9049fabf8c0ae38e4d876b",
    "messageBody": "{\"type\":\"SUGGESTION\",\"text\":\"Open\",\"postbackData\":\"Open\"}",
    "inboundMessageId": "nIMYZGrBUILWng0Qck0deqVaAoTSJY5PsktKYOBYJhVaTsrdMdrs714e8SLZAjD3"
}
```

To determine the delivery channel, inspect the `originationPhoneNumber` field. An RCS agent ID means the message was delivered over RCS; an E.164 phone number or short code means it was delivered over SMS, either directly or after RCS fallback.

### RCS event types and fields
<a name="configuration-sets-event-format-rcs-types"></a>

The following sections describe each RCS event type, the status values and fields it carries, and how to process it. The example payloads above show these events as they arrive at your event destination.

#### Common fields on RCS events
<a name="nx-rcs-mon-events-common-fields-ref"></a>

All RCS events, including delivery status events, read receipts, and inbound interaction events, include the following fields that identify the RCS agent:

`rcsBusinessId`  
The platform identifier for the RCS agent that sent or received the message.

`agentIsoCountryCode`  
The ISO country code of the country in which the RCS agent is registered, for example `US` or `CA`.

These fields are present on all RCS events. They are not included on SMS or MMS events.

#### Delivery status events
<a name="nx-rcs-mon-events-delivery-status-ref"></a>

Delivery status events indicate the lifecycle state of an outbound RCS message. You use these events to confirm delivery, trigger fallback logic, or alert your operations team to content violations.

Each outbound status event has an `eventType` of `RCS_DELIVERED` (and related RCS status event types) and a `messageStatus` field that holds one of the following values:

`DELIVERED`  
The message reached the recipient's device. Use this event to cancel any pending fallback timers.

`PENDING`  
The RCS platform accepted the message but has not yet delivered it. Start your fallback timer when you receive this event.

`UNDELIVERABLE`  
The platform permanently cannot deliver the message (for example, the recipient's device does not support RCS). Trigger your SMS or MMS fallback and flag the phone number for future routing decisions.

`REJECTED`  
The message was rejected due to a content policy violation. Alert your operations team and review the message content.

**Note**  
Status events for rich RCS messages include billing metadata. The `rcsMetadata.billingEventType` value is `RICH` for rich RCS messages.

#### Read receipts
<a name="nx-rcs-mon-events-read-receipts-ref"></a>

A read receipt indicates that the recipient opened or viewed your message. Use read receipts to track engagement and measure read rates.

`READ`  
The recipient viewed the message. A `RCS_DELIVERED` event is always sent before or together with the `RCS_READ` event, so if you did not process a separate delivery event, treat the message as delivered when you receive the read event.

The read event uses an `eventType` of `RCS_READ` with `messageStatus` set to `READ`.

You can calculate your read rate as the number of `READ` events divided by the number of `DELIVERED` events, multiplied by 100.

#### Typing indicators
<a name="nx-rcs-mon-events-typing-indicators-ref"></a>

Typing indicator events signal that a participant is composing a message. These events flow in both directions:
+ **Inbound (user to agent)**: When the recipient begins composing a reply, you receive an inbound notification on your two-way Amazon SNS topic. The `messageBody` contains a JSON object with a `type` of `RCS_TYPING`. Use this to prepare your conversational logic or display status in your dashboard.
+ **Outbound (agent to user)**: Agent-initiated typing indicators, which show the recipient that your agent is preparing a response, are a planned capability. Check the AWS End User Messaging release notes for current availability.

**Note**  
Agent-initiated typing indicators and agent-initiated read receipts, which your agent sends to a recipient, are planned capabilities. Check the AWS End User Messaging release notes for current availability.

#### TTL expiration events
<a name="nx-rcs-mon-events-ttl-expiration-ref"></a>

When you set a `TimeToLive` value on a message and the TTL elapses before the message is delivered, the RCS platform attempts to revoke (delete) the message. The outcome generates one of the following events:

`TTL_EXPIRATION_REVOKED`  
The expired message was successfully removed before the recipient viewed it. You can safely trigger your SMS or MMS fallback to ensure the recipient receives the content.

`TTL_EXPIRATION_REVOKE_FAILED`  
The revocation failed and the message might still be delivered to the recipient. In this case, evaluate whether sending a fallback message would result in a duplicate before proceeding.

TTL expiration events work together with your fallback strategy. For details on configuring message expiration, see the RCS message expiration documentation.

#### Fallback events
<a name="nx-rcs-mon-events-fallback-ref"></a>

When an RCS message cannot be delivered and AWS End User Messaging triggers an SMS or MMS fallback (either through pool-based configuration or per-message `FallbackConfiguration`), the service generates events that indicate the fallback outcome.

Fallback events indicate:
+ Whether the fallback message was sent successfully.
+ The channel used for fallback (SMS or MMS).
+ The reason the original RCS message was not delivered (for example, device not RCS-capable, TTL expiration, or platform unavailability).

Monitor these events to measure your fallback rate and identify phone numbers that consistently require fallback delivery. For details on configuring per-message fallback, see the RCS per-message fallback documentation.

#### Suggestion tap (postback) events
<a name="nx-rcs-mon-events-postback-ref"></a>

When a recipient chooses a suggestion (a suggested reply or suggested action), you receive a postback event containing the `PostbackData` string that you configured on that suggestion. Use postback data to route your conversational logic, not the display text.

**Important**  
Suggestion tap (postback) events are delivered only to your two-way Amazon SNS topic, not to configuration set event destinations.

The notification's `messageBody` contains a JSON object with a `type` of `SUGGESTION`, the display `text`, and the `postbackData` you set on the suggestion.

For details on how to configure suggestions and their postback data, see the RCS suggestions documentation.

**Important**  
Design your `PostbackData` values as structured identifiers (for example, `action:confirm_order:12345`) so that you can parse them programmatically. Avoid relying on display text, which can change without affecting your routing logic.

#### Conversational pricing events and fields
<a name="nx-rcs-mon-events-conversational-ref"></a>

If you register your RCS agent to use conversational pricing, AWS End User Messaging adds fields to delivery and inbound events while a message is part of an active conversation session, and sends a `CONVERSATION_STARTED` event when a session begins. For an overview of the conversational pricing model, see the RCS conversational pricing documentation.

##### Conversation fields
<a name="nx-rcs-mon-events-conversational-fields-ref"></a>

The following fields appear on a delivery or inbound event only when the message is part of an active conversation session. When the message is not part of a conversation, AWS End User Messaging omits these fields entirely.

`conversationInitiatingMessageId`  
The message ID that started the conversation session. Present on delivery and inbound events.

`conversationInitiatingMessageType`  
How the conversation started: `OUTBOUND` when your agent sent the first message, or `INBOUND` when the recipient sent the first message. Present on delivery and inbound events.

`conversationSessionFee`  
The one-time session fee, in US dollars, charged once per 24-hour conversation session. Present on delivery events only.

When a message is part of an active conversation session, its delivery event reports a `totalMessagePrice` and `totalCarrierFee` of `0.0`, because the session fee covers the message.

##### CONVERSATION\_STARTED event
<a name="nx-rcs-mon-events-conversation-started-ref"></a>

AWS End User Messaging sends a `CONVERSATION_STARTED` event to your RCS event Amazon SNS topic when a conversation session begins. A session begins when your agent sends a message and the recipient replies within 24 hours (business-initiated), or when the recipient sends a message and your agent responds (user-initiated).

The `messageBody` contains a JSON object with the following fields:

`type`  
Always `CONVERSATION_STARTED`.

`startTime`  
The session start time, in ISO 8601 format.

`endTime`  
The session expiry time, in ISO 8601 format. This is always 24 hours after `startTime`.

`conversationInitiatingMessageId`  
The message ID that started the conversation.

`conversationInitiatingMessageType`  
`OUTBOUND` when your agent sent the first message, or `INBOUND` when the recipient sent the first message.

#### Best practices for event processing
<a name="nx-rcs-mon-events-best-practices-ref"></a>
+ Configure event destinations before you begin sending production messages. This ensures you capture all events from the start.
+ Use `DELIVERED` events to cancel fallback timers. If you receive a delivery confirmation, do not send an SMS or MMS fallback.
+ Process subscription events (`UNSUBSCRIBE`) immediately to maintain compliance with messaging regulations.
+ Implement idempotent event processing. Use the message identifier combined with the event type as a deduplication key to handle duplicate event deliveries.
+ Handle out-of-order events by comparing event timestamps. Events might arrive in a different order than they occurred.
+ Monitor rejection and undeliverable rates with CloudWatch alarms to detect content issues or targeting problems early.

## Registration status change example
<a name="configuration-sets-event-format-registration-example"></a>

Unlike the message events in the preceding sections, which you receive through a configuration set event destination, the registration status change event is published directly to Amazon EventBridge on the default event bus. emits this event whenever the status of a registration, such as a phone number or sender ID registration, changes. Create an EventBridge rule on the default event bus with a source of `aws.sms-voice` and a detail type of **Registration Status Change** to route it to a target. The event contains the data shown in the following example.

```
{
    "version": "0",
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234example",
    "detail-type": "Registration Status Change",
    "source": "aws.sms-voice",
    "account": "123456789012",
    "time": "2024-04-25T00:00:00Z",
    "region": "us-east-1",
    "resources": [
        "arn:aws:sms-voice:us-east-1:123456789012:registration/reg-12345example"
    ],
    "detail": {
        "registrationArn": "arn:aws:sms-voice:us-east-1:123456789012:registration/reg-12345example",
        "registrationDetails": {
            "registrationId": "reg-12345example",
            "registrationVersionNumber": 1,
            "registrationType": "US_TEN_DLC_BRAND",
            "registrationStatusChangeTimestamp": 1714000000000,
            "currentStatus": "COMPLETE"
        }
    }
}
```


| Field | Description | 
| --- | --- | 
| detail-type | The event type. For registration status changes, this is always Registration Status Change. | 
| source | The service that published the event, which is always aws.sms-voice. | 
| resources | A list containing the Amazon Resource Name (ARN) of the registration whose status changed. | 
| detail.registrationArn | The Amazon Resource Name (ARN) of the registration. | 
| detail.registrationDetails.registrationId | The unique identifier for the registration. | 
| detail.registrationDetails.registrationVersionNumber | The version number of the registration that this status change applies to. | 
| detail.registrationDetails.registrationType | The type of registration, such as US\_TEN\_DLC\_BRAND, US\_TOLL\_FREE, or a sender ID registration type. | 
| detail.registrationDetails.registrationStatusChangeTimestamp | The time, in Unix epoch milliseconds, when the registration status changed. | 
| detail.registrationDetails.currentStatus | The new status of the registration, such as CREATED, SUBMITTED, REVIEWING, REQUIRES\_AUTHENTICATION, REQUIRES\_UPDATES, COMPLETE, or DELETED. | 