For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
SupportDashboard
DocsAPI ReferenceWebhooksMethodsUI ComponentsMCP ServerChangelog
  • Documentation
    • Introduction
    • Authentication
    • RCS Support
  • Quickstart
    • SMS
      • Python
      • TypeScript
      • Ruby
        • Send
        • Receive
    • RCS
  • Guides
    • Purchase Phone Numbers
    • Brands
    • Campaigns
    • Messages
    • Branded Test Agents
    • Handling Expired URLs
LogoLogo
SupportDashboard
QuickstartSMSRuby

Sending SMS Messages

1require "dotenv/load"
2require "rcs"
3
4# Load environment variables
5API_KEY = ENV["PINNACLE_API_KEY"]
6SENDER_NUMBER = ENV["SENDER_NUMBER"]
7
8# Initialize the Pinnacle client
9client = Pinnacle::Client.new(api_key: API_KEY)
10
11# Send an SMS message
12client.messages.sms.send_(
13 from: SENDER_NUMBER,
14 text: "Hello, world!",
15 to: "+14154746461" # Recipient's phone number
16)
17
18puts "✅ Message sent!"
Was this page helpful?
Previous

Receiving SMS Messages

Next
Built with

Prerequisites

Before proceeding, ensure you have obtained a phone number and API key as described in the prerequisites.

Installation

Create a Gemfile in your project root:

1source "https://rubygems.org"
2gem "dotenv"
3gem "rcs", "2.0.15"

Install the dependencies:

$bundle install

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:

$ruby send_sms.rb

If successful, the recipient will receive your SMS message!