Quick Start Guide

Send your first SMS in 5 minutes! This guide will walk you through getting your API key and sending your first message.

1

Get API Key

2 min

2

Send First SMS

1 min

3

Check Status

1 min

4

Check Balance

1 min

1

Get Your API Key

Register for a free account:

https://roycetalk.com/

No credit card required for testing

Navigate to API Keys:

Dashboard → API Keys

Open API Keys page →

Copy your API key:

XXXX_XXXXXXXXXXXXXXXXXXXXXXXX_

Need help? Check our Authentication Guide for detailed instructions.

2

Send Your First SMS

Choose your preferred language and copy the code below. Replace YOUR_API_KEY_HERE with your actual API key.

import requests

# Your API credentials
API_KEY = "YOUR_API_KEY_HERE"
API_URL = "https://roycetalk.com/api/v1/sms-api/send/"

# Prepare the SMS
headers = {
    "Authorization": f"Bearer {API_KEY}",
    "Content-Type": "application/json"
}

data = {
    "phone_number": "+254712345678",
    "sender_id": "RoyceLTD",
    "text_message": "Hello! This is my first SMS from RoyceBulkSMS API."
}

# Send the SMS
response = requests.post(API_URL, json=data, headers=headers)

# Check the result
if response.status_code == 200:
    result = response.json()
    print("✓ SMS sent successfully!")
    print(f"Message ID: {result['data']['message_id']}")
    print(f"Status: {result['data']['status']}")
    print(f"Cost: KES {result['data']['cost']}")
else:
    print(f"✗ Error: {response.status_code}")
    print(response.text)

Success Response

If successful, you'll receive a response like this:

{ "success": true, "data": { "message_id": "f2672215-c20b-452a-9b6b-1ba51884c55e", "batch_id": "ba25e6fe-7aee-4df4-8f2c-062475061c62", "status": "pending", "recipient": "+254712345678", "sms_units": 1, "cost": "0.50", "balance_after": 9910 }, "message": "SMS queued successfully" }

Save the message_id! You'll need it to check delivery status.

3

Check Message Status

Use the message_id from Step 2 to check delivery status:

# Replace MESSAGE_ID with your actual message ID curl -X GET "https://roycetalk.com/api/v1/sms-api/messages/MESSAGE_ID/" \ -H "Authorization: Bearer YOUR_API_KEY"

Expected statuses:

  • pending - Message queued, awaiting delivery
  • sent - Submitted to carrier
  • delivered - Successfully delivered ✓
  • failed - Delivery failed
4

Check Your Balance

Check how many SMS units you have remaining:

curl -X GET "https://roycetalk.com/api/v1/sms-api/balance/" \ -H "Authorization: Bearer YOUR_API_KEY"

Response:

{ "success": true, "data": { "current_balance": 9910, "sms_rate": 0.50, "balance_value": 4955.00, "currency": "KES" } }

🎉 Congratulations!

You've successfully sent your first SMS with RoyceBulkSMS API!

Need Help?

Our support team is here to help you get started.

[email protected]