FireSMS

Quickstart

Get up and running with Fire SMS in minutes

Quickstart

Get up and running with Fire SMS in under 5 minutes.

Create an account

Sign up at https://next.firesms.co.

Generate an API key

Head to the API Keys section of your dashboard and click New Key. Give it a name and copy the key — you can always reveal it later using your password.

Store your API key securely. Never expose it in client-side code or public repositories. Always pass it via the Authorization header.

Send your first text

Pass your API key in the Authorization header using the Bearer scheme.

curl -X POST https://next.firesms.co/api/v1/send \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+27821234567",
    "text": "Hello from Fire SMS!"
  }'
async function sendSms() {
  const apiKey = "YOUR_API_KEY"
  const message = "Hello from Fire SMS!"
  const phone = "+27821234567"

  const response = await fetch('https://next.firesms.co/api/v1/send', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${apiKey}`,
      'Content-Type': 'application/json',
    },
    body: JSON.stringify({
      to: phone,
      text: message,
    }),
  })

  const data = await response.json()
  console.log(data)
}

sendSms()
import requests

def send_sms():
    api_key = "YOUR_API_KEY"
    message = "Hello from Fire SMS!"
    phone = "+27821234567"

    response = requests.post(
        'https://next.firesms.co/api/v1/send',
        headers={
            'Authorization': f'Bearer {api_key}',
            'Content-Type': 'application/json',
        },
        json={
            'to': phone,
            'text': message,
        }
    )

    data = response.json()
    print(data)

send_sms()

Response

{
  "status": "queued",
  "id": "msg_abc123",
  "cost": 0.25,
  "remaining_credits": 99.75,
  "low_credits": false
}
FieldTypeDescription
statusstring"queued" when the message was accepted for delivery
idstringUnique message ID for tracking
costnumberThe credit cost for this message
remaining_creditsnumberYour remaining account credits after the send
low_creditsbooleantrue if credits are running low
{
  "status": "error",
  "error": "Invalid or missing Authorization header"
}

HTTP Status: 401 Unauthorized

Double-check your API key in the dashboard. Make sure the Authorization header is formatted as Bearer YOUR_API_KEY with no extra spaces.

{
  "status": "error",
  "error": "Insufficient credits"
}

HTTP Status: 402 Payment Required

Top up your account credits in the dashboard before sending further messages. Each SMS deducts credits based on the destination and message length.