> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.pinnacle.sh/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.pinnacle.sh/_mcp/server.

# Sending RCS Messages

> Sending your first RCS message with Pinnacle's Python SDK

```python
import os
from dotenv import load_dotenv
from rcs import (
  Pinnacle,
  RichCard,
  RichButton_OpenUrl,
  RichCardsMessage,
  RichTextMessage,
)

load_dotenv()

client = Pinnacle(
  api_key=os.getenv("PINNACLE_API_KEY"),
)

text_message_res = client.messages.rcs.send(
  request=RichTextMessage(
      text="Want to build on Pinnacle? Check out our docs below.",
      quick_replies=[
          RichButton_OpenUrl(
              payload="https://docs.pinnacle.sh",
              title="See our docs",
          )
      ],
      from_=os.getenv("AGENT_ID"),
      to="+18708977103",
  ),
)

print(text_message_res)

card_message_res = client.messages.rcs.send(
  request=RichCardsMessage(
      cards=[
          RichCard(
              media="https://server.trypinnacle.app/storage/v1/object/sign/vault/142/bea70540-0596-4f9e-af6a-5b6ad7fa6c00/Golden_Hour_Over_Rural_Landscape_1.png?token=eyJraWQiOiJzdG9yYWdlLXVybC1zaWduaW5nLWtleV9hOGI0YTI0NC00NzY4LTRhOTktYWI4MS1iNmZhNTZhNGQyZWYiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJ2YXVsdC8xNDIvYmVhNzA1NDAtMDU5Ni00ZjllLWFmNmEtNWI2YWQ3ZmE2YzAwL0dvbGRlbl9Ib3VyX092ZXJfUnVyYWxfTGFuZHNjYXBlXzEucG5nIiwiaWF0IjoxNzYwOTAyMjQ0LCJleHAiOjMxNzEyMDkwMjI0NH0.l0CNvb4Z-tXXEwnGA6vNWnRb4XYxvWVUUSziuqq2TLA",
              title="Did you know you can send an RCS message in less than 5 minutes?",
              subtitle="Learn how by tapping an option below",
              buttons=[
                  RichButton_OpenUrl(
                      type="openUrl",
                      metadata="",
                      payload="https://docs.pinnacle.sh/quickstart/rcs",
                      title="RCS Quickstart Guide",
                  ),
                  RichButton_OpenUrl(
                      type="openUrl",
                      metadata="",
                      payload="https://docs.pinnacle.sh/api-reference/messages/send-rcs",
                      title="RCS API Reference",
                  ),
              ],
          )
      ],
      quick_replies=[],
      from_=os.getenv("AGENT_ID"),
      to="+18708977103",
  )
)

print(card_message_res)
```

## Prerequisites

Before proceeding, ensure you have obtained a phone number and API key as described in the [prerequisites](/quickstart/rcs).

## Installation

Create a Python virtual environment:

```bash
python3 -m venv venv
```

Activate the virtual environment:

```bash
source venv/bin/activate
```

Install the Pinnacle Python SDK and python-dotenv to load env vars:

```bash
pip install rcs python-dotenv
```

> **Info**
>
> This guide uses version `rcs>=2.0.4`. Requires: Python \<4.0, >=3.8

## Configuration

Create an `.env` file in your project root and add your Pinnacle API key and RCS agent ID:

```
PINNACLE_API_KEY="your_api_key" # pnclk_
AGENT_ID="your_agent_id" # agent_
```

## Sending Your First RCS Message

Create a new Python file (e.g., `main.py`) and add the following code to the right.

Quick\_replies are required but may be left empty. For sending media urls, you can also use storage on the dashboard under **System > Storage** or [via our API](/api-reference/tools/upload-file)

Run the script:

```bash
python main.py
```

If successful, the recipient will receive your RCS messages, and they should look something like this:

![RCS message example](https://server.trypinnacle.app/storage/v1/object/sign/vault/3/f56830d3-fd41-404a-ae77-4bd221821130/example_rcs.jpg?token=eyJraWQiOiJzdG9yYWdlLXVybC1zaWduaW5nLWtleV9hOGI0YTI0NC00NzY4LTRhOTktYWI4MS1iNmZhNTZhNGQyZWYiLCJhbGciOiJIUzI1NiJ9.eyJ1cmwiOiJ2YXVsdC8zL2Y1NjgzMGQzLWZkNDEtNDA0YS1hZTc3LTRiZDIyMTgyMTEzMC9leGFtcGxlX3Jjcy5qcGciLCJpYXQiOjE3NjA5MDQyOTQsImV4cCI6MzE3MTIwOTA0Mjk0fQ.aE_pmAC_Z5oWtIsmtD58rw_4khWOioLJit_49BG-HrQ)