Before you start
- You need Ruby 3.1+ installed on your machine.
- You need a Rewrite API key with the required permissions.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Learn how to use the Ruby SDK to send SMS with the API.
REWRITE_API_KEY=rw...
require "rewrite"
rewrite = Rewrite::Client.new(api_key: ENV.fetch("REWRITE_API_KEY"))
message = rewrite.messages.send(
to: "+1234567890",
content: "Your OTP code is 478201"
)
puts message