Txt4Me API Documentation

This Documentation intends to integrate the txt4me sms capabilities to your existing apps.

The REST API provides access to send message. Other capabilities will be added soon. The API identifies users using

a custom header for its authentication; response are in JSON format.

Schema

All API routes are all over HTTPS and access thru https://api.txt4me.com

Access to the any of the API routes explicitly requires HTTPS


$ curl -i https://api.txt4me.com/

HTTP/1.1 200 OK
Date: Fri, 22 Feb 2019 16:37:34 GMT
Server: Apache/2.4.27 (Win32) OpenSSL/1.0.2l PHP/7.3.2
Content-Length: 521
Content-Type: application/json;charset=UTF-8

{....}

Authentication

The API provides Authorization Bearer Token and a custom "X-Token" header for its authenticaton.

Request(s) that require authentication will return a 403 Forbidden if headers above are invalid or not submitted alogn with the request. This is to prevent unauthorized users to use the API.

Errors

The API uses conventional HTTP response codes to indicate a successful or a failure request(s).

Codes like 2xx range indicate a successful request, while codes in the 4xx range indicate an error that failed given the information provided (e.g. a required parameter is empty, too long message), and codes in the 5xx range indicate an error with the servers (happends in a rare occassions).

HTTP status codes

Status Description
200 - OK All Good.
400 - Bad Request The request was successful but unacceptable, mainly because of a missing a required parameter.
422 - Unprocessable Entity The request did not complete because no parameter(s) submitted or the request cannot be processed
404 - Not Found The requested url does not exist.

Example Response

HTTP/1.1 400 Bad Request
Date: Sat, 23 Feb 2019 04:32:28 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: 82
Connection: close
Content-Type: application/json;charset=utf-8;

{
    "error": true,
    "message": "Required field(s) body is missing or empty"
}

Help and Support

We're happy to help out with your inquiries or question you have in mind. Feel free to contact us .

results matching ""

    No results matching ""