Recommended Services
Supported Scripts

Welcome To Bwatmesaj docs

Get familiar with our APIs and technical resources in your favorite languages.

SMS API 

Bwatmesaj SMS API allows you to send and receive SMS messages to and from any country in the world through a REST API. Each message is identified by a unique random ID so that users can always check the status of a message using the given endpoint.

API Endpoint
https://main.bwatmesaj.com/api/v3/sms/send

Parameters
ParameterRequiredDescription
Authorization
Yes
When calling our API, send your api token with the authentication type set as Bearer (Example: Authorization: Bearer {api_token})
Accept
Yes
Set to application/json
Send outbound SMS

Bwatmesaj’s Programmable SMS API enables you to programmatically send SMS messages from your web application. First, you need to create a new message object. Bwatmesaj returns the created message object with each request.

Send your first SMS message with this example request.

API Endpoint

https://main.bwatmesaj.com/api/v3/sms/send

Parameters
ParameterRequiredTypeDescription
recipient
Yes
stringNumber to send message. Use comma (,) to send multiple numbers. Ex. 31612345678,8801721970168
sender_id
Yes
stringThe sender of the message. This can be a telephone number (including country code) or an alphanumeric string. In case of an alphanumeric string, the maximum length is 11 characters.
type
Yes
stringThe type of the message. For text message you have to insert plain as sms type.
message
Yes
stringThe body of the SMS message.
schedule_time
No
datetimeThe scheduled date and time of the message in RFC3339 format (Y-m-d H:i)
dlt_template_id
No
stringThe ID of your registered DLT (Distributed Ledger Technology) content template.

Example request for Single Number

curl -X POST https://main.bwatmesaj.com/api/v3/sms/send \
-H 'Authorization: Bearer 13|4j99SlsIaRf5Zh2X5QIFAFRREuPCMqBYsSBGFnbP5fbfe1ca' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"31612345678",
"sender_id":"YourName",
"type":"plain",
"message":"This is a test message"
}'
Example request for Multiple Numbers
PHP
curl -X POST https://main.bwatmesaj.com/api/v3/sms/send \
-H 'Authorization: Bearer 13|4j99SlsIaRf5Zh2X5QIFAFRREuPCMqBYsSBGFnbP5fbfe1ca' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"31612345678,880172145789",
"sender_id":"YourName",
"type":"plain",
"message":"This is a test message",
"schedule_time=2021-12-20 07:00"
}'
Returns

Returns a contact object if the request was successful.

JSON
{
    "status": "success",
    "data": "sms reports with all details",
}

If the request failed, an error object will be returned.

JSON
{
    "status": "error",
    "message" : "A human-readable description of the error."
}
Send Campaign Using Contact list

Bwatmesaj’s Programmable SMS API enables you to programmatically send Campaigns from your web application. First, you need to create a new message object. Bwatmesaj returns the created message object with each request.

Send your first Campaign Using Contact List with this example request.

API Endpoint

Markup
https://main.bwatmesaj.com/api/v3/sms/campaign
Parameters
ParameterRequiredTypeDescription
contact_list_id
Yes
stringContact list to send message. Use comma (,) to send multiple contact lists. Ex. 6415907d0d7a6,6415907d0d37a
sender_id
Yes
stringThe sender of the message. This can be a telephone number (including country code) or an alphanumeric string. In case of an alphanumeric string, the maximum length is 11 characters.
type
Yes
stringThe type of the message. For text message you have to insert plain as sms type.
message
Yes
stringThe body of the SMS message.
schedule_time
No
datetimeThe scheduled date and time of the message in RFC3339 format (Y-m-d H:i)
dlt_template_id
No
stringThe ID of your registered DLT (Distributed Ledger Technology) content template.
Example request for Single Contact List
PHP
curl -X POST https://main.bwatmesaj.com/api/v3/sms/campaign \
-H 'Authorization: Bearer 13|4j99SlsIaRf5Zh2X5QIFAFRREuPCMqBYsSBGFnbP5fbfe1ca' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"6415907d0d37a",
"sender_id":"YourName",
"type":"plain",
"message":"This is a test message"
}'
Example request for Multiple Contact Lists
PHP
curl -X POST https://main.bwatmesaj.com/api/v3/sms/campaign \
-H 'Authorization: Bearer 13|4j99SlsIaRf5Zh2X5QIFAFRREuPCMqBYsSBGFnbP5fbfe1ca' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"6415907d0d37a,6415907d0d7a6",
"sender_id":"YourName",
"type":"plain",
"message":"This is a test message",
"schedule_time=2021-12-20 07:00"
}'
Returns

Returns a contact object if the request was successful.

JSON
{
    "status": "success",
    "data": "campaign reports with all details",
}

If the request failed, an error object will be returned.

JSON
{
    "status": "error",
    "message" : "A human-readable description of the error."
}
View an SMS

You can use Bwatmesaj’s SMS API to retrieve information of an existing inbound or outbound SMS message.

You only need to supply the unique message id that was returned upon creation or receiving.

API Endpoint

Markup
https://www.main.bwatmesaj.com/api/v3/sms/{uid}
Parameters
ParameterRequiredTypeDescription
uid
Yes
stringA unique random uid which is created on the Bwatmesaj platform and is returned upon creation of the object.
Example request
PHP
curl -X GET https://main.bwatmesaj.com/api/v3/sms/606812e63f78b \
-H 'Authorization: Bearer 13|4j99SlsIaRf5Zh2X5QIFAFRREuPCMqBYsSBGFnbP5fbfe1ca' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
Returns

Returns a contact object if the request was successful.

JSON
{
    "status": "success",
    "data": "sms data with all details",
}

If the request failed, an error object will be returned.

JSON
{
    "status": "error",
    "message" : "A human-readable description of the error."
}
View all messages

API Endpoint

Markup
https://www.main.bwatmesaj.com/api/v3/sms/
Example request
PHP
curl -X GET https://main.bwatmesaj.com/api/v3/sms \
-H 'Authorization: Bearer 13|4j99SlsIaRf5Zh2X5QIFAFRREuPCMqBYsSBGFnbP5fbfe1ca' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
Returns

Returns a contact object if the request was successful.

JSON
{
    "status": "success",
    "data": "sms reports with pagination",
}

If the request failed, an error object will be returned.

JSON
{
    "status": "error",
    "message" : "A human-readable description of the error."
}

Contacts API

Bwatmesaj Contacts API helps you manage contacts that are identified by a unique random ID. Using this ID, you can create, view, update, or delete contacts. This API works as a collection of customer-specific contacts that allows you to group them and assign custom values that you can later use when sending SMS template messages.

The Contacts API uses HTTP verbs and a RESTful endpoint structure with an access key that is used as the API Authorization. Request and response payloads are formatted as JSON using UTF-8 encoding and URL encoded values.

API Endpoint

Markup
https://main.bwatmesaj.com/api/v3/contacts
Parameters
ParameterRequiredDescription
Authorization
Yes
When calling our API, send your api token with the authentication type set as Bearer (Example: Authorization: Bearer {api_token})
Accept
Yes
Set to application/json
Create a contact

Creates a new contact object. Bwatmesaj returns the created contact object with each request.

API Endpoint

Markup
https://www.main.bwatmesaj.com/api/v3/contacts/{group_id}/store
Parameters
ParameterRequiredTypeDescription
group_id
Yes
stringContact Groups uid
PHONE
Yes
numberThe phone number of the contact.
OTHER_FIELDS
No
stringAll Contact’s other fields: FIRST_NAME (?), LAST_NAME (?),… (depending on the contact group fields configuration)
Example request
PHP
curl -X POST https://main.bwatmesaj.com/api/v3/contacts/6065ecdc9184a/store \
-H 'Authorization: Bearer 13|4j99SlsIaRf5Zh2X5QIFAFRREuPCMqBYsSBGFnbP5fbfe1ca' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"PHONE":"8801721970168",
"FIRST_NAME":"Jhon",
"LAST_NAME":"Doe",
}'
Returns

Returns a contact object if the request was successful.

JSON
{
    "status": "success",
    "data": "contacts data with all details",
}

If the request failed, an error object will be returned.

JSON
{
    "status": "error",
    "message" : "A human-readable description of the error."
}
View a contact

Retrieves the information of an existing contact. You only need to supply the unique contact uid and group uid that was returned upon creation or receiving.

API Endpoint

Markup
https://www.main.bwatmesaj.com/api/v3/contacts/{group_id}/search/{uid}
Parameters
ParameterRequiredTypeDescription
group_id
Yes
stringContact Groups uid
uid
Yes
stringContact uid
Example request
PHP
curl -X POST https://main.bwatmesaj.com/api/v3/contacts/6065ecdc9184a/search/606732aec8705 \
-H 'Authorization: Bearer 13|4j99SlsIaRf5Zh2X5QIFAFRREuPCMqBYsSBGFnbP5fbfe1ca' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
Returns

Returns a contact object if the request was successful.

JSON
{
    "status": "success",
    "data": "contacts data with all details",
}

If the request failed, an error object will be returned.

JSON
{
    "status": "error",
    "message" : "A human-readable description of the error."
}
Update a contact

Updates an existing contact. You only need to supply the unique uid of contact and contact group uid that was returned upon creation.

API Endpoint

Markup
https://www.main.bwatmesaj.com/api/v3/contacts/{group_id}/update/{uid}
Parameters
ParameterRequiredTypeDescription
group_id
Yes
stringContact Groups uid
uid
Yes
stringContact uid
PHONE
Yes
numberThe phone number of the contact.
OTHER_FIELDS
No
stringAll Contact’s other fields: FIRST_NAME (?), LAST_NAME (?),… (depending on the contact group fields configuration)
Example request
PHP
curl -X PATCH https://main.bwatmesaj.com/api/v3/contacts/6065ecdc9184a/update/606732aec8705 \
-H 'Authorization: Bearer 13|4j99SlsIaRf5Zh2X5QIFAFRREuPCMqBYsSBGFnbP5fbfe1ca' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"PHONE":"8801721970168",
"FIRST_NAME":"Jhon",
"LAST_NAME":"Doe",
}'
Returns

Returns a contact object if the request was successful.

JSON
{
    "status": "success",
    "data": "contacts data with all details",
}

If the request failed, an error object will be returned.

JSON
{
    "status": "error",
    "message" : "A human-readable description of the error."
}
Delete a contact

Deletes an existing contact. You only need to supply the unique contact uid and group uid that was returned upon creation.

API Endpoint

Markup
https://www.main.bwatmesaj.com/api/v3/contacts/{group_id}/delete/{uid}
Parameters
ParameterRequiredTypeDescription
group_id
Yes
stringContact Groups uid
uid
Yes
stringContact uid
Example request
PHP
curl -X DELETE https://main.bwatmesaj.com/api/v3/contacts/6065ecdc9184a/delete/606732aec8705 \
-H 'Authorization: Bearer 13|4j99SlsIaRf5Zh2X5QIFAFRREuPCMqBYsSBGFnbP5fbfe1ca' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
Returns

Returns a contact object if the request was successful.

JSON
{
    "status": "success",
    "data": "contacts data with all details",
}

If the request failed, an error object will be returned.

JSON
{
    "status": "error",
    "message" : "A human-readable description of the error."
}
View all contacts in group

API Endpoint

Markup
https://www.main.bwatmesaj.com/api/v3/contacts/{group_id}/all
Parameters
ParameterRequiredTypeDescription
group_id
Yes
stringContact Groups uid
Example request
PHP
curl -X POST https://main.bwatmesaj.com/api/v3/contacts/6065ecdc9184a/all \
-H 'Authorization: Bearer 13|4j99SlsIaRf5Zh2X5QIFAFRREuPCMqBYsSBGFnbP5fbfe1ca' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
Returns

Returns a contact object if the request was successful.

JSON
{
    "status": "success",
    "data": "contacts data with pagination",
}

If the request failed, an error object will be returned.

JSON
{
    "status": "error",
    "message" : "A human-readable description of the error."
}
FR
CHAT