Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now

Menu

Expand
Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

Sending Faxes

This guide details how to send a fax in common web languages and cURL. To send a fax with Twilio Programmable Fax, you will use the Twilio Fax REST API.

Each fax you send will require:

  • Either a destination phone number or SIP URI
  • A From number. Either:
  • A URL which points to the media that will be sent via fax
    • Currently, this must be a PDF file (see below)

You should not expose your PDF globally beyond any testing. To verify a request comes from Twilio, see our Security page.

        
        
        
        

        Prefer a step-by-step guide to sending (and receiving) your first fax? Check out our Programmable Fax quickstart!

        To see more properties and options, also see our API documentation on the Fax Resource.

        Fax Quality and Resolution

        When sending a fax, a quality value can also be provided: if not, quality defaults to fine. Note some destination fax hardware may not support higher quality levels and you may need to specify a lower quality to ensure delivery. Lower quality faxes also generally take less time to send.

        Fax Status Callbacks

        When sending a fax, status information can be sent to a callback URL.

        Fax Storage, Management, and Deletion

        Twilio will store copies of PDFs for sent faxes. The PDFs are available at the URL specified on the Fax instance resource.

        Log data for each fax will be available via the REST API for 180 days after creation. When old fax records are pruned, Twilio also deletes the media associated with the pruned records. If you wish to delete data before that, you can delete just the media, or the entire resource, including the media.

        Avoiding Media Storage

        You can use the StoreMedia=false parameter on the API which directs Twilio to delete the fax media once the transmission is complete. This parameter defaults to true if unspecified. If StoreMedia=false is specified, media stored temporarily during the transmission process is purged immediately after the fax has been completed, both when the fax succeeded or failed. However, Twilio still stores a metadata record of the sent fax. If you wish to delete this record, you can do so using the REST API.

        Sending Faxes with Twilio

        Now you've seen how to send faxes with common web languages and cURL and learned about a few properties you'll probably need to use.

        Want to see more? Next, see the Fax REST API documentation.

        Rate this page:

        Need some help?

        We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.