An API for sending and receiving faxes
I love Twilio for many reasons. I think they make cool products. Their mobile SMS integration services is by far the best in the world. They understand cloud, they get mobile behaviour and they understand the value around integration of services.
Truly innovative bunch of guys there, making amazing software.
And now they have launched a programmable API which can send and receive faxes between your application and the fax machine. Fax is almost archaic, in every day use - but even then it does have its hour of glory. The last minute original document, the need to physical documentation and so on.
Truth however, is that Fax is a painful experience. Everything about it is painful, from papers to spooling to dialling to losing the connection and crumbling into a heap of irritation and anger. With this solution though you can turn faxing documents into a software experience using a simple and reliable API that’s easy to integrate into web and mobile applications.
The API is built on REST Standards and comes with helper libraries to get you started on your programming language while the service runs on Twilio Cloud.
You can send a fax by providing source and destination numbers and a URL to a PDF file to send.
You will need ;
- A From number - this can be either an Incoming Phone Number or an Outgoing Caller ID.
- A destination phone number
- A URL which points to the media that will be sent via fax (currently, this must be a PDF file)
See: Send a fax
When sending a fax, a quality value can also be provided; if not, quality defaults to fine. Some destination fax hardware may not support higher quality levels, so you may need to specify a lower quality to ensure delivery. Lower quality faxes will also generally take less time to send.
When sending a fax, status information can be sent to a callback URL.
Twilio will store copies of PDFs for sent faxes. The PDFs are available at the URL specified on the Fax instance resource.
To receive a fax, you will need:
- An Incoming Phone Number, configured as a fax number - this will cause the number to be unavailable to receive calls using Programmable Voice
- A FaxUrl, which will be consulted when a fax is received.
First, ensure that you have an Incoming Phone Number on your account that supports receiving faxes. The number you select should have true for the fax item in the capabilities object, or, if using the Console, should have "Fax" listed in its capabilities.
If you don't have a fax-capable number, you'll need to purchase one. You can either use the Available Phone NumbersREST API resource (query with FaxEnabled=true) ,or Console Phone Numbers Search (check the box to search for numbers with the Fax capability) to do so.
Next, you need to configure the number's Voice Receive Mode so that the number receives faxes rather than voice calls. Again, you can either use the API's Incoming Phone Numbers resource (POST to the instance resource with VoiceReceiveMode=fax) or the Console, by selecting the phone number you want to use from the list, and changing the value of the "Accepts" dropdown box to "Faxes".
For more documentation and developer guide click here.