Textko is a dead-simple way to send SMS to your customers, friends and loved ones in the Philippines.
You're in the right place to discover how you can integrate Textko in your applications.
Before you can start sending requests to Textko API, you need first your own API Access Token.
To get your access token, you can [register for an account](https://textko.com/register) and then check out [your account page](https://textko.com/account).
Attach a Authorization: Bearer xxx
header in your HTTP requests, like so:
Sample Header
curl -H 'Authorization: Bearer your-access-token-here' ...
Sending SMS via Textko API is easy. To send an SMS, you can send a POST /api/v3/sms
request, like so:
Required Fields:
to
- The recipient of your sms.text
- The message you want to send.Request:
curl -X POST \
https://textko.com/api/v3/sms \
-H 'Authorization: Bearer your-access-token-here' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{"to": "09171234567","text": "Hello from API."}'
Note: Change
your-access-token-here
with your account access token.
Result:
{
"result": {
"to": "+639171234567",
"text": "Hello from API.",
"status": "pending",
"updated_at": "2019-11-27 19:41:40",
"created_at": "2019-11-27 19:41:40",
"sms_id": "YE4"
},
"message": "Hooray! Your text has been sent."
}
To get a specific SMS, you can do a GET /api/v3/sms/{smsId}
request, like so:
Required Parameter:
smsId
- The id of your sms you want to get.Request:
To get an SMS ID → YE4
curl -X GET \
https://textko.com/api/v3/sms/YE4 \
-H 'Authorization: Bearer your-access-token-here' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json'
Note: Change
your-access-token-here
with your account access token.
Result:
{
"result": {
"to": "+639171234567",
"text": "Hello from API.",
"status": "sent",
"updated_at": "2019-11-27 19:41:40",
"created_at": "2019-11-27 19:41:40",
"sms_id": "YE4"
},
"message": "Your SMS record."
}
To get the your list of SMS, you can do a GET /api/v3/sms
request, like so:
Filtering
You can also filter your list of SMS. You can do so by using LHS bracket.
https://textko.com/api/v3/sms?$FIELD[$LHS_OPERATOR]=$VALUE
Example: To filter all your SMS created/sent between two dates:
https://textko.com/api/v3/sms?created_at[between]=2020-06-01 00:00:00,2020-06-29 23:59:59
Available LHS bracket operators:
Note: You can combine multiple filters too!
Request:
curl -X GET \
https://textko.com/api/v3/sms \
-H 'Authorization: Bearer your-access-token-here' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json'
Note: Change
your-access-token-here
with your account access token.
Result:
{
"result": {
"current_page": 1,
"data": [
{
"sms_id": "AbC",
"to": "+639171234567",
"text": "Hello from API.",
"status": "sent",
"created_at": "2019-11-27 20:52:44",
"updated_at": "2019-11-27 20:52:56"
},
{
"sms_id": "dEf",
"to": "+639171234567",
"text": "Hello from PHP library!",
"status": "sent",
"created_at": "2019-11-27 20:15:21",
"updated_at": "2019-11-27 20:15:31"
}
],
"first_page_url": "https://textko.com/api/v3/sms?page=1",
"from": 1,
"next_page_url": "https://textko.com/api/v3/sms?page=2",
"path": "https://textko.com/api/v3/sms",
"per_page": 15,
"prev_page_url": null,
"to": 15
},
"message": "Your list of SMS."
}
Here are our SDK for your convenience:
Can't find your language of choice? Request us to make one for you!
If you have any questions, feel free to buzz us. We're happy to help!
Our Terms of Service and Privacy Policy. All rights reserved © 2021.