> 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/sms/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 SMS Messages > Sending your first SMS with Pinnacle's Ruby SDK ```ruby require "dotenv/load" require "rcs" # Load environment variables API_KEY = ENV["PINNACLE_API_KEY"] SENDER_NUMBER = ENV["SENDER_NUMBER"] # Initialize the Pinnacle client client = Pinnacle::Client.new(api_key: API_KEY) # Send an SMS message client.messages.sms.send_( from: SENDER_NUMBER, text: "Hello, world!", to: "+14154746461" # Recipient's phone number ) puts "✅ Message sent!" ``` ## Prerequisites Before proceeding, ensure you have obtained a phone number and API key as described in the [prerequisites](/quickstart/sms). ## 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: ``` PINNACLE_API_KEY="your_api_key" # pnclk_ SENDER_NUMBER="your_phone_number" # +12345678910 ``` ## Sending Your First SMS Create a new Ruby file (e.g., `send_sms.rb`) and add the following code to the right. Run the script: ```bash ruby send_sms.rb ``` If successful, the recipient will receive your SMS message! > One API for RCS, iMessage, MMS, and SMS. Build, test, and scale every channel — send your first message in minutes, not weeks.