NAV
CURL Python PHP

NusaSMS API v1.0

Scroll down for code samples, example requests and responses. Select a language for code samples from the tabs above or the mobile navigation menu.

Please be noted that there are two API host, development (test) and production server.

Production

Host: https://api.nusasms.com/nusasms_api/1.0/

You can use this host to make real transaction.

Grab your APIKey on app.nusasms.com, on Account > User management menu.

API Usage Notes

Development (Test)

Development (testing), which user's client credit top up is for testing only. Any result of this API (this host) is not real. Credit top up is not required on this server host.

On this server, an account (and only one) is being provided to user the API. The APIKey for this test server is DEV_TESTING_API_KEY. Please use the APIkey kindly.

Response

Success

HTTP Response Code, either 200, 201 or 202 and error=false on the json response is success request.

Failed / Error

All neither 200, 201 nor 204 HTTP response code is failed response.

HTTP Status Code

Authentication

Account

Get user data using API Key

GET /nusasms_api/1.0/auth/api_key

# Get User data using apiKey

curl "https://{HOST_NAME}/nusasms_api/1.0/auth/api_key" \
     -H 'APIKey: YOUR_API_KEY'
$curl = curl_init();
curl_setopt_array($curl, array(
    CURLOPT_RETURNTRANSFER => 1,
    CURLOPT_URL => 'https://{HOST_NAME}/nusasms_api/1.0/auth/api_key',
    CURLOPT_HTTPHEADER => array(
        "APIKey: {YOUR_API_KEY}", 
        'Content-Type: application/json'
    ),
));

$resp = curl_exec($curl);
echo $resp;
curl_close($curl);
import requests

headers = {
    "Accept": "application/json", "APIKey": "{YOUR_API_KEY}"
}

r = requests.get(
    'https://{HOST_NAME}/nusasms_api/1.0/auth/api_key', 
    headers = headers,
)

print(r.json())

Example responses

200 Response

{
  "error": false,
  "error_code": 0,
  "message": "Data message",
  "data": {
    "userid": "string",
    "idPerson": 0,
    "idClient": 0
  }
}

Responses

Status Meaning Description Schema
200 OK Successful Response PersonResponse

Get Balance Data

GET /nusasms_api/1.0/balance

curl -X GET "https://{HOST_NAME}/nusasms_api/1.0/balance" \
     -H  "accept: application/json" \
     -H  "APIKey: {YOUR_API_KEY}"
$curl = curl_init();
curl_setopt_array($curl, array(
    CURLOPT_RETURNTRANSFER => 1,
    CURLOPT_URL => 'https://{HOST_NAME}/nusasms_api/1.0/balance',
    CURLOPT_HTTPHEADER => array(
        "APIKey: {YOUR_API_KEY}", 
        'Accept: application/json',
        'Content-Type: application/json'
    ),
));

$resp = curl_exec($curl);
echo $resp;
curl_close($curl);
import requests

headers = {
    "Accept": "application/json",
    "APIKey": "{YOUR_API_KEY}"
}

r = requests.get(
    'https://https://{HOST_NAME}/nusasms_api/1.0/balance', 
    headers = headers,
)

print(r.json())

Example responses

200 Response

{
  "error": false,
  "error_code": 0,
  "message": "Data message",
  "data": {
    "idClient": 0,
    "wa_balance": 0,
    "wa_expired_date": "2019-08-24",
    "hlr_balance": 0,
    "hlr_expired_date": "2019-08-24",
    "sim_balance": 0,
    "sim_expired_date": "2019-08-24",
    "sms_balance": 0,
    "sms_expired_date": "2019-08-24",
    "pulsa_balance": 0
  }
}

Responses

Status Meaning Description Schema
200 OK Successful Response CreditResponse

WhatsApp

Whatsapp API Introduction

Whatsapp Message Status

Code Name Description
Q QUEUE Message is on Queue to be proceed
S SENT Message is on process to be sent to the destination
D DELIVERED Message has been delivered
R READ Message has been read on destination side
A ABORT Message has been aborted and not going to be sent anymore
F FAILED Message is not sent. Issue may vary.

Emoticons

Source: Full Emoji List

Use the emoji code as API message parameter examples

Emoticons Name Unicode As Message Parameter
😀 Grinning face U+1F600 "message": "\\U0001F600"
🇮🇩 flag: Indonesia U+1F1EE U+1F1E9 "message": "\\U0001F1EE\\U0001F1E9"

Send Media

POST /nusasms_api/1.0/whatsapp/media

Warning

Note

# Send file with file URL
curl -X POST "https://{HOST_NAME}/nusasms_api/1.0/whatsapp/media" \
     -H "accept: application/json" \
     -H "APIKey: {YOUR_API_KEY}" \
     -d "media_url=https://example.com/image_name.png" \
     -d "destination={DESTINATION}" \
     -d "caption=Caption text"
$curl = curl_init();
$payload = json_encode(array(
    'caption' => 'Caption text',
    'sender' => '628XXXXXXXXXX',
    'destination' => '628XXXXXXXXX',
    'media_url' => 'https://example.com/image_name.png'
));
curl_setopt_array($curl, array(
    CURLOPT_RETURNTRANSFER => 1,
    CURLOPT_URL => 'https://{HOST_NAME}/nusasms_api/1.0/whatsapp/media',
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => array(
        "APIKey: {YOUR_API_KEY}", 
        'Content-Type: application/json'
    ),
    CURLOPT_POSTFIELDS => $payload
));

$resp = curl_exec($curl);

if (!$resp) {
    die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
} else {
    echo $resp;
}
curl_close($curl);
# Send file with base64 encoded file
import base64

import requests

with open('file_name.png', 'rb') as file_descriptor:
    file_data = file_descriptor.read()

base64_file = base64.b64encode(file_data).decode('utf8')

headers = {
    "Accept": "application/json",
    "APIKey": "YOUR_API_KEY"
}  
payloads = {
    'destination': 'DESTINATION_PHONE',
    'sender': None,
    'media_base64': base64_file
    'file_name': 'your_image_file.png',
    'caption': 'Caption text'
}

r = requests.post(
    'https://{HOST_NAME}/nusasms_api/1.0/whatsapp/media', 
    headers=headers, json=payloads
)

print(r.json())

Body parameter

{
  "timeout": 0,
  "sender": "string",
  "is_group": false,
  "destination": "string",
  "caption": "string",
  "media_url": "http://example.com",
  "media_base64": "string",
  "file_name": "string"
}

Parameters

Name In Type Required Description
body body SendMediaParams true none

Example responses

201 Response

{
  "error": false,
  "error_code": 0,
  "message": "Data message",
  "data": {
    "sender": "string",
    "destination": "string",
    "caption": "string",
    "media_url": "string",
    "ref_no": "string"
  }
}

Responses

Status Meaning Description Schema
201 Created Successful Response SendMediaResponse
422 Unprocessable Entity Validation Error HTTPValidationError

Send Message

POST /nusasms_api/1.0/whatsapp/message

Note

# Send file with file URL
curl -X POST "https://{HOST_NAME}/nusasms_api/1.0/whatsapp/message" \
     -H "accept: application/json" \
     -H "APIKey: {YOUR_API_KEY}" \
     -d "destination={DESTINATION}" \
     -d "message=Your message here.\nGrinning face emoticon: \\U0001F600"
$curl = curl_init();
$payload = json_encode(array(
    'destination' => '6281xxxxxxxx',
    'message' => 'Your message'
));
curl_setopt_array($curl, array(
    CURLOPT_RETURNTRANSFER => 1,
    CURLOPT_URL => 'https://{HOST_NAME}/nusasms_api/1.0/whatsapp/message',
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => array(
        "APIKey: {YOUR_API_KEY}", 
        'Content-Type:application/json'
    ),
    CURLOPT_POSTFIELDS => $payload
));

$resp = curl_exec($curl);

if (!$resp) {
    die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
} else {
    echo $resp;
}
curl_close($curl);
# Send file with base64 encoded file
import requests

headers = {
    "Accept": "application/json",
    "APIKey": "YOUR_API_KEY"
}
payloads = {
    'destination': 'DESTINATION_PHONE',
    'sender': None,
    'message': "your message here.\nGrinning face emoticon: \\U0001F600"
}

r = requests.post(
    'https://{HOST_NAME}/nusasms_api/1.0/whatsapp/media', 
    headers=headers, json=payloads
)

print(r.json())

Body parameter

{
  "timeout": 0,
  "sender": "string",
  "is_group": false,
  "destination": "string",
  "message": "string"
}

Parameters

Name In Type Required Description
body body SendMessageParams true none

Example responses

201 Response

{
  "error": false,
  "error_code": 0,
  "message": "Data message",
  "data": {
    "sender": "string",
    "destination": "string",
    "message": "string",
    "ref_no": "string"
  }
}

Responses

Status Meaning Description Schema
201 Created Successful Response SendMessageResponse
422 Unprocessable Entity Validation Error HTTPValidationError

Message Info

GET /nusasms_api/1.0/whatsapp/status/{ref_no}

Whatsapp message status

Status Name Description
U UN-SENT Message is going to be added to queue
Q QUEUE Message is on queue (going to be sent)
S SENT Message is being sent
D DELIVERED Message is delivered to destination
R READ Message has been read
A ABORTED Message is aborted (will not be sent)
F FAILED Fail to save Message (WA Credit deduction will be reverted)

Note: if you set your own sender, please consider to set push callback to get immediate report of your message status to your server. Please contact support to set your push callback.

Test status on Test Server, with ref_no namely listed below:

# Send file with file URL
curl -X GET "https://{HOST_NAME}/nusasms_api/1.0/whatsapp/status/{REF_NO}" \
     -H "accept: application/json" \
     -H "APIKey: {YOUR_API_KEY}"
$curl = curl_init();
curl_setopt_array($curl, array(
    CURLOPT_RETURNTRANSFER => 1,
    CURLOPT_URL => 'https://{HOST_NAME}/nusasms_api/1.0/whatsapp/status/{REF_NO}',
    CURLOPT_HTTPHEADER => array(
        "APIKey: {YOUR_API_KEY}", 
        'Content-Type:application/json'
    ),
));

$resp = curl_exec($curl);

if (!$resp) {
    die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
} else {
    echo $resp;
}
curl_close($curl);
# Send file with base64 encoded file
import requests

headers = {
    "Accept": "application/json",
    "APIKey": "YOUR_API_KEY"
}

r = requests.get(
    'https://{HOST_NAME}/nusasms_api/1.0/whatsapp/status/{REF_NO}', 
    headers=headers,
)

print(r.json())

Parameters

Name In Type Required Description
ref_no path string true none

Example responses

200 Response

{
  "error": false,
  "error_code": 0,
  "message": "Data message",
  "data": {
    "destination": "string",
    "sender": "string",
    "is_group": false,
    "create_date": "2019-08-24T14:15:22Z",
    "sent_date": "2019-08-24T14:15:22Z",
    "read_date": "2019-08-24T14:15:22Z",
    "delivered_date": "2019-08-24T14:15:22Z",
    "ref_no": "string",
    "status": "string",
    "message": "string",
    "caption": "string",
    "media_url": "string"
  }
}

Responses

Status Meaning Description Schema
200 OK Successful Response GetMessageResponse
422 Unprocessable Entity Validation Error HTTPValidationError

WhatsApp Phone Check

Check Wa Phone Number

POST /nusasms_api/1.0/wa_phone_check

Parameter restriction

# Send file with file URL
curl -X POST "https://{HOST_NAME}/nusasms_api/1.0/wa_phone_check" \
     -H "accept: application/json" \
     -H "APIKey: {YOUR_API_KEY}" \
     -d "phone_numbers=[\"PHONE_NUMBER\", \"MORE_PHONE_NUMBER\"]" \
     -d "callback_url=https://YOUR_WEBSITE.tld/callback"
$curl = curl_init();

$payload = json_encode(array(
    'phone_numbers' => array('PHONE_NUMBER', 'MORE_PHONE_NUMBER'),
    'callback_url' => 'https://YOUR_WEBSITE.tld/callback',
));

curl_setopt_array($curl, array(
    CURLOPT_RETURNTRANSFER => 1,
    CURLOPT_URL => 'https://{HOST_NAME}/nusasms_api/1.0/wa_phone_check',
    CURLOPT_POST => true,
    CURLOPT_HTTPHEADER => array(
        "APIKey: {YOUR_API_KEY}", 
        'Content-Type: application/json'
    ),
    CURLOPT_POSTFIELDS => $payload
));
$resp = curl_exec($curl);

if (!$resp) {
    die('Error: "' . curl_error($curl) . '" - Code: ' . curl_errno($curl));
} else {
    echo $resp;
}
curl_close($curl);
# Send file with base64 encoded file
import base64

import requests

with open('file_name.png', 'rb') as file_descriptor:
    file_data = file_descriptor.read()

base64_file = base64.b64encode(file_data).decode('utf8')

headers = {
    "Accept": "application/json",
    "APIKey": "YOUR_API_KEY"
}  
payloads = {
    'phone_numbers': ['PHONE_NUMBER', 'MORE_PHONE_NUMBER',],
    'callback_url': 'https://YOUR_WEBSITE.tld/callback'
}

r = requests.post(
    'https://{HOST_NAME}/nusasms_api/1.0/wa_phone_check', 
    headers=headers, 
    json=payloads
)

print(r.json())

Body parameter

{
  "phone_numbers": [
    "string"
  ],
  "callback_url": "http://example.com"
}

Parameters

Name In Type Required Description
body body WAPhoneCheckParams true none

Example responses

201 Response

{
  "error": false,
  "error_code": 0,
  "message": "Data message",
  "data": null
}

Responses

Status Meaning Description Schema
201 Created Successful Response WAPhoneCheckResponse
422 Unprocessable Entity Validation Error HTTPValidationError

SMS

Note

Response Status

Status Value Description
ALL_RECIPIENTS_PROCESSED 0 Request was successful (all recipients)
SEND_ERROR -1 Error in processing the request
NOT_ENOUGH_CREDITS -2 Not enough credits on a specific account
NETWORK_NOTCOVERED -3 Targeted network is not covered on specific account
INVALID_USER_OR_PASS -5 Username or password is invalid
MISSING_DESTINATION_ADDRESS -6 Destination address is missing in the request
BALANCE_EXPIRED -7 Balance has expired
REJECTED -10 OTP messages that do not use an OTP route will be REJECTED
INVALID_DESTINATION_ADDRESS -11 Number is not recognized by NusaSMS platform
MISSING_MESSAGE -12 Message is missing in the request
INVALID_DESTINATION_ADDRESS -13 Number is not recognized by NusaSMS platform
SYNTAX_ERROR -22 Incorrect XML format, caused by syntax error
ERROR_PROCESSING -23 General error, reasons may vary
COMMUNICATION_ERROR -26 General API error, reasons may vary
INVALID_SENDDATETIME -27 Invalid scheduling parametar
INVALID_DELIVERY_REPORT_PUSH_URL -28 Invalid PushURL in the request
INVALID_CLIENT_APPID -30 Invalid APPID in the request
DUPLICATE_MESSAGEID -33 Duplicated MessageID in the request
SENDER_NOT_ALLOWED -34 Sender name is not allowed
IP_ADDRESS_FORBIDDEN -40 Client IP Address Not In White List
SPAM_PATTERN -77 More than 10 same message send to the same recipeints in 1 day
LIMIT REACHED FOR DESTINATION NUMBER -78 Sending messages to the same number has reached the limit in 24 hours
REJECTED ROUTE -88 Operator Rejected The Request
GENERAL_ERROR -99 Error in processing request, reasons may vary

Send Plain

POST /sms/v3/sendsms/plain

Notes

Parameters

Parameter Required Description
user Your API username
password You API Password
SMSText Text message (160 characters)
GSM GMS recipient number in intenational format (e.g: 62810000XXXX)
unicode True for unicode message
otp Y for OTP message
output json or xml (default)

Parameterized URL Examples

Plain SMS:

https://api.nusasms.com/api/v3/sendsms/plain?user=user&password=password&SMSText=Hello%20NusaSMS!&GSM=628*********

Plain SMS (JSON Response):

https://api.nusasms.com/api/v3/sendsms/plain?user=user&password=password&SMSText=Kode%20OTP%20anda%20xxxxxx&GSM=628********&otp=Y&output=json

OTP SMS:

https://api.nusasms.com/api/v3/sendsms/plain?user=user&password=password&SMSText=Hello%20NusaSMS!&GSM=628********&otp=Y

Success Response Examples

XML

<?xml version="1.0" encoding="UTF-8"?>
<results>
     <result>
          <status>0</status>
          <messageid>175041319203754627</messageid>
          <destination>6285100803380</destination>
     </result>
</results>

JSON

{
    "results": [{
        "status": "0", "messageid": "175041319203754627",
        "destination": "628510080XXXX"
    }]
}

Wrong User / Password Response

XML

<?xml version="1.0" encoding="UTF-8"?>
<results>
     <result>
          <status>-5</status>
          <messageid></messageid>
          <destination>6285100803380</destination>
     </result>
</results>

JSON

{
    "results": [{
        "status": "-5",
        "messageid": "",
        "destination": "6285100803380"
    }]
}

Missing Destination Number Response

XML

<?xml version="1.0" encoding="UTF-8"?> 
  <results> 
     <result> 
       <status>-13</status> 
       <messageid></messageid> 
       <destination>085100803380</destination> 
    </result>
</results>

JSON

{
    "results": [{
        "status": "-13", 
        "messageid": "", 
        "destination": "6285100803380"
    }]
}

Parameters

Name In Type Required Description
user query string true none
password query string true none
SMSText query string true none
unicode query string false none
GSM query string false none
otp query string false none

Example responses

200 Response

null

Responses

Status Meaning Description Schema
200 OK Successful Response Inline
422 Unprocessable Entity Validation Error HTTPValidationError

Response Schema

Send Group

POST /sms/v3/sendsms/group

Notes

Parameters

Parameter Required Description
user Your API username
password You API Password
SMSText Text message (160 characters)
group Contacts Group name
unicode True for unicode message
otp Y for OTP message
output json or xml (default)

Parameterized URL Example

https://api.nusasms.com/api/v3/sendsms/group?user=user&password=password&SMSText=Hello%20NusaSMS!&group=Example

Result Example

XML

<?xml version="1.0" encoding="UTF-8"?>
<results>
  <result>
    <status>0</status>
    <campaign_name>Group-Api-Campaign-cf27252-5101</campaign_name>
    <group>Example</group>
    </result>
</results>

JSON

{
    "results": [{
        "status": "0", 
        "campaign_name": "Group-Api-Campaign-cf27252-5101",
        "group": "Example"
    }]
}

Failed Response

Group is not available or the group has no contact list

XML

<?xml version="1.0" encoding="UTF-8"?>
<results>
     <result>
          <status>-55</status>
          <campaign_name>Group-Api-Campaign-cf27252-5101</campaign_name>
          <group>Example</group>
     </result>
</results>

JSON

{
    "results": [{
        "status": "-55", 
        "campaign_name": "Group-Api-Campaign-cf27252-5101", 
        "group": "Example"
    }]
}

Parameters

Name In Type Required Description
user query string true none
password query string true none
SMSText query string true none
unicode query string false none
group query string false none
otp query string false none

Example responses

200 Response

null

Responses

Status Meaning Description Schema
200 OK Successful Response Inline
422 Unprocessable Entity Validation Error HTTPValidationError

Response Schema

Command

GET /sms/command

Notes

Command List

Additional parameter

Parameterized URL Examples

Check Credit

https://api.nusasms.com/api/command?user=user&password=password&cmd=CREDITS&type=sms&output=json

Check message status

https://api.nusasms.com/api/command?user=user&password=password&cmd=DR&ref_no=766387461827XXX

API Callback

Another way to get message delivery status is by registering your Server Callback URL on Account Setting menu on app.nusasms.com

Account setting menu

Then set the callback URL

Callback URL Form

Example responses

200 Response

null

Responses

Status Meaning Description Schema
200 OK Successful Response Inline

Response Schema

Schemas

Credit

{
  "idClient": 0,
  "wa_balance": 0,
  "wa_expired_date": "2019-08-24",
  "hlr_balance": 0,
  "hlr_expired_date": "2019-08-24",
  "sim_balance": 0,
  "sim_expired_date": "2019-08-24",
  "sms_balance": 0,
  "sms_expired_date": "2019-08-24",
  "pulsa_balance": 0
}

Credit

Properties

Name Type Required Restrictions Description
idClient integer true none none
wa_balance number false none none
wa_expired_date string(date) false none none
hlr_balance number false none none
hlr_expired_date string(date) false none none
sim_balance number false none none
sim_expired_date string(date) false none none
sms_balance number false none none
sms_expired_date string(date) false none none
pulsa_balance number false none none

CreditResponse

{
  "error": false,
  "error_code": 0,
  "message": "Data message",
  "data": {
    "idClient": 0,
    "wa_balance": 0,
    "wa_expired_date": "2019-08-24",
    "hlr_balance": 0,
    "hlr_expired_date": "2019-08-24",
    "sim_balance": 0,
    "sim_expired_date": "2019-08-24",
    "sms_balance": 0,
    "sms_expired_date": "2019-08-24",
    "pulsa_balance": 0
  }
}

CreditResponse

Properties

Name Type Required Restrictions Description
error boolean false none none
error_code integer false none none
message string false none none
data Credit true none none

GetMessage

{
  "destination": "string",
  "sender": "string",
  "is_group": false,
  "create_date": "2019-08-24T14:15:22Z",
  "sent_date": "2019-08-24T14:15:22Z",
  "read_date": "2019-08-24T14:15:22Z",
  "delivered_date": "2019-08-24T14:15:22Z",
  "ref_no": "string",
  "status": "string",
  "message": "string",
  "caption": "string",
  "media_url": "string"
}

GetMessage

Properties

Name Type Required Restrictions Description
destination string false none none
sender string false none none
is_group boolean false none none
create_date string(date-time) false none none
sent_date string(date-time) false none none
read_date string(date-time) false none none
delivered_date string(date-time) false none none
ref_no string false none none
status string false none none
message string false none none
caption string false none none
media_url string false none none

GetMessageResponse

{
  "error": false,
  "error_code": 0,
  "message": "Data message",
  "data": {
    "destination": "string",
    "sender": "string",
    "is_group": false,
    "create_date": "2019-08-24T14:15:22Z",
    "sent_date": "2019-08-24T14:15:22Z",
    "read_date": "2019-08-24T14:15:22Z",
    "delivered_date": "2019-08-24T14:15:22Z",
    "ref_no": "string",
    "status": "string",
    "message": "string",
    "caption": "string",
    "media_url": "string"
  }
}

GetMessageResponse

Properties

Name Type Required Restrictions Description
error boolean false none none
error_code integer false none none
message string false none none
data GetMessage true none none

HTTPValidationError

{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string"
    }
  ]
}

HTTPValidationError

Properties

Name Type Required Restrictions Description
detail [ValidationError] false none none

Person

{
  "userid": "string",
  "idPerson": 0,
  "idClient": 0
}

Person

Properties

Name Type Required Restrictions Description
userid string true none none
idPerson integer true none none
idClient integer true none none

PersonResponse

{
  "error": false,
  "error_code": 0,
  "message": "Data message",
  "data": {
    "userid": "string",
    "idPerson": 0,
    "idClient": 0
  }
}

PersonResponse

Properties

Name Type Required Restrictions Description
error boolean false none none
error_code integer false none none
message string false none none
data Person true none none

SendMedia

{
  "sender": "string",
  "destination": "string",
  "caption": "string",
  "media_url": "string",
  "ref_no": "string"
}

SendMedia

Properties

Name Type Required Restrictions Description
sender string false none none
destination string true none none
caption string false none none
media_url string false none none
ref_no string true none none

SendMediaParams

{
  "timeout": 0,
  "sender": "string",
  "is_group": false,
  "destination": "string",
  "caption": "string",
  "media_url": "http://example.com",
  "media_base64": "string",
  "file_name": "string"
}

SendMediaParams

Properties

Name Type Required Restrictions Description
timeout integer false none none
sender string true none none
is_group boolean false none none
destination string true none none
caption string false none none
media_url string(uri) false none none
media_base64 string false none none
file_name string false none none

SendMediaResponse

{
  "error": false,
  "error_code": 0,
  "message": "Data message",
  "data": {
    "sender": "string",
    "destination": "string",
    "caption": "string",
    "media_url": "string",
    "ref_no": "string"
  }
}

SendMediaResponse

Properties

Name Type Required Restrictions Description
error boolean false none none
error_code integer false none none
message string false none none
data SendMedia true none none

SendMessage

{
  "sender": "string",
  "destination": "string",
  "message": "string",
  "ref_no": "string"
}

SendMessage

Properties

Name Type Required Restrictions Description
sender string false none none
destination string true none none
message string false none none
ref_no string true none none

SendMessageParams

{
  "timeout": 0,
  "sender": "string",
  "is_group": false,
  "destination": "string",
  "message": "string"
}

SendMessageParams

Properties

Name Type Required Restrictions Description
timeout integer false none none
sender string false none none
is_group boolean false none none
destination string true none none
message string true none none

SendMessageResponse

{
  "error": false,
  "error_code": 0,
  "message": "Data message",
  "data": {
    "sender": "string",
    "destination": "string",
    "message": "string",
    "ref_no": "string"
  }
}

SendMessageResponse

Properties

Name Type Required Restrictions Description
error boolean false none none
error_code integer false none none
message string false none none
data SendMessage true none none

ValidationError

{
  "loc": [
    "string"
  ],
  "msg": "string",
  "type": "string"
}

ValidationError

Properties

Name Type Required Restrictions Description
loc [string] true none none
msg string true none none
type string true none none

WAPhoneCheckParams

{
  "phone_numbers": [
    "string"
  ],
  "callback_url": "http://example.com"
}

WAPhoneCheckParams

Properties

Name Type Required Restrictions Description
phone_numbers [string] true none none
callback_url string(uri) false none none

WAPhoneCheckResponse

{
  "error": false,
  "error_code": 0,
  "message": "Data message",
  "data": null
}

WAPhoneCheckResponse

Properties

Name Type Required Restrictions Description
error boolean false none none
error_code integer false none none
message string false none none
data any false none none