Unlocking Seamless Integration: Your Comprehensive API Documentation Guide
Back To HomeAccount 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 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.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
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 |
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
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. |
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 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."
}
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}
Parameter | Required | Type | Description |
---|---|---|---|
group_id |
Yes
|
string | Contact Groups uid |
uid |
Yes
|
string | Contact uid |
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 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."
}
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}
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. |
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 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."
}
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}
Parameter | Required | Type | Description |
---|---|---|---|
group_id |
Yes
|
string | Contact Groups uid |
uid |
Yes
|
string | Contact uid |
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 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."
}
API Endpoint
https://app.philsms.com/api/v3/contacts/{group_id}/all
Parameter | Required | Type | Description |
---|---|---|---|
group_id |
Yes
|
string | Contact Groups uid |
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 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."
}
API Endpoint
https://app.philsms.com/api/v3/contacts
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 |
Creates a new group object. PhilSMS returns the created group object with each request.
API Endpoint
https://app.philsms.com/api/v3/contacts
Parameter | Required | Type | Description |
---|---|---|---|
name |
Yes
|
string | The name of the group |
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 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."
}
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/
Parameter | Required | Type | Description |
---|---|---|---|
group_id |
Yes
|
string | Contact Groups uid |
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 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."
}
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}
Parameter | Required | Type | Description |
---|---|---|---|
group_id |
Yes
|
string | Contact Groups uid |
name |
Yes
|
string | New group name |
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 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."
}
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}
Parameter | Required | Type | Description |
---|---|---|---|
group_id |
Yes
|
string | Contact Groups uid |
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 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."
}
API Endpoint
https://app.philsms.com/api/v3/contacts/
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 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."
}
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.
API Endpoint
https://app.philsms.com/api/v3/sms/send
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 |
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
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. |
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"
}'
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 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."
}
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
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. |
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"
}'
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 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."
}
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}
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. |
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 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."
}
API Endpoint
https://app.philsms.com/api/v3/sms/
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 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."
}
API Endpoint
https://app.philsms.com/api/v3/sms/send
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 |
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
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) |
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 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."
}
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}
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. |
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 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."
}
API Endpoint
https://app.philsms.com/api/v3/sms/
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 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."
}
API Endpoint
https://app.philsms.com/api/v3/sms/send
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 |
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
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) |
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 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."
}
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}
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. |
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 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."
}
API Endpoint
https://app.philsms.com/api/v3/sms/
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 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."
}
API Endpoint
https://app.philsms.com/api/v3/sms/send
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 |
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
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) |
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 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."
}
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}
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. |
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 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."
}
API Endpoint
https://app.philsms.com/api/v3/sms/
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 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."
}
API Endpoint
https://app.philsms.com/api/v3/me
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 |
API Endpoint
https://app.philsms.com/api/v3/balance
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 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."
}
API Endpoint
https://app.philsms.com/api/v3/me
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 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."
}
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);