Sling API Documentation
If you have any questions that are beyond the scope of this documentation, please feel free to email via [email protected].
Introduction
Sling API uses header authentication. Get your api token from your dashboard and fuse it to use the API. Kindly follow the documentation promptly.
Base URL
https://app.sling.com.ng/api/v1
Headers:
Accept application/json
Authorization Bearer {API TOKEN}
Replace {API TOKEN} with the API Token in your dashboard
Send SMS
Send SMS URL
POST REQUEST
https://app.sling.com.ng/api/v1/send-sms
Headers:
Accept application/json
Authorization Bearer {API TOKEN}
Replace {API TOKEN} with the API Token in your dashboard
URL REQUEST
https://app.sling.com.ng/api/v1/send-sms?api_token=$api_token&to=$phone&message=$message&sender=Sling
Accepted Parameters
Parameter | Description | ||||
---|---|---|---|---|---|
to |
Recipient Phone Number 11 Digit phone or with country code 234 without the + |
||||
message |
Message to be sent Max of 3 pages |
||||
sender |
SenderID Sender ID Registered on Dashboard Register Sender ID Here |
||||
type |
Type (Optional) SenderID route (transactional , promotional) |
||||
callback |
Your API endpoint (Optional) Endpoint we will notify on success |
||||
contact |
Contact ID from Contact List (Optional) Contact ID View Contact list |
||||
group |
Group ID from Contacts (Optional) Group ID View Groups |
On success 200 OK:
{
"status": "success",
"message_id": "2bajqzt5tw",
"sender": "Sling",
"message": "Hello, from Sling",
"recipient": "2349123772222",
"credit_used": 1
}
Error Samples 400 Bad Request:
Insufficient Credit
{
"status": "fail",
"credit_used": "0",
"details": "insufficient credit"
}
Incomplete Parameters
{
"status": "fail",
"credit_used": "0",
"details": "The given data was invalid"
}
Check SMS Status
Check SMS Status URL
GET REQUEST
https://app.sling.com.ng/api/v1/status/{message_id}
Headers:
Accept application/json
Authorization Bearer {API TOKEN}
Replace {API TOKEN} with the API Token in your dashboard
Replace {message_id} with the Message ID of your message
On success 200 OK:
{
"status": "success",
"message_id": "0btn9fbaeg",
"credit_used": "1",
"sender": "13290",
"recipient": "2349123772222"
}
Error Samples 400 Bad Request:
Missing Message ID
{
"status": "fail",
"details": "Message ID is required"
}
Invalid Message ID
{
"status": "fail",
"details": "Invalid Message ID"
}
Send RCS
Send RCS URL
POST REQUEST
https://app.sling.com.ng/api/v1/send-rcs
Headers:
Accept application/json
Authorization Bearer {API TOKEN}
Replace {API TOKEN} with the API Token in your dashboard
Message Formats
Name | Body | ||||
---|---|---|---|---|---|
Simple Message |
|
||||
Simple Message with Reply Suggestions |
|
||||
Simple Card |
|
||||
Simple Card with Reply Suggestions |
|
||||
Simple Carousel |
|
||||
Simple Carousel with Reply Suggestions |
|
On success 200 OK:
{
"status": "success",
"message_id": "2bajqzt5tw",
"sender": "Sling RCS",
"message": "Hello, from Sling",
"recipient": "2349123772222",
"credit_used": 1
}
Error Samples 400 Bad Request:
Insufficient Credit
{
"status": "fail",
"credit_used": "0",
"details": "insufficient credit"
}
Incomplete Parameters
{
"status": "fail",
"credit_used": "0",
"details": "The given data was invalid"
}
RCS Suggestions Options
Use any of this object in the suggestions arrayRCS Suggestions
Type | Body | ||||
---|---|---|---|---|---|
reply |
|
||||
url |
|
||||
dialer |
|
||||
location_latlng |
|
||||
location_query |
|
||||
share_location |
|
||||
calendar_event |
|
Contacts API
List Groups
GET REQUEST
https://app.sling.com.ng/api/v1/groups
Group Contacts
GET REQUEST
https://app.sling.com.ng/api/v1/group-contacts/{groupid}
Create Group
POST REQUEST
https://app.sling.com.ng/api/v1/create-group
Add Single Contact
POST REQUEST
https://app.sling.com.ng/api/v1/add-contact
Add Multiple Contacts
POST REQUEST
https://app.sling.com.ng/api/v1/add-contacts
Update Contact
POST REQUEST
https://app.sling.com.ng/api/v1/update-contact/{contactid}
On success 200 OK:
{
"status": "success",
"balance": "339"
}
Available Balance
Available Balance URL
GET REQUEST
https://app.sling.com.ng/api/v1/balance
Headers:
Accept application/json
Authorization Bearer {API TOKEN}
Replace {API TOKEN} with the API Token in your dashboard
URL REQUEST
https://app.sling.com.ng/api/v1/balance?api_token=$api_token
On success 200 OK:
{
"status": "success",
"balance": "339"
}
Summary of Endpoints
Summary of Sling API Endpoints
Base URL
https://app.sling.com.ng/api/v1
Headers:
Accept application/json
Authorization Bearer {API TOKEN}
Replace {API TOKEN} with the API Token in your dashboard
Endpoint | METHOD | Description | ||||
---|---|---|---|---|---|---|
/send-sms |
POST |
Send SMS Sending SMS to recipient, group or contact |
||||
/status/{message_id} |
GET |
Check SMS Status To check status of SMS sent |
||||
/balance |
GET |
Available Balance Available Balance |
||||
/groups |
GET |
Groups Your contact groups |
||||
/group-contacts/{groupid} |
GET |
Group Contacts Contacts in a group |
||||
/create-group |
POST |
Create Group Create a new group |
||||
/add-contact |
POST |
Add Single Contact Add Single contact to group or as standalone |
||||
/add-contacts |
POST |
Add Multiple Contacts Add multiple Contacts to group or as standalone |
||||
/update-contact/{contactid} |
POST |
Update Contact Add Contacts to group or as standalone |
Fequently Asked Questions
How does your system work? | |
We use SenderID, Long Code and Shot Code to deliver Messsages |
|
Can I send SMS using my phone number? | |
Yes you can. You will have to send us your SIM Card. Kindly contact us for more info |
|
Can I get SMS at a cheaper rate? | |
We send SMS at a very low rate. But resellers and corporate entities will get a good discount! |
Thank you!
Once again, thank you so choosing Sling. We appreciate it very much. We wish you all the best with your upcoming projects! Feel free to drop us a message on [email protected] or via any of our social media accounts.
Have a great day and happy coding!