List any emails for a number.
Fax API (3.0)
This document provides a detailed user guide and reference documentation on the Fax REST API.
If you have questions please contact us via our support portal and a team member will be happy to assist.
You must create an account on our support portal if you do not have one.
Sinch has a global server that will route your call to the appropriate geography region automatically:
https://fax.api.sinch.com/In general we retain fax logs and media for 13 months and you can access that via the API.
Find error codes and explanations here.
The Fax API allows you to send and receive faxes. You can send faxes to a single recipient or to multiple recipients. You can also receive faxes and download them.
To send a TEST Outbound fax you can send a fax TO +19898989898. This will emulate all aspects of a real fax without charging your account.
Webhooks allow you to get updates in real-time about the status of your faxes. Webhooks are triggered by events such as the completion of a fax, and transmit information about the state of that fax to you via HTTP(S) or email. HTTP webhooks are multipart/form-data POST requests, and should be processed like form submissions.
The Emails endpoint allows you to configure the Fax to Email functionality. Fax to Email allows you to send an email and then receive a fax on your Sinch number or send a fax and have it sent to your email address. The service supports sending incoming faxes to multiple email addresses and having many numbers associated with one email address.
You can configure fax to email in two different places:
- In the dashboard on a number-by-number basis or by adding an email address and associating many numbers to one email address.
- Via the API when you create a number or update a number, or by using the email endpoint to set it up directly
- Supported fax to email file types are Word, PDF, and TIF
The following example shows how to configure Fax to Email using the API:
- Buy a number in the dashboard and assign it to a Fax service
- Add your email and associate it with the number you bought in step 1.
POST https://fax.api.sinch.com/v3/projects/{projectId}/services/{serviceId}/emails
{
"email": "user@domain.com",
"phoneNumbers": [
"+14155552222"
]
}Now you can use your email client with the above email address to fax.
Make sure the email address you are sending from is added to your account. You can add it in the dashboard under Fax to email or via the API.
Send an email to {PhoneNumberToSendFaxTo}@sinchfax.com with the following:
| Field | Description |
|---|---|
| Subject: | If you have multiple phone numbers associated with the email address, enter the number you want to use. If left blank, the first number that we find will be used. |
| Body: | By default, the email body is not used. |
| Attachments | Add any attachments you want to fax. If you want to specify the order of pages we recommend that you create one document with all pages in the correct order and attach that document. If you attach multiple documents we will merge them into one document in the order we receive them. |
When you receive a fax, we will send you an email with the following:
| Field | Description |
|---|---|
| From: | The number the fax was sent from, e.g. +15612600684@sinchfax.com |
| Subject: | Fax received on {your sinch number the fax was sent to} |
| Body: | The body will contain data such as number of pages or other relevant metadata of the fax. |
There will be one PDF attachment with the fax content.
Make sure you allowlist sinchfax.com and sinch.com in your spam filter to ensure delivery to your inbox, both on client and server side. Ensure your mail server is setup correctly and not on spam lists.
- v3.0 of the Fax APIhttps://fax.api.sinch.com/v3/projects/YOUR_project_id/services/{id}/numbers/{phoneNumber}/emails
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://fax.api.sinch.com/v3/projects/YOUR_project_id/services/{id}/numbers/+15612600684/emails?page=1&pageSize=20'{ "emails": [ "user@example.com" ], "page": 0, "totalPages": 0, "pageSize": 0, "totalItems": 0 }
- v3.0 of the Fax APIhttps://fax.api.sinch.com/v3/projects/YOUR_project_id/services/{serviceId}/emails
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://fax.api.sinch.com/v3/projects/YOUR_project_id/services/{serviceId}/emails?page=1&pageSize=20'{ "emails": [ { … } ], "page": 0, "totalPages": 0, "pageSize": 0, "totalItems": 0 }
Request
Add an email to the specified service to be used for sending and receiving faxes. Default settings for permissions parameter is both.
Numbers you want to associate with this email.
A phone number in E.164 format, including the leading '+'.
Allows you to set permissions for sending and receiving faxes to this email/phone number combination. Default value is both.
| Enum Value | Description |
|---|---|
| both | Allows the email to send and receive faxes to this email/phone number combination. |
| send | Allows the email to only send faxes to this email/phone number combination. |
| receive | Allows the email to only receive faxes from this email/phone number combination. |
- v3.0 of the Fax APIhttps://fax.api.sinch.com/v3/projects/YOUR_project_id/services/{serviceId}/emails
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X POST \
-u <username>:<password> \
'https://fax.api.sinch.com/v3/projects/YOUR_project_id/services/{serviceId}/emails' \
-H 'Content-Type: application/json' \
-d '{
"email": "user@domain.com",
"phoneNumbers": [
{
"number": "+14155552222",
"permissions": "both"
}
]
}'The added email
Numbers you want to associate with this email.
A phone number in E.164 format, including the leading '+'.
Allows you to set permissions for sending and receiving faxes to this email/phone number combination. Default value is both.
| Enum Value | Description |
|---|---|
| both | Allows the email to send and receive faxes to this email/phone number combination. |
| send | Allows the email to only send faxes to this email/phone number combination. |
| receive | Allows the email to only receive faxes from this email/phone number combination. |
{ "email": "user@domain.com", "phoneNumbers": [ { … } ], "projectId": "ae00f005-e392-44dc-b3f5-a657a2684dg3" }
List of numbers
A phone number in E.164 format, including the leading '+'.
Allows you to set permissions for sending and receiving faxes to this email/phone number combination. Default value is both.
| Enum Value | Description |
|---|---|
| both | Allows the email to send and receive faxes to this email/phone number combination. |
| send | Allows the email to only send faxes to this email/phone number combination. |
| receive | Allows the email to only receive faxes from this email/phone number combination. |
- v3.0 of the Fax APIhttps://fax.api.sinch.com/v3/projects/YOUR_project_id/services/{serviceId}/emails/{email}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X PUT \
-u <username>:<password> \
'https://fax.api.sinch.com/v3/projects/YOUR_project_id/services/{serviceId}/emails/{email}' \
-H 'Content-Type: application/json' \
-d '{
"phoneNumbers": [
{
"number": "+14155552222",
"permissions": "both"
}
]
}'The added email
Numbers you want to associate with this email.
A phone number in E.164 format, including the leading '+'.
Allows you to set permissions for sending and receiving faxes to this email/phone number combination. Default value is both.
| Enum Value | Description |
|---|---|
| both | Allows the email to send and receive faxes to this email/phone number combination. |
| send | Allows the email to only send faxes to this email/phone number combination. |
| receive | Allows the email to only receive faxes from this email/phone number combination. |
{ "email": "user@domain.com", "phoneNumbers": [ { … } ], "projectId": "ae00f005-e392-44dc-b3f5-a657a2684dg3" }
- v3.0 of the Fax APIhttps://fax.api.sinch.com/v3/projects/YOUR_project_id/services/{serviceId}/emails/{email}
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X DELETE \
-u <username>:<password> \
'https://fax.api.sinch.com/v3/projects/YOUR_project_id/services/{serviceId}/emails/{email}'- v3.0 of the Fax APIhttps://fax.api.sinch.com/v3/projects/YOUR_project_id/services/{serviceId}/emails/{email}/numbers
- curl
- JavaScript
- Node.js
- Python
- Java
- C#
- PHP
- Go
- Ruby
- R
- Payload
curl -i -X GET \
-u <username>:<password> \
'https://fax.api.sinch.com/v3/projects/YOUR_project_id/services/{serviceId}/emails/{email}/numbers?pageSize=20&page=string'{ "phoneNumbers": [ { … } ], "page": 0, "totalPages": 0, "pageSize": 0, "totalItems": 0 }
You can add cover pages to Sinch Fax either via the API or the Build dashboard.
A Fax service can have 0 or more cover pages configured.
A fax service identifies a set of configuration values. You can specify the service as a part of an API request or by associating a Sinch number with a service.
This can be useful if you want to point a group of numbers to a particular incoming fax URL, or want to set the storage strategy for some of your numbers but not all of them.