Articles in this support section discuss Telebroad's legacy APIs. To learn about the current version of Telebroad APIs, which offer additional authentication options and support for advanced features, please go to https://developers.telebroad.com/.
The specific current version of the POST/send/fax API is covered here.
With the POST/send/fax request, you can use your Telebroad account to send a fax document to a recipient's fax machine or fax-enabled VoIP service.
Parameters
All parameters go in the request body in JSON Raw format.
| Parameter | Type | Operation |
| snumber | string | The source number, belonging to a user, where the fax is to be sent from. |
| cnumber | string | The recipient (destination) number where the fax is to be sent to. |
| string | Provide an email address here to get a status report about the sent document. | |
| data | string | The file of the fax document encoded into a text string using the base64 format. Converting a file to Base64 can be easily done with one of many online converters, such as this one. After performing the conversion, simply copy and paste the resulting string into the data field. Note that the resulting string may be many pages long, especially for a PDF file. |
| file_extension | string | The default file format is PDF. If you are faxing a file with a different format, you need to specify the file extension for the appropriate format here. |
Example
To send a fax document from fax line 1-646-699-1360 to destination number 1-347-535-2211 with a report sent to fax-api-example@test.com, use this syntax:
HTTPS method: POST
Header
webserv.telebroad.com/api/teleconsole/rest/send/fax
Body
The returned data field may be dozens of pages long. Shown here is a truncated version.
{
"snumber":"16466991360",
"cnumber":"19178644345",
"email":"fax-api-example@test.com",
"data":"JVBERi0xLjQKJeHp69MKMiAwIG9iago8PC9U
eXBlIC9DYXRhbG9nCi9QYWdlcyAxIDAgUgo+PgplbmRvYm
oKMyAwIG9iago8PC9UeXBlIC9QYWdlCi9QYXJlbnQgMSAw
IFIKL1Jlc291cmNlcyA8PC9Qcm9jU2V0cyBbL1BERiAvVGV4d
CAvSW1hZ2VCIC9JbWFnZUMgL0ltYWdlSV0KL0V4dEdTdGF0ZSA
8PC9HMCA0IDAgUgo+PgovRm9udCA8PC9GMCA1IDAgUgo+Pgo+Pgov
TWVkaWFCb3ggWzAgMCA1OTUgODQxXQovQ29udGVudHMgNiAwIFIKP
j4KZW5kb2JqCjYgMCBvYmoKPDwvTGVuZ3RoIDQ1NTAKPj4gc3
.
.
.
RyZWFtC"
}
Response:
If the message was sent successfully, you will get a "null" error and a result field with a reference number for the fax transmission.
{
"error": null,
"result":{
"Status": "Success",
"Result": "383261282"
}
If there was a problem sending the fax you will get an error code and a message explaining it. In the following example the destination number provided in the request was not recognized as able to receive fax transmission, hence the message "No remote fax device."
{
"error":{
"code": 444,
"message": "No remote fax device."
}
Email Status
If you provided an email address in the request, you will receive an email message with the status of the fax transmission, including a success or failed status, phone numbers, sending times, number of pages, reference code, and possible reason for failed delivery, if any.
