Introduction

FireSMS API Documentation

What is FireSMS

FireSMS is a developer first sms platform. As a developer, you can use it to send smses using the API. It is a simple, effective API for sending text messages

How to send an sms

To be able to send an SMS you need to have a FireSMS apiKey and funds in your account.

Using HTTP GET

GET Request
https://firesms.co/api/v1/send/sms/?apiKey=YOUR_API_KEY_HERE&message=Hello-World&phone=26658112211

cURL Example

curl https://firesms.co/api/v1/send/sms/?apiKey=YOUR_API_KEY_HERE&message=Hello-World&phone=26658112211

Javascript Example

firesms.js
async function sendSms() {
  const apiKey = "YOUR_API_KEY_HERE"
  const message = "Hello world"
  const phone = "26650112211"
 
  const HOST = "http://firesms.co"
  const apiResponse = await fetch(`${HOST}/api/v1/send/sms?apiKey=${apiKey}&message=${encodeURIComponent(message)}&phone=${phone}`);
  const responseData = await apiResponse.json();
  console.log({responseData})
}
 
sendSms();

Response code and messages

Success

{
  "message": "Sent",
  "balance": 0.4000000000000001,
  "cost": 0.2,
  "success": true
}

Invalid API apiKey

{
  "message": "Invalid apiKey",
  "success": false
}

Insufficient funds

{
  "message": "Insufficient balance",
  "success": false
}