Overview
Telecom Lookup Tools
Powered By GitBook
Outline
Welcome to the teleapi documentation. teleapi was written to be the easiest API to integrate with, taking the positive attributes of a RESTFUL api and combining that with the simplicity that the web was created on.
All API commands can be sent using GET or POST, and no username, or special attributes are required, just your token.
On the standard API, we support JSON, XML and PHP serialize natively, just pass format=xml or format=php in your GET or POST request.
Many pages are outlined with the coding Method and a sample from a few different programming languages. These should get you started immediately.

Coding Samples

Most pages will look like this, with the URL and coding examples.
URL:

Response Codes

At the top right of the screen, you will have RESPONSE for response expectations.
shell
PHP
RESPONSE
CURL
1
curl -v -X POST "https://api.teleapi.net/sms/send?token=XXXX" \
2
-d "source=13035551212&destination=13038884444&message=hello+there"
Copied!
PHP - file_get_contents
1
<?php
2
$data = array("source" => "13035551212",
3
"destination" => "13038884444",
4
"message" => "hey there");
5
โ€‹
6
$data = http_build_query($data);
7
โ€‹
8
$x = file_get_contents("https://api.teleapi.net/sms/send?token=XXXX&$data");
9
$object = json_decode($x);
10
print_r($object);
Copied!

Responses from API

Successfully Sent

data
This is your unique tracking ID for this SMS message. You can track this in delivery notifications.
1
{
2
"code":200,
3
"status":"success",
4
"data":"ea19aa71-4590-4e6b-a8ce-47e2b84c8091"
5
}
Copied!

Failed to Send

1
{
2
"code":400,
3
"status":"error",
4
"data":"Invalid source number"
5
}
Copied!
Last modified 1yr ago