POST/send/fax

Function


The POST/send/fax method allows you to use your Telebroad account to send a fax document to a recipient's fax machine or fax enabled VoIP service.


Parameters


There are no parameters in the header. All parameters go in the body in JSON Raw format.


ParameterTypeOperation
snumberstringThe source number where the fax is to be sent from (that is the Telebroad user number.)
cnumberstringThe recipient (destination) number where the fax is to be sent to.
emailstringProvide an email address here to get a status report about the sent document.
datastringThe 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 convertors, 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_extensionstringThe 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:


HTTP method: POST


Header

webserv.telebroad.com/api/teleconsole/rest/send/fax


Body


The data field may be many 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 the code. In the example seen here 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. 


Did you find it helpful? Yes No

Send feedback
Sorry we couldn't be helpful. Help us improve this article with your feedback.