PhilSMS API Documentation

Unlocking Seamless Integration: Your Comprehensive API Documentation Guide

Back To Home
Account Credentials
  • API Token (api_token)
PRE-MADE Scripts

Easily integrate the API by using our pre-made scripts that you can just copy and paste.

  • SMS API
API Credentials

API TOKEN

You must have an api_token first by creating an account for free to access all our API. Your api_token can be seen inside your PhilSMS Dashboard. Please create your account now if you have no account yet.
Contacts API

PhilSMS 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

                                
                                    https://app.philsms.com/api/v3/contacts
                                
                            
Parameters
Parameter Required Description
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. PhilSMS returns the created contact object with each request.

API Endpoint

                                
                                    https://app.philsms.com/api/v3/contacts/{group_id}/store
                                
                            
Parameters
Parameter Required Type Description
group_id
Yes
string Contact Groups uid
phone
Yes
number The phone number of the contact.
first_name
No
string The first name of the contact.
last_name
No
string The last name of the contact.
Example request
                                
curl -X POST https://app.philsms.com/api/v3/contacts/6065ecdc9184a/store \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"phone":"639171234567"}'
                                
                            
Returns

Returns a contact object if the request was successful.

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

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

                                
{
    "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

                                
                                    https://app.philsms.com/api/v3/contacts/{group_id}/search/{uid}
                                
                            
Parameters
Parameter Required Type Description
group_id
Yes
string Contact Groups uid
uid
Yes
string Contact uid
Example request
                                
curl -X POST https://app.philsms.com/api/v3/contacts/6065ecdc9184a/search/606732aec8705 \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
                                
                            
Returns

Returns a contact object if the request was successful.

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

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

                                
{
    "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

                                
                                    https://app.philsms.com/api/v3/contacts/{group_id}/update/{uid}
                                
                            
Parameters
Parameter Required Type Description
group_id
Yes
string Contact Groups uid
uid
Yes
string Contact uid
phone
Yes
number The phone number of the contact.
first_name
No
string The first name of the contact.
last_name
No
string The last name of the contact.
Example request
                                
curl -X PATCH https://app.philsms.com/api/v3/contacts/6065ecdc9184a/update/606732aec8705 \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"phone":"639171234567"}'
                                
                            
Returns

Returns a contact object if the request was successful.

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

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

                                
{
    "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

                                
                                    https://app.philsms.com/api/v3/contacts/{group_id}/delete/{uid}
                                
                            
Parameters
Parameter Required Type Description
group_id
Yes
string Contact Groups uid
uid
Yes
string Contact uid
Example request
                                
curl -X DELETE https://app.philsms.com/api/v3/contacts/6065ecdc9184a/delete/606732aec8705 \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
                                
                            
Returns

Returns a contact object if the request was successful.

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

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

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

API Endpoint

                                
                                    https://app.philsms.com/api/v3/contacts/{group_id}/all
                                
                            
Parameters
Parameter Required Type Description
group_id
Yes
string Contact Groups uid
Example request
                                
curl -X POST https://app.philsms.com/api/v3/contacts/6065ecdc9184a/all \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
                                
                            
Returns

Returns a contact object if the request was successful.

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

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

                                
{
    "status": "error",
    "message" : "A human-readable description of the error."
}
                                
                            
Contact groups API
PhilSMS Contact Groups API allows you to manage contact groups that are identified by a unique random ID. Use this ID to create, view, update or delete groups.

API Endpoint

                                
                                    https://app.philsms.com/api/v3/contacts
                                
                            
Parameters
Parameter Required Description
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 group

Creates a new group object. PhilSMS returns the created group object with each request.

API Endpoint

                                
                                    https://app.philsms.com/api/v3/contacts
                                
                            
Parameters
Parameter Required Type Description
name
Yes
string The name of the group
Example request
                                
curl -X POST https://app.philsms.com/api/v3/contacts \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"name":"PhilSMS"}'
                                
                            
Returns

Returns a contact object if the request was successful.

                                
{
    "status": "success",
    "data": "group data with all details",
}
                                
                            

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

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

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

API Endpoint

                                
                                    https://app.philsms.com/api/v3/contacts/{group_id}/show/
                                
                            
Parameters
Parameter Required Type Description
group_id
Yes
string Contact Groups uid
Example request
                                
curl -X POST https://app.philsms.com/api/v3/contacts/6065ecdc9184a/show \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
                                
                            
Returns

Returns a contact object if the request was successful.

                                
{
    "status": "success",
    "data": "group data with all details",
}
                                
                            

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

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

Updates an existing group. You only need to supply the unique ID that was returned upon creation.

API Endpoint

                                
                                    https://app.philsms.com/api/v3/contacts/{group_id}
                                
                            
Parameters
Parameter Required Type Description
group_id
Yes
string Contact Groups uid
name
Yes
string New group name
Example request
                                
curl -X PATCH https://app.philsms.com/api/v3/contacts/6065ecdc9184a \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{"name":"SMS Update"}'
                                
                            
Returns

Returns a contact object if the request was successful.

                                
{
    "status": "success",
    "data": "groups data with all details",
}
                                
                            

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

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

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

API Endpoint

                                
                                    https://app.philsms.com/api/v3/contacts/{group_id}
                                
                            
Parameters
Parameter Required Type Description
group_id
Yes
string Contact Groups uid
Example request
                                
curl -X DELETE https://app.philsms.com/api/v3/contacts/6065ecdc9184a \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
                                
                            
Returns

Returns a contact object if the request was successful.

                                
{
    "status": "success",
    "data": "null",
}
                                
                            

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

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

API Endpoint

                                
                                    https://app.philsms.com/api/v3/contacts/
                                
                            
Example request
                                
curl -X GET https://app.philsms.com/api/v3/contacts \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
                                
                            
Returns

Returns a contact object if the request was successful.

                                
{
    "status": "success",
    "data": "group data with pagination",
}
                                
                            

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

                                
{
    "status": "error",
    "message" : "A human-readable description of the error."
}
                                
                            
SMS API
IMPORTANT ADVISORY REGARDING URLs
SMART TELCO does not allow messages with URL shortener links. Sending such content will result in non-delivery to the recipient. If you wish to send SMS with links, we advise using the full URL (e.g. https://philsms.com/) for your message.

Please also avoid repeatedly sending messages with nearly identical content to the same number for testing purposes, as telecommunication providers may classify this as spam. Consequently, that number may temporarily be unable to receive SMS messages for a brief period.
PhilSMS SMS API allows you to send and receive SMS messages to the Philippines 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://app.philsms.com/api/v3/sms/send
                                
                            
Parameters
Parameter Required Description
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

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

Send your first SMS message with this example request.

API Endpoint

                                
                                    https://app.philsms.com/api/v3/sms/send
                                
                            
Parameters
Parameter Required Type Description
recipient
Yes
string Number to send message. Use comma (,) to send multiple numbers. Ex. 639171234567,639201234567
sender_id
Yes
string The 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
string The type of the message. For plain text message you have to insert plain or unicode as sms type.
message
Yes
string The body of the SMS message.
schedule_time
No
datetime The scheduled date and time of the message in RFC3339 format (Y-m-d H:i)
dlt_template_id
No
string The ID of your registered DLT (Distributed Ledger Technology) content template.
Example request for Single Number
                                
curl -X POST https://app.philsms.com/api/v3/sms/send \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"639171234567",
"sender_id":"YourName",
"type":"plain",
"message":"This is a test message"
}'
                                
                            
Example request for Multiple Numbers
                                
curl -X POST https://app.philsms.com/api/v3/sms/send \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"639171234567,639201234567",
"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.

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

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

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

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

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

API Endpoint

                                
                                    https://app.philsms.com/api/v3/sms/campaign
                                
                            
Parameters
Parameter Required Type Description
contact_list_id
Yes
string Contact list to send message. Use comma (,) to send multiple contact lists. Ex. 6415907d0d7a6,6415907d0d37a
sender_id
Yes
string The 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
string The type of the message. For text message you have to insert plain as sms type.
message
Yes
string The body of the SMS message.
schedule_time
No
datetime The scheduled date and time of the message in RFC3339 format (Y-m-d H:i)
dlt_template_id
No
string The ID of your registered DLT (Distributed Ledger Technology) content template.
Example request for Single Contact List
                                
curl -X POST https://app.philsms.com/api/v3/sms/campaign \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"639171234567",
"sender_id":"YourName",
"type":"plain",
"message":"This is a test message"
}'
                                
                            
Example request for Multiple Contact Lists
                                
curl -X POST https://app.philsms.com/api/v3/sms/campaign \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"639171234567,639201234567",
"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.

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

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

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

You can use PhilSMS'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

                                
                                    https://app.philsms.com/api/v3/sms/{uid}
                                
                            
Parameters
Parameter Required Type Description
uid
Yes
string A unique random uid which is created on the PhilSMS platform and is returned upon creation of the object.
Example request
                                
curl -X GET https://app.philsms.com/api/v3/sms/606812e63f78b \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
                                
                            
Returns

Returns a contact object if the request was successful.

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

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

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

API Endpoint

                                
                                    https://app.philsms.com/api/v3/sms/
                                
                            
Example request
                                
curl -X GET https://app.philsms.com/api/v3/sms \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
                                
                            
Returns

Returns a contact object if the request was successful.

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

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

                                
{
    "status": "error",
    "message" : "A human-readable description of the error."
}
                                
                            
Voice API
PhilSMS SMS API allows you to send and receive SMS messages to the Philippines 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://app.philsms.com/api/v3/sms/send
                                
                            
Parameters
Parameter Required Description
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

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

Send your first SMS message with this example request.

API Endpoint

                                
                                    https://app.philsms.com/api/v3/sms/send
                                
                            
Parameters
Parameter Required Type Description
recipient
Yes
string Number to send message
sender_id
Yes
string The 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
string The type of the message. For text message you have to insert voice as sms type.
language
Yes
string The language in which the message needs to be read to the recipient. Possible values are: cy-gb, da-dk, de-de, el-gr, en-au, en-gb, en-gb-wls, en-in, en-us, es-es, es-mx, es-us, fr-ca, fr-fr, id-id, is-is, it-it, ja-jp, ko-kr, ms-my, nb-no, nl-nl, pl-pl, pt-br, pt-pt, ro-ro, ru-ru, sv-se, ta-in, th-th, tr-tr, vi-vn, zh-cn, zh-hk.
gender
Yes
string The gender in which the messages needs to be read to the recipient. Possible values are: male, female
message
Yes
string The body of the SMS message.
schedule_time
No
datetime The scheduled date and time of the message in RFC3339 format (Y-m-d H:i)
Example request
                                
curl -X POST https://app.philsms.com/api/v3/sms/send \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"31612345678",
"sender_id":"YourName",
"type":"voice",
"language=en-gb",
"gender=female",
"message":"This is a test message"
}'
                                
                            
Returns

Returns a contact object if the request was successful.

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

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

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

You can use PhilSMS'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

                                
                                    https://app.philsms.com/api/v3/sms/{uid}
                                
                            
Parameters
Parameter Required Type Description
uid
Yes
string A unique random uid which is created on the PhilSMS platform and is returned upon creation of the object.
Example request
                                
curl -X GET https://app.philsms.com/api/v3/sms/606812e63f78b \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
                                
                            
Returns

Returns a contact object if the request was successful.

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

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

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

API Endpoint

                                
                                    https://app.philsms.com/api/v3/sms/
                                
                            
Example request
                                
curl -X GET https://app.philsms.com/api/v3/sms \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
                                
                            
Returns

Returns a contact object if the request was successful.

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

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

                                
{
    "status": "error",
    "message" : "A human-readable description of the error."
}
                                
                            
MMS API
PhilSMS SMS API allows you to send and receive SMS messages to the Philippines 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://app.philsms.com/api/v3/sms/send
                                
                            
Parameters
Parameter Required Description
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

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

Send your first SMS message with this example request.

API Endpoint

                                
                                    https://app.philsms.com/api/v3/sms/send
                                
                            
Parameters
Parameter Required Type Description
recipient
Yes
string Number to send message
sender_id
Yes
string The 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
string The type of the message. For text message you have to insert mms as sms type.
media_url
Yes
url URL's of attachment of the MMS message. Supported media types: image/*
message
No
string The body of the SMS message.
schedule_time
No
datetime The scheduled date and time of the message in RFC3339 format (Y-m-d H:i)
Example request
                                
curl -X POST https://app.philsms.com/api/v3/sms/send \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"31612345678",
"sender_id":"YourName",
"type":"mms",
"message":"This is a test message",
"media_url=https://via.placeholder.com/150.jpg"
}'

                                
                            
Returns

Returns a contact object if the request was successful.

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

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

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

You can use PhilSMS'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

                                
                                    https://app.philsms.com/api/v3/sms/{uid}
                                
                            
Parameters
Parameter Required Type Description
uid
Yes
string A unique random uid which is created on the PhilSMS platform and is returned upon creation of the object.
Example request
                                
curl -X GET https://app.philsms.com/api/v3/sms/606812e63f78b \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
}'
                                
                            
Returns

Returns a contact object if the request was successful.

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

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

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

API Endpoint

                                
                                    https://app.philsms.com/api/v3/sms/
                                
                            
Example request
                                
curl -X GET https://app.philsms.com/api/v3/sms \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
                                
                            
Returns

Returns a contact object if the request was successful.

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

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

                                
{
    "status": "error",
    "message" : "A human-readable description of the error."
}
                                
                            
WhatsApp API
PhilSMS SMS API allows you to send and receive SMS messages to the Philippines 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://app.philsms.com/api/v3/sms/send
                                
                            
Parameters
Parameter Required Description
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

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

Send your first SMS message with this example request.

API Endpoint

                                
                                    https://app.philsms.com/api/v3/sms/send
                                
                            
Parameters
Parameter Required Type Description
recipient
Yes
string Number to send message
sender_id
Yes
string The 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
string The type of the message. For text message you have to insert whatsapp as sms type.
message
Yes
string The body of the SMS message.
schedule_time
No
datetime The scheduled date and time of the message in RFC3339 format (Y-m-d H:i)
Example request
                                
curl -X POST https://app.philsms.com/api/v3/sms/send \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-d '{
"recipient":"31612345678",
"sender_id":"YourName",
"type":"whatsapp",
"message":"This is a test message"
}'
                                
                            
Returns

Returns a contact object if the request was successful.

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

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

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

You can use PhilSMS'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

                                
                                    https://app.philsms.com/api/v3/sms/{uid}
                                
                            
Parameters
Parameter Required Type Description
uid
Yes
string A unique random uid which is created on the PhilSMS platform and is returned upon creation of the object.
Example request
                                
curl -X GET https://app.philsms.com/api/v3/sms/606812e63f78b \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
                                
                            
Returns

Returns a contact object if the request was successful.

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

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

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

API Endpoint

                                
                                    https://app.philsms.com/api/v3/sms/
                                
                            
Example request
                                
curl -X GET https://app.philsms.com/api/v3/sms \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
                                
                            
Returns

Returns a contact object if the request was successful.

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

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

                                
{
    "status": "error",
    "message" : "A human-readable description of the error."
}
                                
                            
Profile API
PhilSMS Profile API allows you to retrieve your total remaining sms unit, used sms unit, and your profile information.

API Endpoint

                                
                                    https://app.philsms.com/api/v3/me
                                
                            
Parameters
Parameter Required Description
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
View sms unit

API Endpoint

                                
                                    https://app.philsms.com/api/v3/balance
                                
                            
Example request
                                
curl -X GET https://app.philsms.com/api/v3/balance \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
                                
                            
Returns

Returns a contact object if the request was successful.

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

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

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

API Endpoint

                                
                                    https://app.philsms.com/api/v3/me
                                
                            
Example request
                                
curl -X GET https://app.philsms.com/api/v3/me \
-H 'Authorization: Bearer 49|LNFe8WJ7CPtvl2mzowAB4ll4enbFR0XGgnQh2qWY' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
                                
                            
Returns

Returns a contact object if the request was successful.

                                
{
    "status": "success",
    "data": "profile data with all details",
}
                                
                            

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

                                
{
    "status": "error",
    "message" : "A human-readable description of the error."
}
                                
                            
SMS API
Sample codes for sending messages. Just change the needed parameters and your ready to go.

PHP

    
        $send_data = [];

        //START - Parameters to Change
        //Put the SID here
        $send_data['sender_id'] = "PhilSMS";    
        //Put the number or numbers here separated by comma w/ the country code +63
        $send_data['recipient'] = "+639171234567"; 
        //Put message content here
        $send_data['message'] = "Sample broadcast message content.";
        //Put your API TOKEN here
        $token = "172|tTKu1adjj2Adoa8amdAfdaksaAd04otcv6i4q4";
        //END - Parameters to Change

        //No more parameters to change below.
        $parameters = json_encode($send_data);
        $ch = curl_init();
        curl_setopt($ch, CURLOPT_URL, "https://app.philsms.com/api/v3/sms/send");
        curl_setopt($ch, CURLOPT_POST, true);
        curl_setopt($ch, CURLOPT_POSTFIELDS, $parameters);
        curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
        
        $headers = [];
        $headers = array(
            "Content-Type: application/json",
            "Authorization: Bearer $token"
        );
        curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
        
        $get_sms_status = curl_exec($ch);
        
        var_dump($get_sms_status);