๐ 5-Minute Quick Start Guide
Get from zero to your first SMS in under 5 minutes with Sendly - the "Resend of SMS".
- โ Send your first SMS in under 5 minutes
 - โ Understand smart routing (automatic optimal number selection)
 - โ Set up webhook delivery notifications
 - โ Learn about international messaging
 - โ Explore MMS capabilities
 
๐ Prerequisitesโ
Before we start, make sure you have:
- ๐ A Sendly account (sign up here)
 - ๐ฑ A valid phone number to test with (your own works great!)
 - ๐ป Terminal or code editor ready
 
This guide takes less than 5 minutes to complete. Each step is timed for your convenience!
Step 1: Get Your API Key 30 secondsโ
1. Sign Upโ
Visit sendly.live and create your free account.
2. Dashboardโ
Log in and navigate to the API Keys section.
3. Create Keyโ
Click "Create API Key" or copy your existing one.
4. Copy Keyโ
Your API key format: sl_live_ or sl_test_ + 40 characters
sl_live_V4iD8is9kqZYdIdzRBIypJ2IascwSi0_
Never expose your API key in client-side code or public repositories. Use environment variables!
Step 2: Send Your First SMS 2 minutesโ
Choose your preferred method to send your first SMS:
- ๐ cURL (Fastest)
 - ๐ฆ Node.js SDK
 - ๐ Python SDK
 - ๐ PHP
 
Perfect for quick testing and getting familiar with our API.
# Set your API key (replace with your actual key)
export SENDLY_API_KEY="sl_live_YOUR_API_KEY"
# Send your first SMS
curl -X POST https://sendly.live/api/v1/send \
  -H "Authorization: Bearer $SENDLY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+1234567890",
    "text": "Hello from Sendly! ๐ This is my first SMS."
  }'
Expected Response:
{
  "messageId": "msg_2cY8vH8LkQx3J5oP",
  "status": "queued",
  "from": "+18005551234",
  "to": "+1234567890",
  "text": "Hello from Sendly! ๐ This is my first SMS.",
  "routing": {
    "numberType": "toll-free",
    "coverage": "high",
    "reason": "smart-routing"
  },
  "cost": {
    "amount": 0.0075,
    "currency": "USD"
  }
}
Our official TypeScript/JavaScript SDK makes integration seamless.
npm install @sendly/node
import { SendlyClient } from '@sendly/node';
const sendly = new SendlyClient({
  apiKey: 'sl_live_YOUR_API_KEY'
});
async function sendFirstSMS() {
  try {
    const result = await sendly.sms.send({
      to: '+1234567890',
      text: 'Hello from Sendly! ๐ This is my first SMS.',
      messageType: 'transactional' // Optional: helps with routing
    });
    
    console.log('โ
 SMS sent successfully!');
    console.log('๐ฑ Message ID:', result.messageId);
    console.log('๐ Smart routing:', result.routing.reason);
    console.log('๐ฐ Cost:', `$${result.cost.amount} ${result.cost.currency}`);
    
    return result;
  } catch (error) {
    console.error('โ Error:', error.message);
  }
}
sendFirstSMS();
node send-first-sms.js
Our brand new Python SDK with full feature parity.
pip install sendly
from sendly import Sendly
def send_first_sms():
    # Initialize the client
    client = Sendly(api_key='sl_live_YOUR_API_KEY')
    
    try:
        # Send SMS
        response = client.sms.send(
            to='+1234567890',
            text='Hello from Sendly! ๐ This is my first SMS.',
            message_type='transactional'  # Optional: helps with routing
        )
        
        print('โ
 SMS sent successfully!')
        print(f'๐ฑ Message ID: {response.id}')
        print(f'๐ Smart routing: {response.routing.reason}')
        print(f'๐ฐ Cost: ${response.cost.amount} {response.cost.currency}')
        
        return response
        
    except Exception as error:
        print(f'โ Error: {error}')
    finally:
        client.close()
if __name__ == '__main__':
    send_first_sms()
python send_first_sms.py
Simple HTTP request using PHP's built-in cURL functions.
<?php
function sendFirstSMS() {
    $apiKey = 'sl_live_YOUR_API_KEY';
    $url = 'https://sendly.live/api/v1/send';
    
    $data = [
        'to' => '+1234567890',
        'text' => 'Hello from Sendly! ๐ This is my first SMS.'
    ];
    
    $headers = [
        'Authorization: Bearer ' . $apiKey,
        'Content-Type: application/json'
    ];
    
    $ch = curl_init();
    curl_setopt($ch, CURLOPT_URL, $url);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    
    $response = curl_exec($ch);
    $httpCode = curl_getinfo($ch, CURLINFO_HTTP_CODE);
    curl_close($ch);
    
    if ($httpCode === 200) {
        $result = json_decode($response, true);
        echo "โ
 SMS sent successfully!\n";
        echo "๐ฑ Message ID: " . $result['messageId'] . "\n";
        echo "๐ Smart routing: " . $result['routing']['reason'] . "\n";
        echo "๐ฐ Cost: $" . $result['cost']['amount'] . " " . $result['cost']['currency'] . "\n";
    } else {
        echo "โ Error: " . $response . "\n";
    }
}
sendFirstSMS();
?>
Use API keys starting with sl_test_ for testing. No SMS will be sent and no charges apply!
Step 3: Understanding Smart Routing 1 minuteโ
Notice the routing object in your response? That's Sendly's Smart Routing in action!
๐บ๐ธ US/Canadaโ
Auto-selected: Toll-free numbers
Benefits: Higher delivery rates, professional appearance
Cost: $0.0075 per SMS
๐ฌ๐ง United Kingdomโ
Auto-selected: Local UK numbers
Benefits: Better local delivery, lower costs
Cost: $0.045 per SMS
๐จ๐ณ Chinaโ
Auto-selected: Compliant local routing
Benefits: Regulatory compliance, reliable delivery
Cost: $0.065 per SMS
๐ 200+ Countriesโ
Auto-selected: Optimal local numbers
Benefits: Global coverage, smart routing
Cost: Varies by destination
Message Types for Better Routing:
transactional- Order confirmations, receipts (highest priority)otp- Verification codes, 2FA (high priority)marketing- Promotional messages (standard routing)alert- System alerts, emergencies (priority routing)
Step 4: Add Webhooks (Optional) 1 minuteโ
Get real-time delivery notifications:
- Basic Webhook
 - Webhook Handler
 
const result = await sendly.sms.send({
  to: '+1234567890',
  text: 'Hello with webhook!',
  webhookUrl: 'https://your-app.com/webhook/sms'
});
import express from 'express';
import crypto from 'crypto';
const app = express();
app.use(express.json());
app.post('/webhook/sms', (req, res) => {
  // Verify webhook signature (recommended)
  const signature = req.headers['x-sendly-signature'];
  const payload = JSON.stringify(req.body);
  const expectedSignature = crypto
    .createHmac('sha256', 'your-webhook-secret')
    .update(payload)
    .digest('hex');
  
  if (`sha256=${expectedSignature}` !== signature) {
    return res.status(401).send('Invalid signature');
  }
  
  // Handle the webhook
  const { messageId, status, to, timestamp } = req.body;
  
  console.log(`๐ฑ Message ${messageId} to ${to}: ${status}`);
  
  // Update your database, send notifications, etc.
  
  res.status(200).send('OK');
});
app.listen(3000);
Webhook Events:
message.queued- Message accepted and queuedmessage.sent- Message sent to carriermessage.delivered- Message delivered to devicemessage.failed- Message delivery failed
๐ Congratulations!โ
You've successfully sent your first SMS with Sendly! Here's what you've learned:
โ
 API Integration
Successfully called the Sendly API and sent an SMS
๐ฏ Smart Routing
Experienced automatic optimal number selection
๐ Response Data
Learned about message IDs, routing info, and costs
๐ Webhooks
Understood real-time delivery notifications
๐ What's Next?โ
๐ Explore Our SDKsโ
- Node.js SDK Guide - TypeScript support, full features
 - Python SDK Guide - Pythonic interface, type hints
 - SDK Comparison - Feature matrix
 
๐ฎ Try Interactive Docsโ
- API Playground - Test endpoints in browser
 - Postman Collection - Import and explore
 - OpenAPI Spec - Complete API reference
 
๐ Learn Advanced Featuresโ
- MMS/Media Messages - Send images and videos
 - International Messaging - Global coverage
 - Best Practices - Production tips
 
๐ง Integrate & Buildโ
- Webhook Security - Secure webhook handling
 - Error Handling - Robust error management
 - Rate Limiting - Optimize throughput
 
- ๐ฌ Discord Community - Join discord.gg/sendly for real-time support
 - ๐ง Email Support - Reach out to support@sendly.live
 - ๐ Documentation - Browse our comprehensive guides and API reference
 - ๐ Issues - Report bugs on GitHub
 
Ready for Production? ๐โ
Upgrade to a live API key and start sending real SMS messages to your users.