Mercy Global Communications | API Access for Developers & Resellers

API Access for Developers & Resellers

Our BulkSMS API allows you to connect to our system to send BulkSMS Remotely on your own website or other platforms. You can find your API Key in your client area.

Traditional SMS Request

The only requirement is to POST data to the Mercy Global Communications server via JSON. The section below describes how to create this POST with cURL

curl https://api.mercyglobal.com.ng/ \
-H "Auth: Client API_KEY" \ -H "Content-Type: application/json" \ -d '{"cmd":"SMS","SMS":{"Sender":"JohnDoe","Recipient":"23480000000","Message":"Hello world"}}' \ -X POST


SMS With Options (Flash Message)

The network has a provision for options. An example flash message below:

curl https://api.mercyglobal.com.ng/ \
-H "Auth: Client API_KEY" \
-H "Content-Type: application/json" \
-d '{"cmd":"SMS","SMS":{"Sender":"JohnDoe","Recipient":"23480000000","Message":"Hello world","Options":{"flashmessage":"true"}}}' \
-X POST


SMS With Options (MMS)

Sending MMS is in BETA stage. However, you are welcome to get started with MMS anyways.

curl https://api.mercyglobal.com.ng/ \ -H "Auth: Client API_KEY" \ -H "Content-Type: application/json" \ -d '{"cmd":"SMS","SMS":{"Sender":"JohnDoe","Recipient":"23480000000","Message":"Hello world","Options":{"mms":"true","mediaurl":"http://link.pic/picture.png"}}}' \ -X POST
 

The Mediaurl has to be a url or link to an image. PNG or GIF or JPG.

For multiple recipients, please separate entries with comma(,). All recipients should be in international format without (+) sign AND DO NOT urlencode() the message.

Result Format

{
  "code": 1001,
  "response": "SMS Sent Successfuly",
}

Buy Airtime (Reseller Accounts*)

This API function requires a Reseller Account that has been funded. The discounted pricing percentage for each network are available in the reseller agreement. 

First step is to create the order via the API and obtain the transaction id.

curl https://api.mercyglobal.com.ng/ \
-H "Auth: Client API_KEY" \ -H "Content-Type: application/json" \ -d '{"cmd":"airtime_topup","action":"create_order","AIRTIME":{"Network":"MTN","Amount":"100","Phone":"09061237640"}}' \ -X POST

Create Order Response

{
  "code": 1001,
"response": "ORDER CREATED",
"transid": "TRX029277718822",

}

After creating the order, you would then go ahead to complete the order via the API. Your account would not be debited or deducted until the order is successfully complete

curl https://api.mercyglobal.com.ng/ \
-H "Auth: Client API_KEY" \ -H "Content-Type: application/json" \ -d '{"cmd":"airtime_topup","action":"complete_order","ORDER":{"Transid":"TRX029277718822"}}' \
-X POST

Result Format

{
  "code": 1001,
  "response": "Order Completed Successfully",
}

All Response Codes

1001 - Successful

8080 - SMS Sending Failure *Undisclosed Reasons*

4081 - Message Rejected (Spam)

4091 - Message Rejected (Flooding)

5025 - Account/Client/User Error (Authorization Error)

6060 - Message Blocked (Blocked)

6061 - Message Declined (Declined)

1010 - Message Pending (Pending)

CTE009 - Routing Error (Failed)

CTE080 - Bounce (Bounce)