MENU navbar-image

Introduction

This documentation aims to provide all the information you need to work with our API.

<aside>As you scroll, you'll see code examples for working with the API in different programming languages in the dark area to the right (or as part of the content on mobile).
You can switch the language used with the tabs at the top right (or from the nav menu at the top left on mobile).</aside>

Authenticating requests

To authenticate requests, include an Authorization header with the value "Bearer {YOUR_AUTH_KEY}".

All authenticated endpoints are marked with a requires authentication badge in the documentation below.

You can retrieve your token by visiting your dashboard and clicking Generate API token.

Call Log

Call Log

List all calls

requires authentication

Returns a list of calls. The calls are returned sorted by creation date, with the most recently created call appearing first.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/calls?type=Incoming&sim=1&answered=" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/calls"
);

const params = {
    "type": "Incoming",
    "sim": "1",
    "answered": "0",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/calls';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'type' => 'Incoming',
            'sim' => '1',
            'answered' => '0',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/calls'
params = {
  'type': 'Incoming',
  'sim': '1',
  'answered': '0',
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (200):


{
    "data": [
        {
            "id": 141,
            "number": "973-450-3511",
            "type": "Missed",
            "sim_id": 1,
            "started_at": "1991-01-07T14:12:01.000000Z",
            "duration": 1912
        },
        {
            "id": 142,
            "number": "724-602-7973",
            "type": "Voicemail",
            "sim_id": 1,
            "started_at": "1988-04-26T00:07:31.000000Z",
            "duration": 1669
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 100,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/v1/calls

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

type   string  optional  

Filter by call type. Example: Incoming

Must be one of:
  • Incoming
  • Outgoing
  • Missed
  • Voicemail
  • Rejected
  • Blocked
  • Answered Externally
sim   number  optional  

Filter by SIM ID. Must be at least 1. Example: 1

answered   boolean  optional  

Example: false

Response

Response Fields

id   integer   

The ID of the call.

number   string   

The phone number of the call.

type   string   

The type of the call.

sim_id   integer   

The ID of the SIM used for the call.

started_at   string   

The time when the call was started.

duration   integer   

The duration of the call in seconds.

Delete a call

requires authentication

Permanently deletes a call.

Example request:
curl --request DELETE \
    "https://smsgateway.rbsoft.org/api/v1/calls/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/calls/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/calls/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/calls/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (204, No content):

Empty response
 

Request      

DELETE api/v1/calls/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the call. Example: 1

Campaigns

Campaigns

List all campaigns

requires authentication

Returns a list of campaigns. The campaigns are returned sorted by creation date, with the most recently created campaign appearing first.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/campaigns?status=Sent&type=MMS&recurring=1&after=2021-01-01&before=2025-01-01" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/campaigns"
);

const params = {
    "status": "Sent",
    "type": "MMS",
    "recurring": "1",
    "after": "2021-01-01",
    "before": "2025-01-01",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/campaigns';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'status' => 'Sent',
            'type' => 'MMS',
            'recurring' => '1',
            'after' => '2021-01-01',
            'before' => '2025-01-01',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/campaigns'
params = {
  'status': 'Sent',
  'type': 'MMS',
  'recurring': '1',
  'after': '2021-01-01',
  'before': '2025-01-01',
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (200):


{
    "data": [
        {
            "id": 7,
            "name": "Leo Gusikowski",
            "scheduled_at": null,
            "timezone": "Atlantic/Faroe",
            "recurring": false,
            "frequency": null,
            "frequency_unit": null,
            "ends_at": null,
            "repeat_at": null,
            "active_hours": "09:00-17:00",
            "days_of_week": [
                1,
                3,
                5,
                6,
                7
            ],
            "status": "Processed",
            "type": "USSD Pull",
            "options": {
                "delay": "39",
                "prioritize": false
            },
            "created_at": "2025-09-08T05:42:25.000000Z",
            "updated_at": "2025-09-08T05:42:25.000000Z"
        },
        {
            "id": 8,
            "name": "Mr. Orland Hermiston II",
            "scheduled_at": "2026-05-01T21:31:16.000000Z",
            "timezone": "America/Boise",
            "recurring": false,
            "frequency": null,
            "frequency_unit": null,
            "ends_at": null,
            "repeat_at": null,
            "active_hours": "09:00-17:00",
            "days_of_week": [
                1,
                2,
                4,
                5
            ],
            "status": "Processed",
            "type": "SMS",
            "options": {
                "delay": "60",
                "prioritize": false,
                "delivery_report": false
            },
            "created_at": "2025-09-08T05:42:25.000000Z",
            "updated_at": "2025-09-08T05:42:25.000000Z"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 100,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/v1/campaigns

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

status   string  optional  

Filter by campaign status. Example: Sent

Must be one of:
  • Queued
  • Processing
  • Processed
  • Scheduled
  • Completed
type   string  optional  

Filter by campaign type. Example: MMS

Must be one of:
  • SMS
  • MMS
  • WhatsApp
  • USSD Pull
recurring   boolean  optional  

Filter by recurring campaigns. Example: true

after   string  optional  

Filter by campaigns after a certain date. Must be a valid date in the format Y-m-d. Must be a date before or equal to before. Example: 2021-01-01

before   string  optional  

Filter by campaigns before a certain date. Must be a valid date in the format Y-m-d. Must be a date after or equal to after. Example: 2025-01-01

Response

Response Fields

id   integer   

The ID of the campaign.

name   string   

The name of the campaign.

scheduled_at   string   

The date and time when the campaign is scheduled to run.

timezone   string   

The timezone of the campaign.

recurring   boolean   

Whether the campaign is recurring.

frequency   integer   

The frequency of the campaign.

frequency_unit   string   

The unit of the frequency.

ends_at   string   

The date and time when the recurring campaign ends.

repeat_at   string   

The date and time when the campaign is scheduled to repeat.

active_hours   string   

The timespan of a day when the campaign is active.

days_of_week   integer[]   

The days of the week when the campaign is active.

status   string   

The status of the campaign.

type   string   

The type of the campaign.

options   object   

The options of the campaign.

delay   string   

The delay between each item before sending the next one.

prioritize   boolean   

Whether to prioritize the campaign.

delivery_report   boolean   

Whether to request delivery report for SMS.

created_at   string   

The date and time the campaign was created.

updated_at   string   

The date and time the campaign was last updated.

Retrieve a campaign

requires authentication

Retrieves a Campaign object.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/campaigns/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/campaigns/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/campaigns/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/campaigns/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "id": 9,
    "name": "Stefanie Lebsack",
    "scheduled_at": "2025-10-23T01:36:18.000000Z",
    "timezone": "Asia/Atyrau",
    "recurring": false,
    "frequency": null,
    "frequency_unit": null,
    "ends_at": null,
    "repeat_at": null,
    "active_hours": "00:00-23:59",
    "days_of_week": [
        1,
        2,
        5,
        6
    ],
    "status": "Processed",
    "type": "SMS",
    "options": {
        "delay": "57",
        "prioritize": false,
        "delivery_report": true
    },
    "created_at": "2025-09-08T05:42:25.000000Z",
    "updated_at": "2025-09-08T05:42:25.000000Z"
}
 

Request      

GET api/v1/campaigns/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the campaign. Example: 1

Response

Response Fields

id   integer   

The ID of the campaign.

name   string   

The name of the campaign.

scheduled_at   string   

The date and time when the campaign is scheduled to run.

timezone   string   

The timezone of the campaign.

recurring   boolean   

Whether the campaign is recurring.

frequency   integer   

The frequency of the campaign.

frequency_unit   string   

The unit of the frequency.

ends_at   string   

The date and time when the recurring campaign ends.

repeat_at   string   

The date and time when the campaign is scheduled to repeat.

active_hours   string   

The timespan of a day when the campaign is active.

days_of_week   integer[]   

The days of the week when the campaign is active.

status   string   

The status of the campaign.

type   string   

The type of the campaign.

options   object   

The options of the campaign.

delay   string   

The delay between each item before sending the next one.

prioritize   boolean   

Whether to prioritize the campaign.

delivery_report   boolean   

Whether to request delivery report for SMS.

created_at   string   

The date and time the campaign was created.

updated_at   string   

The date and time the campaign was last updated.

List all devices used in a campaign

requires authentication

Returns a list of devices used in a campaign. The devices are returned with sims used in the campaign and status of the campaign on the device.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/campaigns/1/devices" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/campaigns/1/devices"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/campaigns/1/devices';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/campaigns/1/devices'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "data": [
        {
            "id": 11,
            "name": null,
            "model": "Nokia X20",
            "android_version": "7",
            "app_version": "0.20.34",
            "battery": 46,
            "is_charging": false,
            "enabled": true,
            "sims": [
                {
                    "id": 15,
                    "name": "Koelpin, Nolan and Bailey",
                    "label": null,
                    "number": "+15202822732",
                    "country": "SZ",
                    "carrier": "Miller Ltd",
                    "slot": 0,
                    "data_roaming": false,
                    "signal_strength": 4,
                    "active": true
                }
            ]
        },
        {
            "id": 12,
            "name": null,
            "model": "Xiaomi Mi 11",
            "android_version": "9",
            "app_version": "3.73.98",
            "battery": 71,
            "is_charging": false,
            "enabled": true,
            "sims": [
                {
                    "id": 16,
                    "name": "Hermiston, Parker and Marvin",
                    "label": null,
                    "number": "+13648507362",
                    "country": "GE",
                    "carrier": "Littel Ltd",
                    "slot": 0,
                    "data_roaming": false,
                    "signal_strength": 4,
                    "active": true
                }
            ]
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/v1/campaigns/{campaign_id}/devices

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

campaign_id   integer   

The ID of the campaign. Example: 1

Response

Response Fields

id   integer   

The ID of the device.

name   string   

The name of the device.

model   string   

The model of the device.

enabled   boolean   

Whether the user has logged in to the app on the device.

android_version   string   

The android version of the device.

app_version   string   

The app version installed on the device.

battery   integer   

The percentage of battery remaining on the device.

is_charging   boolean   

Whether the device is charging or not.

status   string   

The status of the campaign on the device.

Must be one of:
  • Pending
  • Queued
  • Stalled
  • Succeeded
  • Failed
  • Cancelling
  • Cancelled
sims   object[]   

The sims of the device that are used in the campaign.

*   object   
id   integer   

The ID of the sim.

name   string   

The name of the sim.

label   string   

The label of the sim.

number   string   

The number of the sim.

country   string   

The country of the sim.

carrier   string   

The carrier of the sim.

slot   integer   

The slot of the sim.

active   boolean   

Whether the sim is active or not.

List all sending servers used in a campaign

requires authentication

Returns a list of sending servers used in a campaign. The sending servers are returned with sender ids used in the campaign and status of the campaign on the sending server.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/campaigns/1/sending-servers" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/campaigns/1/sending-servers"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/campaigns/1/sending-servers';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/campaigns/1/sending-servers'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "data": [
        {
            "id": 3,
            "name": "Gideon Boyer",
            "enabled": true,
            "sender_ids": [
                {
                    "id": 21,
                    "value": "942561"
                }
            ]
        },
        {
            "id": 4,
            "name": "Bridgette D'Amore",
            "enabled": true,
            "sender_ids": [
                {
                    "id": 22,
                    "value": "597151"
                }
            ]
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/v1/campaigns/{campaign_id}/sending-servers

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

campaign_id   integer   

The ID of the campaign. Example: 1

Response

Response Fields

id   integer   

The ID of the sending server.

name   string   

The name of the sending server.

status   string   

The status of the campaign on this sending server.

Must be one of:
  • Pending
  • Queued
  • Stalled
  • Succeeded
  • Failed
  • Cancelling
  • Cancelled
sender_ids   object[]   

The sender ids of the sending server that are used in the campaign.

*   object   
id   integer   

The ID of the sender id.

value   string   

The value of the sender id.

Update a campaign

requires authentication

Updates the specific campaign by setting the values of the parameters passed.

Example request:
curl --request PUT \
    "https://smsgateway.rbsoft.org/api/v1/campaigns/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"New Campaign\"
}"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/campaigns/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "New Campaign"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/campaigns/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'New Campaign',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/campaigns/1'
payload = {
    "name": "New Campaign"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Example response (204, No content):

Empty response
 

Request      

PUT api/v1/campaigns/{id}

PATCH api/v1/campaigns/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the campaign. Example: 1

Body Parameters

name   string   

The name of the campaign. Must be at least 3 characters. Example: New Campaign

Delete a campaign

requires authentication

Permanently deletes a campaign. Also deletes all messages or USSD pulls associated with it. It cannot be undone.

Example request:
curl --request DELETE \
    "https://smsgateway.rbsoft.org/api/v1/campaigns/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/campaigns/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/campaigns/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/campaigns/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (204, No content):

Empty response
 

Request      

DELETE api/v1/campaigns/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the campaign. Example: 1

Contact Lists

Contact Lists

List all contact lists

requires authentication

Returns a list of contact lists. The contact lists are returned sorted by creation date, with the most recently created contact list appearing first.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/contact-lists" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/contact-lists"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/contact-lists';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/contact-lists'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "data": [
        {
            "id": 11,
            "name": "deborah.mayert"
        },
        {
            "id": 12,
            "name": "kuhn.jaclyn"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 10,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/v1/contact-lists

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Response

Response Fields

id   integer   

The ID of the contact list.

name   string   

The name of the contact list.

Retrieve a contact list

requires authentication

Retrieves a Contact List object.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/contact-lists/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/contact-lists/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/contact-lists/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/contact-lists/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "id": 13,
    "name": "deborah.mayert"
}
 

Request      

GET api/v1/contact-lists/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the contact list. Example: 1

Response

Response Fields

id   integer   

The ID of the contact list.

name   string   

The name of the contact list.

Create a contact list

requires authentication

Example request:
curl --request POST \
    "https://smsgateway.rbsoft.org/api/v1/contact-lists" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"My List\"
}"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/contact-lists"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "My List"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/contact-lists';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'My List',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/contact-lists'
payload = {
    "name": "My List"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (201, Created):


{
    "id": 14,
    "name": "brown.maggie"
}
 

Request      

POST api/v1/contact-lists

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

The name of the contact list. Must be unique. Must be at least 3 characters. Example: My List

Response

Response Fields

id   integer   

The ID of the contact list.

name   string   

The name of the contact list.

Update a contact list

requires authentication

Updates the specific contact list by setting the values of the parameters passed.

Example request:
curl --request PUT \
    "https://smsgateway.rbsoft.org/api/v1/contact-lists/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"My List\"
}"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/contact-lists/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "My List"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/contact-lists/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'My List',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/contact-lists/1'
payload = {
    "name": "My List"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Example response (204, No content):

Empty response
 

Request      

PUT api/v1/contact-lists/{id}

PATCH api/v1/contact-lists/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the contact list. Example: 1

Body Parameters

name   string   

The name of the contact list. Must be unique. Must be at least 3 characters. Example: My List

Delete a contact list

requires authentication

Permanently deletes the specific contact list. Also deletes all contacts and fields associated with it. It cannot be undone.

Example request:
curl --request DELETE \
    "https://smsgateway.rbsoft.org/api/v1/contact-lists/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/contact-lists/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/contact-lists/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/contact-lists/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (204, No content):

Empty response
 

Request      

DELETE api/v1/contact-lists/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the contact list. Example: 1

List all fields for a contact list

requires authentication

Returns a list of fields for a contact list. The fields are returned sorted by creation date, with the most recently created field appearing first.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/contact-lists/1/fields" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/contact-lists/1/fields"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/contact-lists/1/fields';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/contact-lists/1/fields'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "data": [
        {
            "id": 21,
            "label": "Itaque",
            "tag": "itaque",
            "type": "email",
            "options": null,
            "default_value": "non",
            "required": true
        },
        {
            "id": 22,
            "label": "Sed",
            "tag": "sed",
            "type": "multiselect",
            "options": [
                {
                    "label": "quasi",
                    "value": "commodi"
                },
                {
                    "label": "tempore",
                    "value": "in"
                },
                {
                    "label": "qui",
                    "value": "hic"
                },
                {
                    "label": "sequi",
                    "value": "corrupti"
                },
                {
                    "label": "et",
                    "value": "enim"
                }
            ],
            "default_value": [
                "in"
            ],
            "required": true
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 50,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/v1/contact-lists/{contact_list_id}/fields

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

contact_list_id   integer   

The ID of the contact list. Example: 1

Response

Response Fields

id   integer   

The ID of the field.

label   string   

The label of the field.

tag   string   

The tag of the field.

type   string   

The type of the field.

Must be one of:
  • text
  • number
  • email
  • dropdown
  • multiselect
  • checkbox
  • radio
  • date
  • datetime-local
  • time
  • textarea
options   object[]   

List of all possible options for the field.

*   object   
label   string   

The label of the option.

value   string   

The value of the option.

default_value   string   

The default value of the field.

required   boolean   

Whether the field is required or not.

Retrieve a field

requires authentication

Retrieves a Field object.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/fields/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/fields/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/fields/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/fields/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "id": 23,
    "label": "Non",
    "tag": "non",
    "type": "email",
    "options": null,
    "default_value": "aspernatur",
    "required": true
}
 

Request      

GET api/v1/fields/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the field. Example: 1

Response

Response Fields

id   integer   

The ID of the field.

label   string   

The label of the field.

tag   string   

The tag of the field.

type   string   

The type of the field.

Must be one of:
  • text
  • number
  • email
  • dropdown
  • multiselect
  • checkbox
  • radio
  • date
  • datetime-local
  • time
  • textarea
options   object[]   

List of all possible options for the field.

*   object   
label   string   

The label of the option.

value   string   

The value of the option.

default_value   string   

The default value of the field.

required   boolean   

Whether the field is required or not.

Create a field for a contact list

requires authentication

Example request:
curl --request POST \
    "https://smsgateway.rbsoft.org/api/v1/contact-lists/1/fields" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"label\": \"First Name\",
    \"tag\": \"first_name\",
    \"type\": \"text\",
    \"default_value\": \"John\",
    \"required\": false,
    \"options\": [
        {
            \"label\": \"Option 1\",
            \"value\": \"option_1\"
        }
    ]
}"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/contact-lists/1/fields"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "label": "First Name",
    "tag": "first_name",
    "type": "text",
    "default_value": "John",
    "required": false,
    "options": [
        {
            "label": "Option 1",
            "value": "option_1"
        }
    ]
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/contact-lists/1/fields';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'label' => 'First Name',
            'tag' => 'first_name',
            'type' => 'text',
            'default_value' => 'John',
            'required' => false,
            'options' => [
                [
                    'label' => 'Option 1',
                    'value' => 'option_1',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/contact-lists/1/fields'
payload = {
    "label": "First Name",
    "tag": "first_name",
    "type": "text",
    "default_value": "John",
    "required": false,
    "options": [
        {
            "label": "Option 1",
            "value": "option_1"
        }
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (201, Created):


{
    "id": 24,
    "label": "Est",
    "tag": "est",
    "type": "dropdown",
    "options": [
        {
            "label": "repellat",
            "value": "ut"
        },
        {
            "label": "est",
            "value": "accusantium"
        },
        {
            "label": "eaque",
            "value": "unde"
        },
        {
            "label": "enim",
            "value": "id"
        },
        {
            "label": "id",
            "value": "dolorem"
        }
    ],
    "default_value": null,
    "required": false
}
 

Request      

POST api/v1/contact-lists/{contact_list_id}/fields

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

contact_list_id   integer   

The ID of the contact list. Example: 1

Body Parameters

label   string   

The label of the field. Must be at least 3 characters. Must not be greater than 50 characters. Example: First Name

tag   string   

The tag of the field. Must contain only letters, numbers, dashes and underscores. Must not be one of mobile_number or subscribed Must be at least 3 characters. Must not be greater than 50 characters. Example: first_name

type   string   

The type of the field. Example: text

Must be one of:
  • text
  • number
  • email
  • dropdown
  • multiselect
  • checkbox
  • radio
  • date
  • datetime-local
  • time
  • textarea
options   object[]  optional  

List of all possible options for the field. This field is required when type is checkbox, dropdown, multiselect, or radio.

label   string   

The label of the option. Must be at least 3 characters. Example: Option 1

value   string   

The value of the option. Must contain only letters, numbers, dashes and underscores. Example: option_1

default_value   string  optional  

The default value of the field. Example: John

required   boolean   

Whether the field is required or not. Example: false

Response

Response Fields

id   integer   

The ID of the field.

label   string   

The label of the field.

tag   string   

The tag of the field.

type   string   

The type of the field.

Must be one of:
  • text
  • number
  • email
  • dropdown
  • multiselect
  • checkbox
  • radio
  • date
  • datetime-local
  • time
  • textarea
options   object[]   

List of all possible options for the field.

*   object   
label   string   

The label of the option.

value   string   

The value of the option.

default_value   string   

The default value of the field.

required   boolean   

Whether the field is required or not.

Update a field

requires authentication

Updates the specific field by setting the values of the parameters passed. It is recommended to retrieve the field first to get the field's current state because partial updates are not supported.

Example request:
curl --request PUT \
    "https://smsgateway.rbsoft.org/api/v1/fields/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"label\": \"First Name\",
    \"tag\": \"first_name\",
    \"type\": \"text\",
    \"default_value\": \"John\",
    \"required\": false,
    \"options\": [
        {
            \"label\": \"Option 1\",
            \"value\": \"option_1\"
        }
    ]
}"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/fields/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "label": "First Name",
    "tag": "first_name",
    "type": "text",
    "default_value": "John",
    "required": false,
    "options": [
        {
            "label": "Option 1",
            "value": "option_1"
        }
    ]
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/fields/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'label' => 'First Name',
            'tag' => 'first_name',
            'type' => 'text',
            'default_value' => 'John',
            'required' => false,
            'options' => [
                [
                    'label' => 'Option 1',
                    'value' => 'option_1',
                ],
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/fields/1'
payload = {
    "label": "First Name",
    "tag": "first_name",
    "type": "text",
    "default_value": "John",
    "required": false,
    "options": [
        {
            "label": "Option 1",
            "value": "option_1"
        }
    ]
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Example response (204, No content):

Empty response
 

Request      

PUT api/v1/fields/{id}

PATCH api/v1/fields/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the field. Example: 1

Body Parameters

label   string   

The label of the field. Must be at least 3 characters. Must not be greater than 50 characters. Example: First Name

tag   string   

The tag of the field. Must contain only letters, numbers, dashes and underscores. Must not be one of mobile_number or subscribed Must be at least 3 characters. Must not be greater than 50 characters. Example: first_name

type   string   

The type of the field. Example: text

Must be one of:
  • text
  • number
  • email
  • dropdown
  • multiselect
  • checkbox
  • radio
  • date
  • datetime-local
  • time
  • textarea
options   object[]  optional  

List of all possible options for the field. This field is required when type is checkbox, dropdown, multiselect, or radio.

label   string   

The label of the option. Must be at least 3 characters. Example: Option 1

value   string   

The value of the option. Must contain only letters, numbers, dashes and underscores. Example: option_1

default_value   string  optional  

The default value of the field. Example: John

required   boolean   

Whether the field is required or not. Example: false

Delete a field

requires authentication

Permanently deletes a field. Also deletes all associated field values of contacts. It cannot be undone.

Example request:
curl --request DELETE \
    "https://smsgateway.rbsoft.org/api/v1/fields/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/fields/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/fields/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/fields/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (204, No content):

Empty response
 

Request      

DELETE api/v1/fields/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the field. Example: 1

Contacts

Contacts

List all contacts for a contact list

requires authentication

Returns a list of contacts for a contact list. The contacts are returned sorted by creation date, with the most recently created contact appearing first.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/contact-lists/1/contacts" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/contact-lists/1/contacts"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/contact-lists/1/contacts';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/contact-lists/1/contacts'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "data": [
        {
            "id": 2001,
            "mobile_number": "+14329282957",
            "subscribed": true,
            "created_at": "2025-09-08T05:42:25.000000Z",
            "updated_at": "2025-09-08T05:42:25.000000Z"
        },
        {
            "id": 2002,
            "mobile_number": "+18058165575",
            "subscribed": false,
            "created_at": "2025-09-08T05:42:25.000000Z",
            "updated_at": "2025-09-08T05:42:25.000000Z"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 100,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/v1/contact-lists/{contact_list_id}/contacts

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

contact_list_id   integer   

The ID of the contact list. Example: 1

Response

Response Fields

id   integer   

The ID of the contact.

mobile_number   string   

The mobile number of the contact.

first_name   string   

The first name of the contact. This is a custom field, so if you didn't set it up, then it won't be available.

last_name   string   

The last name of the contact. This is a custom field, so if you didn't set it up, then it won't be available.

subscribed   boolean   

Whether the contact is subscribed or not.

created_at   string   

The date and time when the contact was created.

updated_at   string   

The date and time when the contact was last updated.

Retrieve a contact

requires authentication

Retrieves a Contact object.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/contacts/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/contacts/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/contacts/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/contacts/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "id": 2003,
    "mobile_number": "+19475350806",
    "subscribed": true,
    "created_at": "2025-09-08T05:42:25.000000Z",
    "updated_at": "2025-09-08T05:42:25.000000Z"
}
 

Request      

GET api/v1/contacts/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the contact. Example: 1

Response

Response Fields

id   integer   

The ID of the contact.

mobile_number   string   

The mobile number of the contact.

first_name   string   

The first name of the contact. This is a custom field, so if you didn't set it up, then it won't be available.

last_name   string   

The last name of the contact. This is a custom field, so if you didn't set it up, then it won't be available.

subscribed   boolean   

Whether the contact is subscribed or not.

created_at   string   

The date and time when the contact was created.

updated_at   string   

The date and time when the contact was last updated.

Create a contact in a contact list

requires authentication

Example request:
curl --request POST \
    "https://smsgateway.rbsoft.org/api/v1/contact-lists/1/contacts" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mobile_number\": \"+12025886500\",
    \"subscribed\": false,
    \"first_name\": \"John\",
    \"last_name\": \"Doe\"
}"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/contact-lists/1/contacts"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "mobile_number": "+12025886500",
    "subscribed": false,
    "first_name": "John",
    "last_name": "Doe"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/contact-lists/1/contacts';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'mobile_number' => '+12025886500',
            'subscribed' => false,
            'first_name' => 'John',
            'last_name' => 'Doe',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/contact-lists/1/contacts'
payload = {
    "mobile_number": "+12025886500",
    "subscribed": false,
    "first_name": "John",
    "last_name": "Doe"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (201, Created):


{
    "id": 2004,
    "mobile_number": "+19475350806",
    "subscribed": true,
    "created_at": "2025-09-08T05:42:25.000000Z",
    "updated_at": "2025-09-08T05:42:25.000000Z"
}
 

Request      

POST api/v1/contact-lists/{contact_list_id}/contacts

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

contact_list_id   integer   

The ID of the contact list. Example: 1

Body Parameters

mobile_number   string   

The mobile number of the contact. Example: +12025886500

subscribed   boolean   

Whether the contact is subscribed to the contact list. Example: false

first_name   string   

The first name of the contact. This is a custom field so if you didn't set it up, it won't be available. Example: John

last_name   string  optional  

The last name of the contact. This is a custom field so if you didn't set it up, it won't be available. Example: Doe

Response

Response Fields

id   integer   

The ID of the contact.

mobile_number   string   

The mobile number of the contact.

first_name   string   

The first name of the contact. This is a custom field, so if you didn't set it up, then it won't be available.

last_name   string   

The last name of the contact. This is a custom field, so if you didn't set it up, then it won't be available.

subscribed   boolean   

Whether the contact is subscribed or not.

created_at   string   

The date and time when the contact was created.

updated_at   string   

The date and time when the contact was last updated.

Update a contact

requires authentication

Update a contact in a contact list with the given data. It is recommended to retrieve the contact first to get the contact's current state because partial updates are not supported.

Example request:
curl --request PUT \
    "https://smsgateway.rbsoft.org/api/v1/contacts/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"mobile_number\": \"+12025886500\",
    \"subscribed\": false,
    \"first_name\": \"John\",
    \"last_name\": \"Doe\"
}"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/contacts/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "mobile_number": "+12025886500",
    "subscribed": false,
    "first_name": "John",
    "last_name": "Doe"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/contacts/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'mobile_number' => '+12025886500',
            'subscribed' => false,
            'first_name' => 'John',
            'last_name' => 'Doe',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/contacts/1'
payload = {
    "mobile_number": "+12025886500",
    "subscribed": false,
    "first_name": "John",
    "last_name": "Doe"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Example response (204, No content):

Empty response
 

Request      

PUT api/v1/contacts/{id}

PATCH api/v1/contacts/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the contact. Example: 1

Body Parameters

mobile_number   string   

The mobile number of the contact. Example: +12025886500

subscribed   boolean   

Whether the contact is subscribed to the contact list. Example: false

first_name   string   

The first name of the contact. This is a custom field so if you didn't set it up, it won't be available. Example: John

last_name   string  optional  

The last name of the contact. This is a custom field so if you didn't set it up, it won't be available. Example: Doe

Delete a contact

requires authentication

Permanently deletes a contact. It cannot be undone.

Example request:
curl --request DELETE \
    "https://smsgateway.rbsoft.org/api/v1/contacts/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/contacts/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/contacts/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/contacts/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (204, No content):

Empty response
 

Request      

DELETE api/v1/contacts/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the contact. Example: 1

Devices

Devices

List all devices

requires authentication

Returns a list of devices. The devices are returned sorted by creation date, with the most recently created device appearing first.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/devices" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/devices"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/devices';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/devices'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "data": [
        {
            "id": 13,
            "name": null,
            "model": "Nokia X20",
            "enabled": true,
            "android_version": "7",
            "app_version": "0.20.34",
            "battery": 46,
            "is_charging": false,
            "updated_at": "2025-09-08T05:42:25.000000Z",
            "sims": [
                {
                    "id": 17,
                    "name": "Nitzsche, Rogahn and Jakubowski",
                    "label": null,
                    "number": "+16284319281",
                    "country": "IL",
                    "carrier": "Gerhold, Walter and Schinner",
                    "slot": 0,
                    "data_roaming": false,
                    "signal_strength": 4,
                    "active": true
                }
            ]
        },
        {
            "id": 14,
            "name": null,
            "model": "OnePlus Nord 2 5G",
            "enabled": true,
            "android_version": "11",
            "app_version": "3.40.82",
            "battery": 0,
            "is_charging": true,
            "updated_at": "2025-09-08T05:42:25.000000Z",
            "sims": [
                {
                    "id": 18,
                    "name": "Langosh, Waters and Wolf",
                    "label": null,
                    "number": "+13108318149",
                    "country": "BW",
                    "carrier": "Boehm LLC",
                    "slot": 0,
                    "data_roaming": true,
                    "signal_strength": 2,
                    "active": true
                }
            ]
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 100,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/v1/devices

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Response

Response Fields

id   integer   

The ID of the device.

name   string   

The name of the device.

model   string   

The model of the device.

enabled   boolean   

Whether the user has logged in to the app on the device.

android_version   string   

The android version of the device.

app_version   string   

The app version installed on the device.

battery   integer   

The percentage of battery remaining on the device.

is_charging   boolean   

Whether the device is charging or not.

updated_at   datetime   

The last time the device was updated.

sims   object   

List of all sims on the device.

*   object   
id   integer   

The ID of the sim.

name   string   

The name of the sim.

label   string   

The label of the sim.

number   string   

The number of the sim.

country   string   

The country of the sim.

carrier   string   

The carrier of the sim.

slot   integer   

The slot of the sim.

active   boolean   

Whether the sim is active or not.

Retrieve a device

requires authentication

Retrieves a Device object.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/devices/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/devices/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/devices/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/devices/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "id": 15,
    "name": null,
    "model": "Nokia X20",
    "enabled": true,
    "android_version": "7",
    "app_version": "0.20.34",
    "battery": 46,
    "is_charging": false,
    "updated_at": "2025-09-08T05:42:25.000000Z",
    "sims": [
        {
            "id": 19,
            "name": "Carter, Zieme and Oberbrunner",
            "label": null,
            "number": "+16819707512",
            "country": "KM",
            "carrier": "Kassulke-Ankunding",
            "slot": 0,
            "data_roaming": true,
            "signal_strength": 3,
            "active": true
        }
    ]
}
 

Request      

GET api/v1/devices/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the device. Example: 1

Response

Response Fields

id   integer   

The ID of the device.

name   string   

The name of the device.

model   string   

The model of the device.

enabled   boolean   

Whether the user has logged in to the app on the device.

android_version   string   

The android version of the device.

app_version   string   

The app version installed on the device.

battery   integer   

The percentage of battery remaining on the device.

is_charging   boolean   

Whether the device is charging or not.

updated_at   datetime   

The last time the device was updated.

sims   object   

List of all sims on the device.

*   object   
id   integer   

The ID of the sim.

name   string   

The name of the sim.

label   string   

The label of the sim.

number   string   

The number of the sim.

country   string   

The country of the sim.

carrier   string   

The carrier of the sim.

slot   integer   

The slot of the sim.

active   boolean   

Whether the sim is active or not.

Update a device

requires authentication

Update the specific device by setting the values of the parameters passed.

Example request:
curl --request PUT \
    "https://smsgateway.rbsoft.org/api/v1/devices/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"My Device\"
}"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/devices/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "My Device"
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/devices/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'My Device',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/devices/1'
payload = {
    "name": "My Device"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Example response (204, No content):

Empty response
 

Request      

PUT api/v1/devices/{id}

PATCH api/v1/devices/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the device. Example: 1

Body Parameters

name   string  optional  

The name of the device. Must be at least 3 characters. Must not be greater than 255 characters. Example: My Device

Delete a device

requires authentication

Permanently deletes a device. Also removes the SIMs associated with the device and any messages, USSD Pulls and call logs associated with those SIMs. It cannot be undone.

Example request:
curl --request DELETE \
    "https://smsgateway.rbsoft.org/api/v1/devices/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/devices/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/devices/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/devices/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (204, No content):

Empty response
 

Request      

DELETE api/v1/devices/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the device. Example: 1

Messages

Messages

Send messages

requires authentication

Send an SMS or MMS campaign.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/messages/send" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sims\": [
        1
    ],
    \"sender_ids\": [
        1
    ],
    \"random_sender\": false,
    \"contact_lists\": [
        1
    ],
    \"mobile_numbers\": [
        \"+12345678901\"
    ],
    \"type\": \"SMS\",
    \"message\": \"Hello, World!\",
    \"attachments\": [
        \"https:\\/\\/example.com\\/image.jpg\"
    ],
    \"delivery_report\": false,
    \"delay\": 60,
    \"prioritize\": false,
    \"name\": \"My Campaign\",
    \"scheduled_at\": \"2021-01-01T12:00:00Z\",
    \"recurring\": false,
    \"frequency\": 1,
    \"frequency_unit\": \"day\",
    \"ends_at\": \"2021-01-01T12:00:00Z\",
    \"timezone\": \"UTC\",
    \"days_of_week\": [
        1
    ],
    \"active_hours\": {
        \"start\": \"08:00\",
        \"end\": \"17:00\"
    }
}"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/messages/send"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "sims": [
        1
    ],
    "sender_ids": [
        1
    ],
    "random_sender": false,
    "contact_lists": [
        1
    ],
    "mobile_numbers": [
        "+12345678901"
    ],
    "type": "SMS",
    "message": "Hello, World!",
    "attachments": [
        "https:\/\/example.com\/image.jpg"
    ],
    "delivery_report": false,
    "delay": 60,
    "prioritize": false,
    "name": "My Campaign",
    "scheduled_at": "2021-01-01T12:00:00Z",
    "recurring": false,
    "frequency": 1,
    "frequency_unit": "day",
    "ends_at": "2021-01-01T12:00:00Z",
    "timezone": "UTC",
    "days_of_week": [
        1
    ],
    "active_hours": {
        "start": "08:00",
        "end": "17:00"
    }
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/messages/send';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'sims' => [
                1,
            ],
            'sender_ids' => [
                1,
            ],
            'random_sender' => false,
            'contact_lists' => [
                1,
            ],
            'mobile_numbers' => [
                '+12345678901',
            ],
            'type' => 'SMS',
            'message' => 'Hello, World!',
            'attachments' => [
                'https://example.com/image.jpg',
            ],
            'delivery_report' => false,
            'delay' => 60,
            'prioritize' => false,
            'name' => 'My Campaign',
            'scheduled_at' => '2021-01-01T12:00:00Z',
            'recurring' => false,
            'frequency' => 1,
            'frequency_unit' => 'day',
            'ends_at' => '2021-01-01T12:00:00Z',
            'timezone' => 'UTC',
            'days_of_week' => [
                1,
            ],
            'active_hours' => [
                'start' => '08:00',
                'end' => '17:00',
            ],
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/messages/send'
payload = {
    "sims": [
        1
    ],
    "sender_ids": [
        1
    ],
    "random_sender": false,
    "contact_lists": [
        1
    ],
    "mobile_numbers": [
        "+12345678901"
    ],
    "type": "SMS",
    "message": "Hello, World!",
    "attachments": [
        "https:\/\/example.com\/image.jpg"
    ],
    "delivery_report": false,
    "delay": 60,
    "prioritize": false,
    "name": "My Campaign",
    "scheduled_at": "2021-01-01T12:00:00Z",
    "recurring": false,
    "frequency": 1,
    "frequency_unit": "day",
    "ends_at": "2021-01-01T12:00:00Z",
    "timezone": "UTC",
    "days_of_week": [
        1
    ],
    "active_hours": {
        "start": "08:00",
        "end": "17:00"
    }
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload)
response.json()

Example response (201, Created):


{
    "id": 10,
    "name": "Blaise Pouros",
    "scheduled_at": "2025-12-16T20:37:14.000000Z",
    "timezone": "America/Indiana/Knox",
    "recurring": true,
    "frequency": 5,
    "frequency_unit": "Minute",
    "ends_at": "2026-09-05T09:37:44.000000Z",
    "repeat_at": null,
    "active_hours": "09:00-17:00",
    "days_of_week": [
        1,
        3,
        5,
        7
    ],
    "status": "Processed",
    "type": "MMS",
    "options": {
        "delay": "34",
        "prioritize": true
    },
    "created_at": "2025-09-08T05:42:25.000000Z",
    "updated_at": "2025-09-08T05:42:25.000000Z"
}
 

Request      

GET api/v1/messages/send

POST api/v1/messages/send

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

sims   integer[]  optional  

The ids of the sims to use for sending the messages. You can also set the first element to * and it will use all available sims. This field is required when sender_ids is not present.

sender_ids   integer[]  optional  

The ids of the sender ids to use for sending the messages. You can also set the first element to * and it will use all available sender ids. This field is required when sims is not present.

random_sender   boolean  optional  

Whether to use a random sim or sender id from selected sims or sender_ids for entire campaign. Example: false

contact_lists   integer[]  optional  

The ids of the contact lists to send the messages. This field is required when mobile_numbers is not present. This field is prohibited when mobile_numbers is present.

mobile_numbers   string[]  optional  

The mobile numbers to send the messages. This field is required when contact_lists is not present. This field is prohibited when contact_lists is present.

type   string  optional  

The type of the message. Example: SMS

Must be one of:
  • SMS
  • MMS
  • WhatsApp
message   string  optional  

The message to send. This field is required when type is SMS. This field is required when attachments is not present. Must not be greater than 1600 characters. Example: Hello, World!

attachments   string[]  optional  

The array of file URLs you want to send as attachments with the message. This field is prohibited when type is not MMS.

delivery_report   boolean  optional  

Whether to request a delivery report for the message. This field is prohibited when type is not SMS. Example: false

delay   string  optional  

The delay between messages in seconds. This field is prohibited when sims is not present. Example: 60

prioritize   boolean  optional  

Whether to prioritize the campaign. This field is prohibited when sims is not present. Example: false

name   string  optional  

The name of the campaign. Must not be greater than 255 characters. Example: My Campaign

scheduled_at   string  optional  

The date and time the campaign is scheduled to run. Must be a valid date. Example: 2021-01-01T12:00:00Z

recurring   boolean  optional  

Whether the campaign is recurring. Example: false

frequency   integer  optional  

The frequency of the campaign. This field is required when recurring is true. Must be at least 1. Example: 1

frequency_unit   string  optional  

The unit of the frequency. This field is required when recurring is true. Example: day

Must be one of:
  • Minute
  • Hour
  • Day
  • Week
  • Month
  • Year
ends_at   string  optional  

The date and time when the recurring campaign ends. Must be a valid date. Example: 2021-01-01T12:00:00Z

timezone   string  optional  

The timezone of the campaign. This is used for scheduled_at, ends_at, days_of_week, and active_hours. This field is required when active_hours, days_of_week, scheduled_at, or ends_at is present. Must be a valid time zone, such as Africa/Accra. Example: UTC

days_of_week   string[]  optional  

The days of the week when the campaign is active.

Must be one of:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
active_hours   object  optional  

Must contain 2 items.

start   string  optional  

The start time of the active hours. This field is required when active_hours.end is present. Must be a valid date in the format H:i. Must be a date before active_hours.end. Example: 08:00

end   string  optional  

The end time of the active hours. This field is required when active_hours.start is present. Must be a valid date in the format H:i. Must be a date after active_hours.start. Example: 17:00

Response

Response Fields

id   integer   

The ID of the campaign.

name   string   

The name of the campaign.

scheduled_at   string   

The date and time when the campaign is scheduled to run.

timezone   string   

The timezone of the campaign.

recurring   boolean   

Whether the campaign is recurring.

frequency   integer   

The frequency of the campaign.

frequency_unit   string   

The unit of the frequency.

ends_at   string   

The date and time when the recurring campaign ends.

repeat_at   string   

The date and time when the campaign is scheduled to repeat.

active_hours   string   

The timespan of a day when the campaign is active.

days_of_week   integer[]   

The days of the week when the campaign is active.

status   string   

The status of the campaign.

type   string   

The type of the campaign.

options   object   

The options of the campaign.

delay   string   

The delay between each item before sending the next one.

prioritize   boolean   

Whether to prioritize the campaign.

delivery_report   boolean   

Whether to request delivery report for SMS.

created_at   string   

The date and time the campaign was created.

updated_at   string   

The date and time the campaign was last updated.

List all messages

requires authentication

Returns a list of messages. The messages are returned sorted by sent date, with the most recently sent message appearing first.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/messages?user=1&campaign=1&sim=1&message=Hello%2C+World%21&type=SMS&statuses[]=Queued&after=2021-01-01&before=2024-01-01" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/messages"
);

const params = {
    "user": "1",
    "campaign": "1",
    "sim": "1",
    "message": "Hello, World!",
    "type": "SMS",
    "statuses[0]": "Queued",
    "after": "2021-01-01",
    "before": "2024-01-01",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/messages';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'user' => '1',
            'campaign' => '1',
            'sim' => '1',
            'message' => 'Hello, World!',
            'type' => 'SMS',
            'statuses[0]' => 'Queued',
            'after' => '2021-01-01',
            'before' => '2024-01-01',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/messages'
params = {
  'user': '1',
  'campaign': '1',
  'sim': '1',
  'message': 'Hello, World!',
  'type': 'SMS',
  'statuses[0]': 'Queued',
  'after': '2021-01-01',
  'before': '2024-01-01',
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (200):


{
    "data": [
        {
            "id": 2061,
            "from": "+17345017250",
            "to": "+19899609500",
            "content": "Itaque non aspernatur odio nam incidunt. Distinctio quam sed quasi commodi tempore.",
            "type": "SMS",
            "attachments": [],
            "status": "Sent",
            "response": [],
            "messenger": "Sim #20",
            "sent_at": "2025-09-07T08:20:33.000000Z",
            "delivered_at": "2025-09-08T05:42:25.000000Z"
        },
        {
            "id": 2062,
            "from": "+13309437084",
            "to": "+14094483472",
            "content": "Porro aut tempora ut possimus odit. Sed rem ducimus est ut voluptatum porro repudiandae doloremque. In est id sed voluptatem.",
            "type": "WhatsApp",
            "attachments": [],
            "status": "Queued",
            "response": [],
            "messenger": "Sim #21",
            "sent_at": "2025-09-07T15:42:10.000000Z",
            "delivered_at": "2025-09-08T05:42:25.000000Z"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 100,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/v1/messages

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

user   number  optional  

Filter by user id. Only available for admin. Must be at least 1. Example: 1

campaign   number  optional  

Filter by campaign id. Must be at least 1. Example: 1

sim   number  optional  

Filter by sim id. This field is prohibited if sender_id is present. Must be at least 1. Example: 1

message   string  optional  

Filter by message. Must not be greater than 1600 characters. Example: Hello, World!

type   string  optional  

Filter by message type. Example: SMS

Must be one of:
  • SMS
  • MMS
  • WhatsApp
statuses   string[]  optional  
Must be one of:
  • Pending
  • Queued
  • Processed
  • Sent
  • Delivered
  • Failed
  • Received
after   string  optional  

Filter by messages that are sent after this date. Must be a valid date in the format Y-m-d. Must be a date before or equal to before. Example: 2021-01-01

before   string  optional  

Filter by messages that are sent before this date. Must be a valid date in the format Y-m-d. Must be a date after or equal to after. Example: 2024-01-01

Response

Response Fields

id   integer   

The ID of the message.

from   string   

The sender of the message.

to   string   

The recipient of the message.

content   string   

The content of the message.

type   string   

The type of the message.

attachments   string[]   

List of all attachments for the message.

status   string   

The status of the message.

Must be one of:
  • Pending
  • Queued
  • Processed
  • Sent
  • Delivered
  • Failed
  • Received
response   object   

The response received from the device or sending server.

messenger   string   

The sim or sender id used for the message.

sent_at   string   

The date and time when the message was sent.

delivered_at   string   

The date and time when the message was delivered.

Retrieve a message

requires authentication

Retrieves a Message object.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/messages/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/messages/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/messages/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/messages/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "id": 2063,
    "from": "+15045565946",
    "to": "+14322823398",
    "content": "Eveniet et quasi qui corporis quae sequi. Est rerum quam recusandae omnis dolore. Perferendis et et amet earum illum qui.",
    "type": "WhatsApp",
    "attachments": [],
    "status": "Sent",
    "response": [],
    "messenger": "Sim #22",
    "sent_at": "2025-09-08T00:09:04.000000Z",
    "delivered_at": "2025-09-08T05:42:25.000000Z"
}
 

Request      

GET api/v1/messages/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the message. Example: 1

Response

Response Fields

id   integer   

The ID of the message.

from   string   

The sender of the message.

to   string   

The recipient of the message.

content   string   

The content of the message.

type   string   

The type of the message.

attachments   string[]   

List of all attachments for the message.

status   string   

The status of the message.

Must be one of:
  • Pending
  • Queued
  • Processed
  • Sent
  • Delivered
  • Failed
  • Received
response   object   

The response received from the device or sending server.

messenger   string   

The sim or sender id used for the message.

sent_at   string   

The date and time when the message was sent.

delivered_at   string   

The date and time when the message was delivered.

Delete a message

requires authentication

Permanently deletes a message. It cannot be undone.

Example request:
curl --request DELETE \
    "https://smsgateway.rbsoft.org/api/v1/messages/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/messages/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/messages/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/messages/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (204, No content):

Empty response
 

Request      

DELETE api/v1/messages/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the message. Example: 1

SenderIds

SenderIds

List all sender ids

requires authentication

Returns a list of sender ids. The sender ids are returned sorted by creation date, with the most recently created sender id appearing first.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/sender-ids" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/sender-ids"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/sender-ids';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/sender-ids'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "data": [
        {
            "id": 23,
            "value": "647973"
        },
        {
            "id": 24,
            "value": "731066"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 100,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/v1/sender-ids

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Response

Response Fields

id   integer   

The ID of the sender id.

value   string   

The value of the sender id.

Retrieve a sender id

requires authentication

Retrieves a SenderId object.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/sender-ids/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/sender-ids/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/sender-ids/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/sender-ids/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "id": 25,
    "value": "574311"
}
 

Request      

GET api/v1/sender-ids/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the sender id. Example: 1

Response

Response Fields

id   integer   

The ID of the sender id.

value   string   

The value of the sender id.

Create a sender id for a sending server

requires authentication

Example request:
curl --request POST \
    "https://smsgateway.rbsoft.org/api/v1/sending-servers/1/sender-ids" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"value\": \"MySenderID\"
}"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/sending-servers/1/sender-ids"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "value": "MySenderID"
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/sending-servers/1/sender-ids';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'value' => 'MySenderID',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/sending-servers/1/sender-ids'
payload = {
    "value": "MySenderID"
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (201, Created):


{
    "id": 26,
    "value": "583848"
}
 

Request      

POST api/v1/sending-servers/{sending_server_id}/sender-ids

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

sending_server_id   integer   

The ID of the sending server. Example: 1

Body Parameters

value   string   

The sender id value. Must not be greater than 11 characters. Example: MySenderID

Response

Response Fields

id   integer   

The ID of the sender id.

value   string   

The value of the sender id.

Delete a sender id

requires authentication

Permanently deletes a sender id. Also removes any messages sent using this sender id. It cannot be undone.

Example request:
curl --request DELETE \
    "https://smsgateway.rbsoft.org/api/v1/sender-ids/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/sender-ids/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/sender-ids/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/sender-ids/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (204, No content):

Empty response
 

Request      

DELETE api/v1/sender-ids/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the sender id. Example: 1

Sending Servers

Sending Servers

List all sending servers

requires authentication

Returns a list of sending servers. The sending servers are returned sorted by creation date, with the most recently created sending server appearing first.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/sending-servers" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/sending-servers"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/sending-servers';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/sending-servers'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "data": [
        {
            "id": 5,
            "name": "Gideon Boyer",
            "driver": "Textlocal",
            "supported_types": [
                "SMS"
            ],
            "config": {
                "url": "https://api.textlocal.in",
                "test": true,
                "api_key": "NDQ2NDYyNGQ0OTY2NGU3Njc5Nzc0ZTM0Njk2NjQzNjI="
            },
            "enabled": true,
            "created_at": "2025-09-08T05:42:25.000000Z"
        },
        {
            "id": 6,
            "name": "Amelia Koelpin",
            "driver": "Textlocal",
            "supported_types": [
                "MMS"
            ],
            "config": {
                "url": "https://api.textlocal.in",
                "test": true,
                "api_key": "NDQ2NDYyNGQ0OTY2NGU3Njc5Nzc0ZTM0Njk2NjQzNjI="
            },
            "enabled": true,
            "created_at": "2025-09-08T05:42:25.000000Z"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 100,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/v1/sending-servers

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Response

Response Fields

id   integer   

The ID of the sending server.

name   string   

The name of the sending server.

driver   string   

The driver of the sending server.

supported_types   string[]   

The types of messages supported by the sending server.

config   object   

The sending server configuration.

enabled   boolean   

Whether the sending server is enabled or not.

created_at   string   

The date and time when the sending server was created.

Retrieve a sending server

requires authentication

Retrieves a SendingServer object.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/sending-servers/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/sending-servers/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/sending-servers/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/sending-servers/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "id": 7,
    "name": "Gideon Boyer",
    "driver": "Textlocal",
    "supported_types": [
        "SMS"
    ],
    "config": {
        "url": "https://api.textlocal.in",
        "test": true,
        "api_key": "NDQ2NDYyNGQ0OTY2NGU3Njc5Nzc0ZTM0Njk2NjQzNjI="
    },
    "enabled": true,
    "created_at": "2025-09-08T05:42:25.000000Z"
}
 

Request      

GET api/v1/sending-servers/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the sending server. Example: 1

Response

Response Fields

id   integer   

The ID of the sending server.

name   string   

The name of the sending server.

driver   string   

The driver of the sending server.

supported_types   string[]   

The types of messages supported by the sending server.

config   object   

The sending server configuration.

enabled   boolean   

Whether the sending server is enabled or not.

created_at   string   

The date and time when the sending server was created.

Create a sending server

requires authentication

Example request:
curl --request POST \
    "https://smsgateway.rbsoft.org/api/v1/sending-servers" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Twilio\",
    \"driver\": \"twilio\",
    \"supported_types\": [
        \"MMS\"
    ],
    \"config\": {
        \"account_sid\": \"ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",
        \"auth_token\": \"your_auth_token\",
        \"from\": \"+15017122661\"
    },
    \"enabled\": false
}"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/sending-servers"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Twilio",
    "driver": "twilio",
    "supported_types": [
        "MMS"
    ],
    "config": {
        "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "auth_token": "your_auth_token",
        "from": "+15017122661"
    },
    "enabled": false
};

fetch(url, {
    method: "POST",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/sending-servers';
$response = $client->post(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Twilio',
            'driver' => 'twilio',
            'supported_types' => [
                'MMS',
            ],
            'config' => [
                'account_sid' => 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
                'auth_token' => 'your_auth_token',
                'from' => '+15017122661',
            ],
            'enabled' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/sending-servers'
payload = {
    "name": "Twilio",
    "driver": "twilio",
    "supported_types": [
        "MMS"
    ],
    "config": {
        "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "auth_token": "your_auth_token",
        "from": "+15017122661"
    },
    "enabled": false
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('POST', url, headers=headers, json=payload)
response.json()

Example response (201, Created):


{
    "id": 8,
    "name": "Gideon Boyer",
    "driver": "Textlocal",
    "supported_types": [
        "SMS"
    ],
    "config": {
        "url": "https://api.textlocal.in",
        "test": true,
        "api_key": "NDQ2NDYyNGQ0OTY2NGU3Njc5Nzc0ZTM0Njk2NjQzNjI="
    },
    "enabled": true,
    "created_at": "2025-09-08T05:42:25.000000Z"
}
 

Request      

POST api/v1/sending-servers

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

name   string   

The name of the sending server. Example: Twilio

driver   string   

The driver of the sending server. Example: twilio

Must be one of:
  • Custom
  • Textlocal
  • Twilio
supported_types   string[]   
Must be one of:
  • SMS
  • MMS
  • WhatsApp
config   object   

The configuration for the sending server.

enabled   boolean   

The status of the sending server. Example: false

Response

Response Fields

id   integer   

The ID of the sending server.

name   string   

The name of the sending server.

driver   string   

The driver of the sending server.

supported_types   string[]   

The types of messages supported by the sending server.

config   object   

The sending server configuration.

enabled   boolean   

Whether the sending server is enabled or not.

created_at   string   

The date and time when the sending server was created.

Update a sending server

requires authentication

Update the specific sending server by setting the values of the parameters passed. It is recommended to retrieve the sending server first to get the sending server's current state because partial updates are not supported.

Example request:
curl --request PUT \
    "https://smsgateway.rbsoft.org/api/v1/sending-servers/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"name\": \"Twilio\",
    \"driver\": \"twilio\",
    \"supported_types\": [
        \"MMS\"
    ],
    \"config\": {
        \"account_sid\": \"ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX\",
        \"auth_token\": \"your_auth_token\",
        \"from\": \"+15017122661\"
    },
    \"enabled\": false
}"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/sending-servers/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "name": "Twilio",
    "driver": "twilio",
    "supported_types": [
        "MMS"
    ],
    "config": {
        "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "auth_token": "your_auth_token",
        "from": "+15017122661"
    },
    "enabled": false
};

fetch(url, {
    method: "PUT",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/sending-servers/1';
$response = $client->put(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'name' => 'Twilio',
            'driver' => 'twilio',
            'supported_types' => [
                'MMS',
            ],
            'config' => [
                'account_sid' => 'ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
                'auth_token' => 'your_auth_token',
                'from' => '+15017122661',
            ],
            'enabled' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/sending-servers/1'
payload = {
    "name": "Twilio",
    "driver": "twilio",
    "supported_types": [
        "MMS"
    ],
    "config": {
        "account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
        "auth_token": "your_auth_token",
        "from": "+15017122661"
    },
    "enabled": false
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('PUT', url, headers=headers, json=payload)
response.json()

Example response (204, No content):

Empty response
 

Request      

PUT api/v1/sending-servers/{id}

PATCH api/v1/sending-servers/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the sending server. Example: 1

Body Parameters

name   string   

The name of the sending server. Example: Twilio

driver   string   

The driver of the sending server. Example: twilio

Must be one of:
  • Custom
  • Textlocal
  • Twilio
supported_types   string[]   
Must be one of:
  • SMS
  • MMS
  • WhatsApp
config   object   

The configuration for the sending server.

enabled   boolean   

The status of the sending server. Example: false

Delete a sending server

requires authentication

Permanently deletes a sending server. Also removes sender ids associated with the sending server and any messages associated with those sender ids. It cannot be undone.

Example request:
curl --request DELETE \
    "https://smsgateway.rbsoft.org/api/v1/sending-servers/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/sending-servers/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/sending-servers/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/sending-servers/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (204, No content):

Empty response
 

Request      

DELETE api/v1/sending-servers/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the sending server. Example: 1

USSD Pulls

USSD Pulls

Send USSD pulls

requires authentication

Sends USSD Pull campaign.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/ussd-pulls/send" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json" \
    --data "{
    \"sims\": [
        1
    ],
    \"ussd_codes\": [
        \"*123#\"
    ],
    \"delay\": 60,
    \"prioritize\": false,
    \"name\": \"My Campaign\",
    \"scheduled_at\": \"2021-01-01T12:00:00Z\",
    \"recurring\": false,
    \"frequency\": 1,
    \"frequency_unit\": \"day\",
    \"ends_at\": \"2021-01-01T12:00:00Z\",
    \"timezone\": \"UTC\",
    \"days_of_week\": [
        1
    ],
    \"active_hours\": {
        \"start\": \"08:00\",
        \"end\": \"17:00\"
    },
    \"random_sender\": false
}"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/ussd-pulls/send"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

let body = {
    "sims": [
        1
    ],
    "ussd_codes": [
        "*123#"
    ],
    "delay": 60,
    "prioritize": false,
    "name": "My Campaign",
    "scheduled_at": "2021-01-01T12:00:00Z",
    "recurring": false,
    "frequency": 1,
    "frequency_unit": "day",
    "ends_at": "2021-01-01T12:00:00Z",
    "timezone": "UTC",
    "days_of_week": [
        1
    ],
    "active_hours": {
        "start": "08:00",
        "end": "17:00"
    },
    "random_sender": false
};

fetch(url, {
    method: "GET",
    headers,
    body: JSON.stringify(body),
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/ussd-pulls/send';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'json' => [
            'sims' => [
                1,
            ],
            'ussd_codes' => [
                '*123#',
            ],
            'delay' => 60,
            'prioritize' => false,
            'name' => 'My Campaign',
            'scheduled_at' => '2021-01-01T12:00:00Z',
            'recurring' => false,
            'frequency' => 1,
            'frequency_unit' => 'day',
            'ends_at' => '2021-01-01T12:00:00Z',
            'timezone' => 'UTC',
            'days_of_week' => [
                1,
            ],
            'active_hours' => [
                'start' => '08:00',
                'end' => '17:00',
            ],
            'random_sender' => false,
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/ussd-pulls/send'
payload = {
    "sims": [
        1
    ],
    "ussd_codes": [
        "*123#"
    ],
    "delay": 60,
    "prioritize": false,
    "name": "My Campaign",
    "scheduled_at": "2021-01-01T12:00:00Z",
    "recurring": false,
    "frequency": 1,
    "frequency_unit": "day",
    "ends_at": "2021-01-01T12:00:00Z",
    "timezone": "UTC",
    "days_of_week": [
        1
    ],
    "active_hours": {
        "start": "08:00",
        "end": "17:00"
    },
    "random_sender": false
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, json=payload)
response.json()

Example response (201, Created):


{
    "id": 14,
    "name": "Blaise Pouros",
    "scheduled_at": "2025-12-16T20:37:15.000000Z",
    "timezone": "America/Indiana/Knox",
    "recurring": true,
    "frequency": 5,
    "frequency_unit": "Minute",
    "ends_at": "2026-09-05T09:37:45.000000Z",
    "repeat_at": null,
    "active_hours": "09:00-17:00",
    "days_of_week": [
        1,
        3,
        5,
        7
    ],
    "status": "Processed",
    "type": "MMS",
    "options": {
        "delay": "34",
        "prioritize": true
    },
    "created_at": "2025-09-08T05:42:26.000000Z",
    "updated_at": "2025-09-08T05:42:26.000000Z"
}
 

Request      

GET api/v1/ussd-pulls/send

POST api/v1/ussd-pulls/send

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Body Parameters

sims   integer[]   

The ids of the sims to use for sending the USSD pulls. You can also set the first element to * and it will use all available sims.

ussd_codes   string[]   

The array of USSD codes to send. Must match the regex /(?:*\d+)+#/.

delay   string  optional  

The delay in seconds between each USSD pull. Example: 60

prioritize   boolean  optional  

Whether to prioritize the campaign. Example: false

name   string  optional  

The name of the campaign. Must not be greater than 255 characters. Example: My Campaign

scheduled_at   string  optional  

The date and time the campaign is scheduled to run. Must be a valid date. Example: 2021-01-01T12:00:00Z

recurring   boolean  optional  

Whether the campaign is recurring. Example: false

frequency   integer  optional  

The frequency of the campaign. This field is required when recurring is true. Must be at least 1. Example: 1

frequency_unit   string  optional  

The unit of the frequency. This field is required when recurring is true. Example: day

Must be one of:
  • Minute
  • Hour
  • Day
  • Week
  • Month
  • Year
ends_at   string  optional  

The date and time when the recurring campaign ends. Must be a valid date. Example: 2021-01-01T12:00:00Z

timezone   string  optional  

The timezone of the campaign. This is used for scheduled_at, ends_at, days_of_week, and active_hours. This field is required when active_hours, days_of_week, scheduled_at, or ends_at is present. Must be a valid time zone, such as Africa/Accra. Example: UTC

days_of_week   string[]  optional  

The days of the week when the campaign is active.

Must be one of:
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
active_hours   object  optional  

Must contain 2 items.

start   string  optional  

The start time of the active hours. This field is required when active_hours.end is present. Must be a valid date in the format H:i. Must be a date before active_hours.end. Example: 08:00

end   string  optional  

The end time of the active hours. This field is required when active_hours.start is present. Must be a valid date in the format H:i. Must be a date after active_hours.start. Example: 17:00

random_sender   boolean  optional  

Whether to use a random sim from selected sims for entire campaign. Example: false

Response

Response Fields

id   integer   

The ID of the campaign.

name   string   

The name of the campaign.

scheduled_at   string   

The date and time when the campaign is scheduled to run.

timezone   string   

The timezone of the campaign.

recurring   boolean   

Whether the campaign is recurring.

frequency   integer   

The frequency of the campaign.

frequency_unit   string   

The unit of the frequency.

ends_at   string   

The date and time when the recurring campaign ends.

repeat_at   string   

The date and time when the campaign is scheduled to repeat.

active_hours   string   

The timespan of a day when the campaign is active.

days_of_week   integer[]   

The days of the week when the campaign is active.

status   string   

The status of the campaign.

type   string   

The type of the campaign.

options   object   

The options of the campaign.

delay   string   

The delay between each item before sending the next one.

prioritize   boolean   

Whether to prioritize the campaign.

delivery_report   boolean   

Whether to request delivery report for SMS.

created_at   string   

The date and time the campaign was created.

updated_at   string   

The date and time the campaign was last updated.

List all USSD pulls

requires authentication

Returns a list of USSD pulls. The USSD pulls are returned sorted by sent date, with the most recently sent USSD pull appearing first.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/ussd-pulls?user=1&campaign=1&sim=1&statuses[]=Queued&after=2021-01-01&before=2021-01-01" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/ussd-pulls"
);

const params = {
    "user": "1",
    "campaign": "1",
    "sim": "1",
    "statuses[0]": "Queued",
    "after": "2021-01-01",
    "before": "2021-01-01",
};
Object.keys(params)
    .forEach(key => url.searchParams.append(key, params[key]));

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/ussd-pulls';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
        'query' => [
            'user' => '1',
            'campaign' => '1',
            'sim' => '1',
            'statuses[0]' => 'Queued',
            'after' => '2021-01-01',
            'before' => '2021-01-01',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/ussd-pulls'
params = {
  'user': '1',
  'campaign': '1',
  'sim': '1',
  'statuses[0]': 'Queued',
  'after': '2021-01-01',
  'before': '2021-01-01',
}
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers, params=params)
response.json()

Example response (200):


{
    "data": [
        {
            "id": 281,
            "code": "*3434200#",
            "response": null,
            "status": "Failed",
            "sim_id": 23,
            "sent_at": "2025-09-08T11:12:26.000000Z",
            "received_at": null
        },
        {
            "id": 282,
            "code": "*32721213140#",
            "response": "Aut tempora ut possimus odit nisi sed rem ducimus. Ut voluptatum porro repudiandae doloremque qui in. Id sed voluptatem saepe magnam dicta tempore blanditiis quos.",
            "status": "Completed",
            "sim_id": 24,
            "sent_at": "2025-09-08T11:12:26.000000Z",
            "received_at": "2025-09-08T12:31:12.000000Z"
        }
    ],
    "links": {
        "first": "/?page=1",
        "last": "/?page=1",
        "prev": null,
        "next": null
    },
    "meta": {
        "current_page": 1,
        "from": 1,
        "last_page": 1,
        "links": [
            {
                "url": null,
                "label": "&laquo; Previous",
                "page": null,
                "active": false
            },
            {
                "url": "/?page=1",
                "label": "1",
                "page": 1,
                "active": true
            },
            {
                "url": null,
                "label": "Next &raquo;",
                "page": null,
                "active": false
            }
        ],
        "path": "/",
        "per_page": 100,
        "to": 2,
        "total": 2
    }
}
 

Request      

GET api/v1/ussd-pulls

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

Query Parameters

user   number  optional  

Filter by user id. Only available for admin. Must be at least 1. Example: 1

campaign   number  optional  

Filter by campaign id. Must be at least 1. Example: 1

sim   number  optional  

Filter by sim id. Must be at least 1. Example: 1

statuses   string[]  optional  
Must be one of:
  • Pending
  • Queued
  • Completed
  • Failed
after   string  optional  

Show USSD pulls that are sent after this date. Must be a valid date in the format Y-m-d. Must be a date before or equal to before. Example: 2021-01-01

before   string  optional  

Show USSD pulls that are sent before this date. Must be a valid date in the format Y-m-d. Must be a date after or equal to after. Example: 2021-01-01

Response

Response Fields

id   integer   

The ID of the USSD pull.

code   string   

The USSD code.

response   string   

The response from the USSD pull.

status   string   

The status of the USSD pull.

Must be one of:
  • Pending
  • Queued
  • Completed
  • Failed
sim_id   integer   

The id of the sim used to send the USSD pull.

sent_at   string   

The date and time when the USSD pull was sent.

received_at   string   

The date and time when the response from the USSD pull was received.

Retrieve a USSD pull

requires authentication

Retrieves a USSD Pull object.

Example request:
curl --request GET \
    --get "https://smsgateway.rbsoft.org/api/v1/ussd-pulls/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/ussd-pulls/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "GET",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/ussd-pulls/1';
$response = $client->get(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/ussd-pulls/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('GET', url, headers=headers)
response.json()

Example response (200):


{
    "id": 283,
    "code": "*00268*8#",
    "response": null,
    "status": "Failed",
    "sim_id": 25,
    "sent_at": "2025-09-08T11:12:26.000000Z",
    "received_at": null
}
 

Request      

GET api/v1/ussd-pulls/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the ussd pull. Example: 1

Response

Response Fields

id   integer   

The ID of the USSD pull.

code   string   

The USSD code.

response   string   

The response from the USSD pull.

status   string   

The status of the USSD pull.

Must be one of:
  • Pending
  • Queued
  • Completed
  • Failed
sim_id   integer   

The id of the sim used to send the USSD pull.

sent_at   string   

The date and time when the USSD pull was sent.

received_at   string   

The date and time when the response from the USSD pull was received.

Delete a USSD pull

requires authentication

Permanently deletes a USSD pull. It cannot be undone.

Example request:
curl --request DELETE \
    "https://smsgateway.rbsoft.org/api/v1/ussd-pulls/1" \
    --header "Authorization: Bearer {YOUR_AUTH_KEY}" \
    --header "Content-Type: application/json" \
    --header "Accept: application/json"
const url = new URL(
    "https://smsgateway.rbsoft.org/api/v1/ussd-pulls/1"
);

const headers = {
    "Authorization": "Bearer {YOUR_AUTH_KEY}",
    "Content-Type": "application/json",
    "Accept": "application/json",
};

fetch(url, {
    method: "DELETE",
    headers,
}).then(response => response.json());
$client = new \GuzzleHttp\Client();
$url = 'https://smsgateway.rbsoft.org/api/v1/ussd-pulls/1';
$response = $client->delete(
    $url,
    [
        'headers' => [
            'Authorization' => 'Bearer {YOUR_AUTH_KEY}',
            'Content-Type' => 'application/json',
            'Accept' => 'application/json',
        ],
    ]
);
$body = $response->getBody();
print_r(json_decode((string) $body));
import requests
import json

url = 'https://smsgateway.rbsoft.org/api/v1/ussd-pulls/1'
headers = {
  'Authorization': 'Bearer {YOUR_AUTH_KEY}',
  'Content-Type': 'application/json',
  'Accept': 'application/json'
}

response = requests.request('DELETE', url, headers=headers)
response.json()

Example response (204, No content):

Empty response
 

Request      

DELETE api/v1/ussd-pulls/{id}

Headers

Authorization      

Example: Bearer {YOUR_AUTH_KEY}

Content-Type      

Example: application/json

Accept      

Example: application/json

URL Parameters

id   integer   

The ID of the ussd pull. Example: 1