API Guide for SMS Service
Date: 15 June 2022
Version: 1.0
API Guide for SMS Service
MuleSoft
Contents
1. DOCUMENT INFORMATION 3
1.1. DOCUMENT CONTROL 3
2. INTRODUCTION 4
2.1. OBJECTIVE OF THIS DOCUMENT 4
2.2. REFERENCE TO DOCUMENTATION IN ANYPOINT EXCHANGE: 4
2.3. AUDIENCE 4
3. SMS SERVICE APIS 5
3.1. SEND SINGLE SMS 5
3.2. SEND BULK SMS 6
3.3. ERROR RESPONSES 7
RCU | 2
API Guide for SMS Service
MuleSoft
1. Document Information
1.1. Document Control
Version Date Author Change
1.0 15th June 2022 Walter Berger Draft Version
RCU | 3
API Guide for SMS Service
MuleSoft
2. Introduction
2.1. Objective of this document
The purpose of this document is to consolidate details and document all the SMS Service APIs
into one document in a structured way.
2.2. Reference to Documentation in Anypoint Exchange:
● Login to the Anypoint Platform: https://eu1.anypoint.mulesoft.com/
● API Documentation can be found in Anypoint Exchange
● For SMS, refer to e-mobile-api from the list of Assets
● Documentation contains all the mentioned endpoints, mock requests, field-level
details, and sample request & response.
2.3. Audience
● API Developer
● Integration Developer
● Technical Lead
● Integration Architect
● QA/UAT team
● Users
RCU | 4
API Guide for SMS Service
MuleSoft
3. SMS Service APIs
3.1. Send Single SMS
Title Value
API Description Send single SMS message
API Endpoint https://api-stg.rcu.gov.sa:443/e-mobile-api-uat/v1/SendSMS
HTTP Method POST
API Security Basic Authentication (username: {client_Id} ; password: {client_secret}
)
API Credentials *Request from developer* / *refer to postman_collection*
API Header Content-Type: application/json
API Request Body {
"to": "27829562045",
"from": "RCU",
"text": "SMS test single message"
}
API Query NA
Parameters
API Success Status 200
Code
API Sample {
"guid": "km5ah225797961f160018d99bkRCUADMJI4N",
Success Responses "mobilenumber": "27829562045",
"statuscode": "0",
"statustext": "Success"
}
3.2. Send Bulk SMS
Title Value
RCU | 5
API Guide for SMS Service
MuleSoft
API Description Send bulk SMS message
API Endpoint https://api-stg.rcu.gov.sa:443/e-mobile-api-uat/v1/SendSMS
HTTP Method POST
API Security Basic Authentication (username: {client_Id} ; password: {client_secret}
)
API Credentials *Request from developer* / *refer to postman_collection*
API Header Content-Type: application/json
API Request Body {
"to": "27829562045,27722770711",
"from": "RCU",
"text": "SMS test bulk message"
}
API Query NA
Parameters
API Success Status 200
Code
API Sample {
"guid": "km59f145201751f1600184wbf1RCUADMJI4N",
Success Responses "mobilenumber": "27829562045,27722770711",
"statuscode": "0,0",
"statustext": "Success,Success"
}
API Sample {
"guid": "km62e334604761f160018xfugtRCUADMJI4N",
Response with "mobilenumber": "12,27829562045",
invalid number "statuscode": "28682,0",
"statustext": "Invalid Mobile Number,Success"
}
3.3. Error Responses
Title Value
{
API Sample "errorCode": 400,
400 Error "errorType": "Bad request",
"errorMessage": "required key [text] not found"
Response }
{
API Sample "errorCode": 401,
401 Error "errorType": "Unauthorized",
"errorMessage": ""
Response }
{
API Sample
RCU | 6
API Guide for SMS Service
MuleSoft
"errorCode": 403,
403 Error "errorType": "Forbidden",
Response }
"errorMessage": ""
{
API Sample "errorCode": 404,
404 Error "errorType": "Resource not found",
"errorMessage": ""
Response }
{
API Sample "errorCode": 500,
500 Error "errorType": "Internal Server Error",
"errorMessage": "'to' field is empty. Please provide at least 1 recipient number."
Response }
{
API Sample "errorCode": 500,
500 Error "errorType": "Internal Server Error",
"errorMessage": "'from' field is empty. Please provide the sender number or sender id."
Response }
{
API Sample "errorCode": 500,
500 Error "errorType": "Internal Server Error",
"errorMessage": "'text' field is empty. Please provide the sms content."
Response }
{
API Sample "errorCode": 503,
503 Error "errorType": "Service Unavailable",
"errorMessage": ""
Response }
{
API Sample "guid": "km6fe005877151f160018pbx4wRCUADMJI4N",
Error "mobilenumber": "2708",
"statuscode": "28682",
Response }
"statustext": "Invalid Mobile Number"
RCU | 7