Programmable Fax Commands
Send a fax
Send a fax. Files have size limits and page count limit validations. If a file is bigger than 50MB or has more than 350 pages it will fail with file_size_limit_exceeded and page_count_limit_exceeded respectively.
Supported file formats:
- PDF (application/pdf)
- TIFF (application/tiff, image/tiff)
- JPEG (image/jpeg)
- PNG (image/png)
- Microsoft Word .doc (application/msword)
- Microsoft Word .docx (application/vnd.openxmlformats-officedocument.wordprocessingml.document)
- Rich Text Format .rtf (application/rtf)
- Plain text .txt (text/plain)
Expected Webhooks:
- fax.queued
- fax.media.processed
- fax.sending.started
- fax.delivered
- fax.failed
post/faxes
Request body
Example request
{
"client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d",
"connection_id": "234423",
"from": "+13125790015",
"from_display_name": "Company Name",
"media_name": "my_media_uploaded_to_media_storage_api",
"media_url": "https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf",
"quality": "high",
"to": "+13127367276",
"webhook_url": "https://www.example.com/server-b/"
}Response
Send fax response
Example response
{
"data": {
"client_state": "aGF2ZSBhIG5pY2UgZGF5ID1d",
"connection_id": "c-1",
"created_at": "2020-05-05T09:59:12Z",
"direction": "outbound",
"failure_reason": null,
"from": "+123",
"id": "0ccc7b54-4df3-4bca-a65a-3da1ecc777f0",
"internal_failure_reason": null,
"media_url": "http://www.example.com/fax.pdf",
"preview_url": "https://s3.amazonaws.com/faxes-dev/user-1/cf4a6b52-bf8e-4945-9f49-611d0d2b083b_preview.tiff?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxxxxxxxxx%2F20200505%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200505T095917Z&X-Amz-Expires=7200&X-Amz-SignedHeaders=host&X-Amz-Signature=fac2af40464fcc77673ad762db86e34f9c1b91a82699b5578c5327f53874df51",
"quality": "high",
"record_type": "fax",
"status": "queued",
"store_media": true,
"stored_media_url": "https://s3.amazonaws.com/faxes-dev/user-1/cf4a6b52-bf8e-4945-9f49-611d0d2b083b.pdf?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=xxxxxxxxxx%2F20200505%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20200505T095917Z&X-Amz-Expires=7200&X-Amz-SignedHeaders=host&X-Amz-Signature=fac2af40464fcc77673ad762db86e34f9c1b91a82699b5578c5327f53874df51",
"to": "+456",
"updated_at": "2020-05-05T09:59:12Z",
"webhook_failover_url": "",
"webhook_url": "http://www.example.com/webhooks"
}
}