Back to Docs

RCS API

Rich Communication Services with cards, carousels, and buttons

Rich Text

Styled messages

Rich Cards

Images + buttons

Carousels

Product browsing

Location

Share locations

Dual-Key Authentication

API KeyPermanent

X-Smsly-Key-Id: sk_live_xxx

SDK KeyRotatable

X-SMSLY-SDK-KEY: sdk_live_xxx

Quick Start

Python
from smsly import SMSly

# === DUAL KEY SECURITY ===
# Two keys required (both can be in .env or embedded):
# 1. API Key - for authentication
# 2. SDK Key - for SDK validation

client = SMSly(
    api_key="setup_api_your_key",   # From dashboard
    sdk_key="setup_sdk_your_key"    # From dashboard
)

# Send RCS text message (type REQUIRED)
response = client.rcs.transactional(
    to="+1234567890",
    message="Welcome to RCS messaging! 🎉"
)
print(f"Message ID: {response.message_id}")

# Send Rich Card (marketing)
client.rcs.marketing(
    to="+1234567890",
    card={
        "title": "Summer Sale",
        "description": "50% off all items!",
        "media_url": "https://example.com/sale.jpg",
        "buttons": [
            {"text": "Shop Now", "url": "https://yourstore.com"},
            {"text": "Call Us", "phone": "+1234567890"}
        ]
    }
)

# Send Carousel
client.rcs.carousel(
    to="+1234567890",
    cards=[
        {"title": "Product 1", "media_url": "...", "price": "$29"},
        {"title": "Product 2", "media_url": "...", "price": "$39"},
        {"title": "Product 3", "media_url": "...", "price": "$49"}
    ]
)

# === METHOD 2: Environment Variables ===
client = SMSly()  # Auto-reads from env

API Endpoints

POST/v1/rcs/sendSend RCS message
POST/v1/rcs/cardSend rich card
POST/v1/rcs/carouselSend carousel
GET/v1/rcs/:idGet RCS status

Ready to use RCS?

Get API Keys