API Documentation

Welcome to Textko API v3!

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.

Authorization

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 and then check out your account page.

To authenticate:

Attach a Authorization: Bearer xxx header in your HTTP requests, like so:


Sample Header

curl -H 'Authorization: Bearer your-access-token-here' ...

Send SMS

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."
}

Get a specific SMS

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."
}

Get list of SMS

To get the your list of SMS, you can do a GET /api/v3/sms request, like so:


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."
}

SDKs

Here are our SDK for your convenience:

Can’t find your language of choice? Request us to make one for you!


Have question?

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 © 2019.