API Overview Java Python PHP VB.Net C# Wordpress

MSpace Bulk SMS Service API Documentation


This page illustrates how you, a developer, a technical personnel or any form of our esteemed client can use our bulk SMS services with ease without necessarily logging into our web application. After this illustration you will be able to send texts, query SMS account balance and list your sub- account users in the system. This documentation assumes that you have subscribed for our bulk SMS services. If not please visit our website ‘www.mspace.co.ke’ or contact our offices to be assisted and be able to enjoy our services.

OverView of the API

Content


  1. Query SMS balance
  2. Send Text
  3. Query sub-account users
  4. Query Re-seller users
  5. System Login
  6. Re-seller client Top up
  7. sub-account users Top up

Overview


This is the get balance url = “ http://main_url/mspaceservice/wr/sms/balance /username={username}/password={password}”, where username is the value of your username and password the value of your password.

To get the IP to replace the main_url example kindly contact us.

Example:


http://main_url/mspaceservice/wr/sms/balance /username=myusername/password=mypassword

You can test this by pasting in your browser and press enter.

Response:


“your sms balance e.g. ‘50’” if you are a subscribed user or “Error 100: Authentication Failure” if your credentials are wrong.

NOTE that your URL format should support URL encoding UTF- 8 . Messages that are not properly formatted may be delivered with incorrectly encoded text or not delivered at all.

The request methods are summarized in the table below:

main_url = http://main_url/mspaceservice/wr/sms/

Method Url Structure Url example Response on success Response on failure
Query SMS Balance main_url/balance/username={username}/password={password} http://main_url/balance/username=myusername/
password=mypassword
Your current SMS balance e.g. “50”. Authentication failure for wrong user credentials
or non-existing user.

Internal service error if there’s any.
Send Text main_url
+sendtext/username=
{username}/password
={password}/senderid
={senderId}/recipient
={recipient}/message
={message}
http://main_url/sendtext/username
=myusername/password
=mypassword/senderid
=mysenderid/recipient
=myrecipient/message
=mymessage
Send action status and the sent message id i.e.
“[{"messageId": "12345", "responseTime": "2018-06-25
11:12:19:793", "status": "successful"}]”
Athentication failure,
Insufficient Balance,
Invalid sender ID or
internal service error.
Query sub-account users main_url +
subusers/username
={username}/password
={password}
http://main_url/subusers/username
=myusername/password
=mypassword
The username of your sub-account users
and their SMS balances respectively i.e.
“[{"smsBalance": "20", "subUserName": "subuser1"},
{"smsBalance": "18", "subUserName": "subuser2"}]”
“[]” if no subuser exists.
Authentication failure.
Query Re-Seller users main_url +
resellerclients/username
={username}/password
={password}
http://main_url/resellerclients/username
=myusername/password
=mypassword
The username of your clients
and their SMS balances respectively i.e.
“[{"smsBalance": "20", "clientname": "client1"},
{"smsBalance": "18", "clientname": "client2"}]”
“[]” if no user exists.
Authentication failure.
Re-Seller users Top-up main_url +
resellerclienttopup/username
={username}/password
={password} /clientname
={clientname}/noofsms
={noofsms}
http://main_url/resellerclienttopup/username
=myusername/password
=mypassword /clientname
={myclientname}/noofsms
={noofsms}
Successful Top up of noOfSms SMS to clientname. Athentication failure,
Insufficient Balance,You are not Authorized to make this transaction,Kindly Contact Providers for help, Failed to top up clientname account,
Top up not Successful, failed to deduct your account, or internal service error.
Sub-Account users Top-up main_url +
subacctopup/username
={username}/password
={password} /subaccname
={subaccname}/noofsms
={noofsms}
http://main_url/subacctopup/username
=myusername/password
=mypassword /subaccname
={mysubaccname}/noofsms
={noofsms}
Successful Top up of noOfSms SMS to subAccName. Athentication failure,
Insufficient Balance,You are not Authorized to make this transaction,Kindly Contact Providers for help, Failed to top up subAccName account,
Top up not Successful, failed to deduct your account, or internal service error.
System Login main_url +
login/username
={username}/password
={password}
http://main_url/login/username
=myusername/password
=mypassword
user exists. Authentication failure.
CONTACT US

Kenya offices

+254722962934

Uganda offices

Elysee(Ntashart) Plaza Building, Kilimani Road-Off Ngong Road 2nd Floor Suite 4A

Kampala, Makerere Hill Road, Ham Towers, 3rd floor, Suite No HT 25