> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.pinnacle.sh/v-2/quickstart/rcs/ruby/send/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 Ruby SDK ```ruby require "dotenv/load" require "rcs" client = Pinnacle::Client.new(api_key: ENV["PINNACLE_API_KEY"]) # Send a rich text message with quick reply button text_message_res = client.messages.rcs.send_( text: "Want to build on Pinnacle? Check out our docs below.", quick_replies: [ { type: "openUrl", payload: "https://docs.pinnacle.sh", title: "See our docs" } ], options: { validate: true }, from: ENV["AGENT_ID"], to: "+18708977103" ) puts "Text message response:" puts text_message_res # Send a rich card message with media and buttons card_message_res = client.messages.rcs.send_( cards: [ { 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: [ { type: "openUrl", payload: "https://docs.pinnacle.sh/quickstart/rcs", title: "RCS Quickstart Guide" }, { type: "openUrl", payload: "https://docs.pinnacle.sh/api-reference/messages/send-rcs", title: "RCS API Reference" } ] } ], quick_replies: [], options: { validate: true }, from: ENV["AGENT_ID"], to: "+18708977103" ) puts "\nCard message response:" puts 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 Gemfile in your project root: ```ruby source "https://rubygems.org" gem "dotenv" gem "rcs", "2.0.15" ``` Install the dependencies: ```bash bundle install ``` > **Info** > > This guide uses version `rcs 2.0.15`. Requires Ruby version >= 3.3.0 ## 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 Ruby file (e.g., `main.rb`) 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 ruby main.rb ``` 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) > One API for RCS, iMessage, MMS, and SMS. Build, test, and scale every channel — send your first message in minutes, not weeks.