Messaging

This section of the API documentation specifies the routes in relation to messaging.

Base URL

https://api.txt4me.com/

All request to the API must be submited to the base URL.


Create a message

Create a new outgoing message and queues it to the device to send.

You must add the specified headers in the "Authentication" section of this documentation to be authenticated.

POST /messages
Parameter Description
message[to] Your recipient's cellphone number. (Maximum of 300 numbers per API call).
message[body] The content of your message, what will you tell to your recipients. (Maximum of 320 characters)
message[from] Specify what sender id will appear into your message. To send with a number (e.g. 639123456789), set this parameter to "regular", and if you want your message to have a customized sender id, set this parameter to the sender id you enrolled to us.

When sending with your customized sender id, it will cost you PHP 1.00 per text and 1 text = 160 characters, so if your message body contains 161 characters, it will cost you PHP 2.00. Sending your message with a number will not be charged.

Example Response

HTTP/1.1 200 OK
Date: Tue, 26 Feb 2019 02:45:33 GMT
Server: Apache/2.4.27 (Win32) OpenSSL/1.0.2l PHP/7.3.2
Accept: application/json
X-Content-Type-Options: nosniff
X-Frame-Options: deny
Content-Length: 86
Keep-Alive: timeout=9, max=900
Connection: Keep-Alive
Content-Type: application/json;charset=utf-8;


{
    "message": "Message 1b75ab349c46 has been added to queque",
    "error": false
}

results matching ""

    No results matching ""