# Send RCS Message

`POST /messages/send/rcs`

Send a RCS message immediately or schedule it for future delivery.

Requires an active RCS agent and recipient devices that support RCS Business Messaging.

## Authentication

Send your API key in the `PINNACLE-API-KEY` header.

## Request body

Required.

Content type: `application/json`.

### Fields

- Variant: Text
- `from` — `string`. Your RCS agent ID which must be prefixed with 'agent_'.
- `fallback` — `Fallback Message`, optional. SMS/MMS fallback message to send if the RCS message fails to deliver.

When a recipient's device doesn't support RCS, this fallback message will be sent as SMS or MMS instead. The fallback is sent from the specified phone number.

> **Note:** At least one of `text` or `mediaUrls` must be provided. Fallback messages require a verified `from` phone number with SMS/MMS sending capabilities.

> **Billing:** You will be charged the standard SMS or MMS rate for the fallback message. The original RCS message will not be charged if the fallback is sent instead.
- `fallback.from` — `string`. Phone number to send the fallback message from in E.164 format.

Must be a verified phone number with SMS/MMS sending capabilities. Sandbox numbers cannot be used for fallbacks. The phone number must be connected to an active toll-free or 10DLC campaign.
- `fallback.text` — `string`, optional. Text content for the fallback message.

At least one of `text` or `mediaUrls` must be provided.

If `mediaUrls` is empty and the text fits within SMS segment limits, the fallback will be sent as SMS. Otherwise, it will be sent as MMS. You will only be billed for the message sent.
- `fallback.mediaUrls` — `string[]`, optional, default: []. Media file URLs to include in the fallback MMS message.

See supported media types.

If provided, the fallback will be sent as MMS. Otherwise, it will be sent as SMS (if text fits within segment limits). At least one of `text` or `mediaUrls` must be provided.
- `options` — `SendRichMessageOptions`, optional. Configure how your RCS message is sent and tracked.
- `options.schedule` — `MessageSchedule`, optional. Define when and how your message should be sent.
- `options.schedule.sendAt` — `string`. The date and time you want your message to be sent.
- Use ISO 8601 format, for example: `2024-12-17T14:30:00Z`. Format: `YYYY-MM-DDThh:mm` (e.g., `2024-12-25T14:30`).
- This time must be at least 5 minutes in the future.
- The message will be scheduled based on the `timezone` you provide.
- If you set a `recurrence` schedule, this is the start date and time for the recurring schedule.
- `options.schedule.recurrence` — `string`, optional. AWS cron expression for recurring schedules (6 fields).

Learn more about cron expressions.

**Examples:**
- `0 10 * * ? *` - Every day at 10:00 AM
- `0/30 * * * ? *` - Every 30 minutes
- `0 9 ? * MON-FRI *` - Every weekday at 9:00 AM
- `0 12 1 * ? *` - First day of every month at noon
- `options.schedule.timezone` — `string`, optional, default: "UTC". IANA timezone identifier (e.g., `America/New_York`, `UTC`).

Defaults to `UTC` if not specified.
- `options.schedule.endDate` — `string`, optional. Date and time when recurring messages should stop.

Format: `YYYY-MM-DDThh:mm`. Required if `recurrence` is set.
- `options.tracking` — `string`, optional, values: `ID`, `HIDDEN`. Enable tracking on sent messages. If not provided, messages are not tracked. You will not be able to react to these messages unless you provide the options.force field.

`ID` - Append an explicit ID at the end of the message for tracking. Users will see this ID.

`HIDDEN` - Invisible IDs are sent with messages for tracking. Will not be visible to users but will lead to slightly longer message lengths.
- `options.transcode` — `boolean`, optional, default: true. Media files and card media will be transcoded to a supported RCS format. This adds a small delay to sending the message. Ignored for rich text messages.
- `options.validate` — `boolean`, optional, default: false. Validate your message for any unsupported files.

If failed, errors will be thrown and the message will not send.
- `to` — `string`. Recipient's phone number in E.164 format.
- `quickReplies` — `RichButton[]`, optional. List of interactive quick reply buttons in the message.

**Limit:** 10 max
- `quickReplies[]` Variant: openUrl
- `quickReplies[].type` — `string`, values: `openUrl`
- `quickReplies[].webviewMode` — `string`, optional, values: `HALF`, `TALL`, `FULL`. Controls how the URL is displayed when the button is tapped.

**Default behavior:** If not specified, the URL opens in the device's default browser. If you're sending deeplinks, you should use this mode as it will open the deeplink in the native app if it is installed.

**Available modes in order of size:**
- `HALF` — Half-screen webview overlay
- `TALL` — Tall webview overlay
- `FULL` — Full-screen webview
- `quickReplies[].payload` — `string`, format: uri. The URL to open when the button is tapped. Must be a valid HTTP or HTTPS URL.
- `quickReplies[].title` — `string`, maximum length: 25. Display text for the button.
- `quickReplies[].metadata` — `string`, optional. Optional additional data to attach to this button.
- `quickReplies[]` Variant: call
- `quickReplies[].metadata` — `string`, optional. Optional additional data to attach to this button.
- `quickReplies[].payload` — `string`. Phone number to call in E.164 format
- `quickReplies[].title` — `string`, maximum length: 25. Display text for the button.
- `quickReplies[].type` — `string`, values: `call`
- `quickReplies[]` Variant: trigger
- `quickReplies[].metadata` — `string`, optional. Optional additional data to attach to this button.
- `quickReplies[].payload` — `string`. Custom data sent to your webhook when the button is tapped. Use this to identify the user's choice.
- `quickReplies[].title` — `string`, maximum length: 25. Display text for the button.
- `quickReplies[].type` — `string`, values: `trigger`
- `quickReplies[]` Variant: requestUserLocation
- `quickReplies[].metadata` — `string`, optional. Optional additional data to attach to this button.
- `quickReplies[].title` — `string`, maximum length: 25. Display text for the button.
- `quickReplies[].type` — `string`, values: `requestUserLocation`
- `quickReplies[]` Variant: scheduleEvent
- `quickReplies[].eventDescription` — `string`, optional. Detailed description for the calendar event.
- `quickReplies[].eventEndTime` — `string`. End time in ISO 8601 format.
- `quickReplies[].eventStartTime` — `string`. Starting time in ISO 8601 format.
- `quickReplies[].eventTitle` — `string`. Title of the event.
- `quickReplies[].metadata` — `string`, optional. Optional additional data to attach to this button.
- `quickReplies[].title` — `string`, maximum length: 25. Display text for the button.
- `quickReplies[].type` — `string`, values: `scheduleEvent`
- `quickReplies[]` Variant: sendLocation
- `quickReplies[].type` — `string`, values: `sendLocation`
- `quickReplies[].name` — `string`, optional. Optional name or label for the location that will be displayed in the map app (e.g., "Central Park", "Home Office").

If not provided, the button title will be used as the location name.
- `quickReplies[].latLong` — `object`. Geographic coordinates of the location to share.
- `quickReplies[].latLong.lat` — `number`. Latitude coordinate in decimal degrees.
- `quickReplies[].latLong.lng` — `number`. Longitude coordinate in decimal degrees.
- `quickReplies[].title` — `string`, maximum length: 25. Display text for the button.
- `quickReplies[].metadata` — `string`, optional. Optional additional data to attach to this button.
- `text` — `string`, maximum length: 3000. Text content of the RCS message.
- Variant: Media
- `from` — `string`. Your RCS agent ID which must be prefixed with 'agent_'.
- `fallback` — `Fallback Message`, optional. SMS/MMS fallback message to send if the RCS message fails to deliver.

When a recipient's device doesn't support RCS, this fallback message will be sent as SMS or MMS instead. The fallback is sent from the specified phone number.

> **Note:** At least one of `text` or `mediaUrls` must be provided. Fallback messages require a verified `from` phone number with SMS/MMS sending capabilities.

> **Billing:** You will be charged the standard SMS or MMS rate for the fallback message. The original RCS message will not be charged if the fallback is sent instead.
- `fallback.from` — `string`. Phone number to send the fallback message from in E.164 format.

Must be a verified phone number with SMS/MMS sending capabilities. Sandbox numbers cannot be used for fallbacks. The phone number must be connected to an active toll-free or 10DLC campaign.
- `fallback.text` — `string`, optional. Text content for the fallback message.

At least one of `text` or `mediaUrls` must be provided.

If `mediaUrls` is empty and the text fits within SMS segment limits, the fallback will be sent as SMS. Otherwise, it will be sent as MMS. You will only be billed for the message sent.
- `fallback.mediaUrls` — `string[]`, optional, default: []. Media file URLs to include in the fallback MMS message.

See supported media types.

If provided, the fallback will be sent as MMS. Otherwise, it will be sent as SMS (if text fits within segment limits). At least one of `text` or `mediaUrls` must be provided.
- `options` — `SendRichMessageOptions`, optional. Configure how your RCS message is sent and tracked.
- `options.schedule` — `MessageSchedule`, optional. Define when and how your message should be sent.
- `options.schedule.sendAt` — `string`. The date and time you want your message to be sent.
- Use ISO 8601 format, for example: `2024-12-17T14:30:00Z`. Format: `YYYY-MM-DDThh:mm` (e.g., `2024-12-25T14:30`).
- This time must be at least 5 minutes in the future.
- The message will be scheduled based on the `timezone` you provide.
- If you set a `recurrence` schedule, this is the start date and time for the recurring schedule.
- `options.schedule.recurrence` — `string`, optional. AWS cron expression for recurring schedules (6 fields).

Learn more about cron expressions.

**Examples:**
- `0 10 * * ? *` - Every day at 10:00 AM
- `0/30 * * * ? *` - Every 30 minutes
- `0 9 ? * MON-FRI *` - Every weekday at 9:00 AM
- `0 12 1 * ? *` - First day of every month at noon
- `options.schedule.timezone` — `string`, optional, default: "UTC". IANA timezone identifier (e.g., `America/New_York`, `UTC`).

Defaults to `UTC` if not specified.
- `options.schedule.endDate` — `string`, optional. Date and time when recurring messages should stop.

Format: `YYYY-MM-DDThh:mm`. Required if `recurrence` is set.
- `options.tracking` — `string`, optional, values: `ID`, `HIDDEN`. Enable tracking on sent messages. If not provided, messages are not tracked. You will not be able to react to these messages unless you provide the options.force field.

`ID` - Append an explicit ID at the end of the message for tracking. Users will see this ID.

`HIDDEN` - Invisible IDs are sent with messages for tracking. Will not be visible to users but will lead to slightly longer message lengths.
- `options.transcode` — `boolean`, optional, default: true. Media files and card media will be transcoded to a supported RCS format. This adds a small delay to sending the message. Ignored for rich text messages.
- `options.validate` — `boolean`, optional, default: false. Validate your message for any unsupported files.

If failed, errors will be thrown and the message will not send.
- `to` — `string`. Recipient's phone number in E.164 format.
- `media` — `string`, format: url. Media file URLs to send.

See supported media types.
- `quickReplies` — `RichButton[]`, optional. List of interactive quick reply buttons in the message.

`≤10`
- `quickReplies[]` Variant: openUrl
- `quickReplies[].type` — `string`, values: `openUrl`
- `quickReplies[].webviewMode` — `string`, optional, values: `HALF`, `TALL`, `FULL`. Controls how the URL is displayed when the button is tapped.

**Default behavior:** If not specified, the URL opens in the device's default browser. If you're sending deeplinks, you should use this mode as it will open the deeplink in the native app if it is installed.

**Available modes in order of size:**
- `HALF` — Half-screen webview overlay
- `TALL` — Tall webview overlay
- `FULL` — Full-screen webview
- `quickReplies[].payload` — `string`, format: uri. The URL to open when the button is tapped. Must be a valid HTTP or HTTPS URL.
- `quickReplies[].title` — `string`, maximum length: 25. Display text for the button.
- `quickReplies[].metadata` — `string`, optional. Optional additional data to attach to this button.
- `quickReplies[]` Variant: call
- `quickReplies[].metadata` — `string`, optional. Optional additional data to attach to this button.
- `quickReplies[].payload` — `string`. Phone number to call in E.164 format
- `quickReplies[].title` — `string`, maximum length: 25. Display text for the button.
- `quickReplies[].type` — `string`, values: `call`
- `quickReplies[]` Variant: trigger
- `quickReplies[].metadata` — `string`, optional. Optional additional data to attach to this button.
- `quickReplies[].payload` — `string`. Custom data sent to your webhook when the button is tapped. Use this to identify the user's choice.
- `quickReplies[].title` — `string`, maximum length: 25. Display text for the button.
- `quickReplies[].type` — `string`, values: `trigger`
- `quickReplies[]` Variant: requestUserLocation
- `quickReplies[].metadata` — `string`, optional. Optional additional data to attach to this button.
- `quickReplies[].title` — `string`, maximum length: 25. Display text for the button.
- `quickReplies[].type` — `string`, values: `requestUserLocation`
- `quickReplies[]` Variant: scheduleEvent
- `quickReplies[].eventDescription` — `string`, optional. Detailed description for the calendar event.
- `quickReplies[].eventEndTime` — `string`. End time in ISO 8601 format.
- `quickReplies[].eventStartTime` — `string`. Starting time in ISO 8601 format.
- `quickReplies[].eventTitle` — `string`. Title of the event.
- `quickReplies[].metadata` — `string`, optional. Optional additional data to attach to this button.
- `quickReplies[].title` — `string`, maximum length: 25. Display text for the button.
- `quickReplies[].type` — `string`, values: `scheduleEvent`
- `quickReplies[]` Variant: sendLocation
- `quickReplies[].type` — `string`, values: `sendLocation`
- `quickReplies[].name` — `string`, optional. Optional name or label for the location that will be displayed in the map app (e.g., "Central Park", "Home Office").

If not provided, the button title will be used as the location name.
- `quickReplies[].latLong` — `object`. Geographic coordinates of the location to share.
- `quickReplies[].latLong.lat` — `number`. Latitude coordinate in decimal degrees.
- `quickReplies[].latLong.lng` — `number`. Longitude coordinate in decimal degrees.
- `quickReplies[].title` — `string`, maximum length: 25. Display text for the button.
- `quickReplies[].metadata` — `string`, optional. Optional additional data to attach to this button.
- Variant: Cards
- `from` — `string`. Your RCS agent ID which must be prefixed with 'agent_'.
- `fallback` — `Fallback Message`, optional. SMS/MMS fallback message to send if the RCS message fails to deliver.

When a recipient's device doesn't support RCS, this fallback message will be sent as SMS or MMS instead. The fallback is sent from the specified phone number.

> **Note:** At least one of `text` or `mediaUrls` must be provided. Fallback messages require a verified `from` phone number with SMS/MMS sending capabilities.

> **Billing:** You will be charged the standard SMS or MMS rate for the fallback message. The original RCS message will not be charged if the fallback is sent instead.
- `fallback.from` — `string`. Phone number to send the fallback message from in E.164 format.

Must be a verified phone number with SMS/MMS sending capabilities. Sandbox numbers cannot be used for fallbacks. The phone number must be connected to an active toll-free or 10DLC campaign.
- `fallback.text` — `string`, optional. Text content for the fallback message.

At least one of `text` or `mediaUrls` must be provided.

If `mediaUrls` is empty and the text fits within SMS segment limits, the fallback will be sent as SMS. Otherwise, it will be sent as MMS. You will only be billed for the message sent.
- `fallback.mediaUrls` — `string[]`, optional, default: []. Media file URLs to include in the fallback MMS message.

See supported media types.

If provided, the fallback will be sent as MMS. Otherwise, it will be sent as SMS (if text fits within segment limits). At least one of `text` or `mediaUrls` must be provided.
- `options` — `object`, optional
- `options.schedule` — `MessageSchedule`, optional. Define when and how your message should be sent.
- `options.schedule.sendAt` — `string`. The date and time you want your message to be sent.
- Use ISO 8601 format, for example: `2024-12-17T14:30:00Z`. Format: `YYYY-MM-DDThh:mm` (e.g., `2024-12-25T14:30`).
- This time must be at least 5 minutes in the future.
- The message will be scheduled based on the `timezone` you provide.
- If you set a `recurrence` schedule, this is the start date and time for the recurring schedule.
- `options.schedule.recurrence` — `string`, optional. AWS cron expression for recurring schedules (6 fields).

Learn more about cron expressions.

**Examples:**
- `0 10 * * ? *` - Every day at 10:00 AM
- `0/30 * * * ? *` - Every 30 minutes
- `0 9 ? * MON-FRI *` - Every weekday at 9:00 AM
- `0 12 1 * ? *` - First day of every month at noon
- `options.schedule.timezone` — `string`, optional, default: "UTC". IANA timezone identifier (e.g., `America/New_York`, `UTC`).

Defaults to `UTC` if not specified.
- `options.schedule.endDate` — `string`, optional. Date and time when recurring messages should stop.

Format: `YYYY-MM-DDThh:mm`. Required if `recurrence` is set.
- `options.tracking` — `string`, optional, values: `ID`, `HIDDEN`. Enable tracking on sent messages. If not provided, messages are not tracked. You will not be able to react to these messages unless you provide the options.force field.

`ID` - Append an explicit ID at the end of the message for tracking. Users will see this ID.

`HIDDEN` - Invisible IDs are sent with messages for tracking. Will not be visible to users but will lead to slightly longer message lengths.
- `options.transcode` — `boolean`, optional, default: true. Media files and card media will be transcoded to a supported RCS format. This adds a small delay to sending the message. Ignored for rich text messages.
- `options.validate` — `boolean`, optional, default: false. Validate your message for any unsupported files.

If failed, errors will be thrown and the message will not send.
- `options.standalone_card` — `RichStandaloneCardOptions`, optional. Configure standalone card layout options for enhanced visual presentation.

> **⚠️ Important Restriction**
>
> This option is **only valid for single card messages** with static media. Using it with multiple cards will cause the request to fail with a validation error.
> GIFs and videos are not supported and will be rendered as vertical cards.
- `options.standalone_card.orientation` — `string`, optional, default: "HORIZONTAL"; values: `HORIZONTAL`, `VERTICAL`. The orientation of the standalone card.
- `options.standalone_card.image_alignment` — `string`, optional, default: "LEFT"; values: `LEFT`, `RIGHT`. The alignment of the image in the standalone card. This field is ignored if orientation is VERTICAL.
- `options.cardWidth` — `string`, optional, values: `SMALL`, `MEDIUM`. Width of each card in a carousel.

**Default:** `MEDIUM`

**Valid for:** Multi-card messages (2 to 10 cards).

**Not valid for:** Single-card messages. Setting it with one card fails validation.

**Platform:** Card width selection applies only on Android. For iOS, assume `MEDIUM`.
- `to` — `string`. Recipient's phone number in E.164 format.
- `cards` — `RichCard[]`. Collection of cards attached to the message.

**Limit:** 1 to 10
- `cards[].buttons` — `RichButton[]`, optional. While buttons resemble quick replies, they remain on screen after being clicked and are card-specific.

**Limit:** 4 max
- `cards[].buttons[]` Variant: openUrl
- `cards[].buttons[].type` — `string`, values: `openUrl`
- `cards[].buttons[].webviewMode` — `string`, optional, values: `HALF`, `TALL`, `FULL`. Controls how the URL is displayed when the button is tapped.

**Default behavior:** If not specified, the URL opens in the device's default browser. If you're sending deeplinks, you should use this mode as it will open the deeplink in the native app if it is installed.

**Available modes in order of size:**
- `HALF` — Half-screen webview overlay
- `TALL` — Tall webview overlay
- `FULL` — Full-screen webview
- `cards[].buttons[].payload` — `string`, format: uri. The URL to open when the button is tapped. Must be a valid HTTP or HTTPS URL.
- `cards[].buttons[].title` — `string`, maximum length: 25. Display text for the button.
- `cards[].buttons[].metadata` — `string`, optional. Optional additional data to attach to this button.
- `cards[].buttons[]` Variant: call
- `cards[].buttons[].metadata` — `string`, optional. Optional additional data to attach to this button.
- `cards[].buttons[].payload` — `string`. Phone number to call in E.164 format
- `cards[].buttons[].title` — `string`, maximum length: 25. Display text for the button.
- `cards[].buttons[].type` — `string`, values: `call`
- `cards[].buttons[]` Variant: trigger
- `cards[].buttons[].metadata` — `string`, optional. Optional additional data to attach to this button.
- `cards[].buttons[].payload` — `string`. Custom data sent to your webhook when the button is tapped. Use this to identify the user's choice.
- `cards[].buttons[].title` — `string`, maximum length: 25. Display text for the button.
- `cards[].buttons[].type` — `string`, values: `trigger`
- `cards[].buttons[]` Variant: requestUserLocation
- `cards[].buttons[].metadata` — `string`, optional. Optional additional data to attach to this button.
- `cards[].buttons[].title` — `string`, maximum length: 25. Display text for the button.
- `cards[].buttons[].type` — `string`, values: `requestUserLocation`
- `cards[].buttons[]` Variant: scheduleEvent
- `cards[].buttons[].eventDescription` — `string`, optional. Detailed description for the calendar event.
- `cards[].buttons[].eventEndTime` — `string`. End time in ISO 8601 format.
- `cards[].buttons[].eventStartTime` — `string`. Starting time in ISO 8601 format.
- `cards[].buttons[].eventTitle` — `string`. Title of the event.
- `cards[].buttons[].metadata` — `string`, optional. Optional additional data to attach to this button.
- `cards[].buttons[].title` — `string`, maximum length: 25. Display text for the button.
- `cards[].buttons[].type` — `string`, values: `scheduleEvent`
- `cards[].buttons[]` Variant: sendLocation
- `cards[].buttons[].type` — `string`, values: `sendLocation`
- `cards[].buttons[].name` — `string`, optional. Optional name or label for the location that will be displayed in the map app (e.g., "Central Park", "Home Office").

If not provided, the button title will be used as the location name.
- `cards[].buttons[].latLong` — `object`. Geographic coordinates of the location to share.
- `cards[].buttons[].latLong.lat` — `number`. Latitude coordinate in decimal degrees.
- `cards[].buttons[].latLong.lng` — `number`. Longitude coordinate in decimal degrees.
- `cards[].buttons[].title` — `string`, maximum length: 25. Display text for the button.
- `cards[].buttons[].metadata` — `string`, optional. Optional additional data to attach to this button.
- `cards[].media` — `string`, optional, format: url. Media file URLs to send.
- `cards[].mediaHeight` — `string`, optional, default: "MEDIUM"; values: `SHORT`, `MEDIUM`, `TALL`. Height of the card media.

**Default:** `MEDIUM`

**Valid for:** Carousel cards and vertical standalone cards.

**Not valid for:** Horizontal standalone cards.

**Requires:** The card must include a `media` field.

**Platform:** Media height selection applies only on Android. For iOS, assume `MEDIUM`.
- `cards[].subtitle` — `string`, optional, maximum length: 2000. Secondary text displayed below the title for additional context.
- `cards[].title` — `string`, maximum length: 200. Title displayed on the card.
- `quickReplies` — `RichButton[]`, optional, default: []. List of interactive quick reply buttons in the message.

**Limit:** 10 max
- `quickReplies[]` Variant: openUrl
- `quickReplies[].type` — `string`, values: `openUrl`
- `quickReplies[].webviewMode` — `string`, optional, values: `HALF`, `TALL`, `FULL`. Controls how the URL is displayed when the button is tapped.

**Default behavior:** If not specified, the URL opens in the device's default browser. If you're sending deeplinks, you should use this mode as it will open the deeplink in the native app if it is installed.

**Available modes in order of size:**
- `HALF` — Half-screen webview overlay
- `TALL` — Tall webview overlay
- `FULL` — Full-screen webview
- `quickReplies[].payload` — `string`, format: uri. The URL to open when the button is tapped. Must be a valid HTTP or HTTPS URL.
- `quickReplies[].title` — `string`, maximum length: 25. Display text for the button.
- `quickReplies[].metadata` — `string`, optional. Optional additional data to attach to this button.
- `quickReplies[]` Variant: call
- `quickReplies[].metadata` — `string`, optional. Optional additional data to attach to this button.
- `quickReplies[].payload` — `string`. Phone number to call in E.164 format
- `quickReplies[].title` — `string`, maximum length: 25. Display text for the button.
- `quickReplies[].type` — `string`, values: `call`
- `quickReplies[]` Variant: trigger
- `quickReplies[].metadata` — `string`, optional. Optional additional data to attach to this button.
- `quickReplies[].payload` — `string`. Custom data sent to your webhook when the button is tapped. Use this to identify the user's choice.
- `quickReplies[].title` — `string`, maximum length: 25. Display text for the button.
- `quickReplies[].type` — `string`, values: `trigger`
- `quickReplies[]` Variant: requestUserLocation
- `quickReplies[].metadata` — `string`, optional. Optional additional data to attach to this button.
- `quickReplies[].title` — `string`, maximum length: 25. Display text for the button.
- `quickReplies[].type` — `string`, values: `requestUserLocation`
- `quickReplies[]` Variant: scheduleEvent
- `quickReplies[].eventDescription` — `string`, optional. Detailed description for the calendar event.
- `quickReplies[].eventEndTime` — `string`. End time in ISO 8601 format.
- `quickReplies[].eventStartTime` — `string`. Starting time in ISO 8601 format.
- `quickReplies[].eventTitle` — `string`. Title of the event.
- `quickReplies[].metadata` — `string`, optional. Optional additional data to attach to this button.
- `quickReplies[].title` — `string`, maximum length: 25. Display text for the button.
- `quickReplies[].type` — `string`, values: `scheduleEvent`
- `quickReplies[]` Variant: sendLocation
- `quickReplies[].type` — `string`, values: `sendLocation`
- `quickReplies[].name` — `string`, optional. Optional name or label for the location that will be displayed in the map app (e.g., "Central Park", "Home Office").

If not provided, the button title will be used as the location name.
- `quickReplies[].latLong` — `object`. Geographic coordinates of the location to share.
- `quickReplies[].latLong.lat` — `number`. Latitude coordinate in decimal degrees.
- `quickReplies[].latLong.lng` — `number`. Longitude coordinate in decimal degrees.
- `quickReplies[].title` — `string`, maximum length: 25. Display text for the button.
- `quickReplies[].metadata` — `string`, optional. Optional additional data to attach to this button.

### Example

```json
{
  "to": "+14154746461",
  "from": "agent_pinnacle",
  "text": "Check out our website for more information!",
  "quickReplies": {
    "type": "openUrl",
    "payload": "https://www.pinnacle.sh/",
    "title": "Open Url"
  },
  "fallback": {
    "from": "+14155164736",
    "text": "Check out our website for more information! Visit: https://www.pinnacle.sh/"
  },
  "options": {
    "validate": false
  }
}
```

## Responses

### 200

Successfully sent or scheduled the message.

Use our /messages/:id endpoint to track your message.

**About RCS Fallback SMS Response and RCS Fallback MMS Response.**
When you send an RCS message with a fallback configured, the API checks whether the recipient's phone supports RCS **before** sending. If the phone does not support RCS, the fallback SMS or MMS is sent immediately instead, and you receive one of these response types.

You will receive message statuses for the fallback message at your configured webhooks and also receive a `FALLBACK_SENT` webhook event for the original RCS message.

Content type: `application/json`. Schema: `SendRichMessageResponse`.

- Variant: RCS Sent Response
- `messageId` — `string`. Unique identifier for the sent RCS message. This identifier is a string that always begins with the prefix `msg_`, for example: `msg_1234567890`.
- `segments` — `integer`. Total number of segments used across the message.
- `totalCost` — `number`, format: float. Total cost of sending the message.
- `sender` — `string`. Sender's phone number in E.164 format.
- `recipient` — `string`. Recipient's phone number in E.164 format.
- `status` — `string`. Current status of the message.
- Variant: Scheduled Response
- `scheduleId` — `string`. Unique identifier for the scheduled send. This identifier is a string that always begins with the prefix `msg_sched_`, for example: `msg_sched_1234567890`.
- `config` — `object`. Configuration for the scheduled message.
- `config.sendAt` — `string`. When the message will be sent in ISO 8601 format.
- `config.recurrence` — `string`, optional. AWS cron expression used for recurring messages.
- `config.timezone` — `string`. IANA timezone identifier.
- `config.endDate` — `string`, optional. When the recurring messages stops in ISO 8601 format.
- Variant: RCS Fallback SMS Response
- `messageId` — `string`. Unique identifier for the sent message. This identifier is a string that always begins with the prefix `msg_`, for example: `msg_1234567890`.
- `segments` — `object`. Details about how the message was segmented for sending.
- `segments.count` — `number`. Number of message segments used to send this message.
- `segments.encoding` — `string`, values: `gsm7`, `utf16`. Encoding used for the message segments.
- `totalCost` — `number`, format: float. Total cost of sending the message.
- `sender` — `string`. Sender's phone number in E.164 format.
- `recipient` — `string`. Recipient's phone number in E.164 format.
- `status` — `string`. Message is queued for delivery.
- `fallbackSent` — `boolean`. Indicates that the fallback SMS was sent because the recipient does not support RCS.
- `originalMessageId` — `string`. Unique identifier of the original RCS message that triggered this fallback. Always begins with the prefix `msg_`. This is the RCS message that could not be delivered — the `messageId` field on this response refers to the actual SMS that was sent as the fallback.
- Variant: RCS Fallback MMS Response
- `messageIds` — `string[]`. Array of unique message identifiers for an individual MMS send. Each identifier is a string that always begins with the prefix `msg_`, for example: `msg_1234567890`.

When media assets are too large to fit in a single MMS and `options.multiple_messages` is set to true, the content is automatically split across multiple messages. Each split message gets its own ID, and all IDs are returned in this array.

Note: When sending to audiences, you'll receive multiple response objects (one per recipient), each containing its own messageIds array.
- `segments` — `number`. Total number of segments used across the message.
- `totalCost` — `number`, format: float. Total cost of sending the message.
- `sender` — `string`. Sender's phone number in E.164 format.
- `recipient` — `string`. Recipient's phone number in E.164 format.
- `status` — `string`. Message is queued for delivery.
- `fallbackSent` — `boolean`. Indicates that the fallback MMS was sent because the recipient does not support RCS.
- `originalMessageId` — `string`. Unique identifier of the original RCS message that triggered this fallback. Always begins with the prefix `msg_`. This is the RCS message that could not be delivered — the `messageIds` field on this response refers to the actual MMS message(s) that were sent as the fallback.

Example:

```json
{
  "messageId": "msg_1234567890",
  "segments": 1,
  "totalCost": 0.03,
  "recipient": "+14154746461",
  "sender": "agent_pinnacle",
  "status": "queued"
}
```

### 400

The request was unacceptable, often due to providing an invalid update.

Errors may originate from invalid payload or from Pinnacle's additional validation checks. For example, providing an URL that cannot be accessed, updating a campaign that is currently being reviewed, updating data that you cannot access, sending a malformed message, and so on.

For `Pinnacle Validation Error` inspect the `error` payload to determine the source of the failure. These errors are likely due to additional validation and business logic checks.

For `Request Validation Error` inspect the `description` and `errors` payload to determine the source of failure. These errors are likely due to invalid payload inside the request.

Content type: `application/json`. Schema: `Request Validation Error | Pinnacle Validation Error`.

- Variant: variant 1
- `description` — `string`. Human-readable summary of validation failures.
- `errors` — `object`. Structured dictionary of issues containing two main sections:
- `errors`: Array of global validation errors not tied to specific fields
- `properties`: Object mapping field names to their specific validation errors, where each field contains an `errors` array
- Variant: variant 2
- `error` — `string`. Human-readable description of the error that occurred, corresponding to the HTTP status code.

Example:

```json
{
  "description": "✖ Invalid input: expected string, received number\n  → at example_field",
  "errors": {
    "errors": [],
    "properties": {
      "example_field": {
        "errors": [
          "Invalid input: expected string, received NaN"
        ]
      }
    }
  }
}
```

### 401

The request lacks valid authentication credentials or the provided credentials are invalid.

Ensure you're including a valid API key in the request headers and that your account has the necessary permissions to access this endpoint.

Content type: `application/json`. Schema: `object`.

- `error` — `string`. Human-readable description of the error that occurred, corresponding to the HTTP status code.

Example:

```json
{
  "error": "Invalid API key."
}
```

### 402

Insufficient credits to complete this request.

This occurs when your account balance is below the required amount for processing the operation.
Please add credits to your account to continue using the service.

Content type: `application/json`. Schema: `object`.

- `error` — `string`. Human-readable description of the error that occurred, corresponding to the HTTP status code.

Example:

```json
{
  "error": "Insufficient credits to complete this request."
}
```

### 403

Your subscription does not include access to this feature.

This occurs when attempting to use functionality that requires a higher subscription tier.
Please upgrade your subscription to access this feature.

Content type: `application/json`. Schema: `object`.

- `error` — `string`. Human-readable description of the error that occurred, corresponding to the HTTP status code.

Example:

```json
{
  "error": "Your subscription does not include access to this feature."
}
```

### 404

The requested resource could not be found.

This may occur if the identifier is incorrect, the resource has been deleted, or you don't have permission to access it.

Content type: `application/json`. Schema: `object`.

- `error` — `string`. Human-readable description of the error that occurred, corresponding to the HTTP status code.

Example:

```json
{
  "error": "The requested resource could not be found."
}
```

### 500

An unexpected error occurred on Pinnacle's servers while processing your request.

If this error persists, please contact support with the request details.

Content type: `application/json`. Schema: `object`.

- `error` — `string`. Human-readable description of the error that occurred, corresponding to the HTTP status code.

Example:

```json
{
  "error": "An unexpected error occurred while processing your request."
}
```

### 501

The requested functionality is not implemented on the server.

This typically indicates that the feature or endpoint you attempted to access is unavailable or not yet supported.

Content type: `application/json`. Schema: `object`.

- `error` — `string`. Human-readable description of the error that occurred, corresponding to the HTTP status code.

Example:

```json
{
  "error": "This feature has not been implemented yet."
}
```

## SDK examples

### TypeScript

```typescript
import { PinnacleClient } from "rcs-js";

const client = new PinnacleClient({
  apiKey: process.env.PINNACLE_API_KEY!,
});

await client.messages.rcs.send({
    text: "text",
    from: "from",
    to: "to"
});
```

### Python

```python
import os
from rcs import Pinnacle, RichTextMessage

client = Pinnacle(
    api_key=os.environ["PINNACLE_API_KEY"],
)

client.messages.rcs.send(
    request=RichTextMessage(
        text="text",
        from_="from",
        to="to",
    ),
)
```

### Ruby

```ruby
require "rcs"

client = Pinnacle::Client.new(
  api_key: ENV.fetch("PINNACLE_API_KEY")
)

client.messages.rcs.send_(
  from: "from",
  to: "to",
  text: "text"
)
```

## Machine-readable schema

[OpenAPI 3.1 JSON](https://docs.pinnacle.sh/openapi.json)
