# Fax API

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](https://support.sinch.com) and a team member will be happy to assist.
You must create an account on our support portal if you do not have one.
## Authentication
For information on how to authenticate API requests we support two methods [Basic](https://developers.sinch.com/docs/fax/api-reference/authentication/basic) or [Oauth2](https://developers.sinch.com/docs/fax/api-reference/authentication/oauth)
## Global URL
Sinch has a global Fax API server:

```shell
https://fax.api.sinch.com/
```
## Formats
By default, all API calls return a JSON response unless otherwise specified.
### Date time fields
All date and time fields are in UTC format unless otherwise specified.
## Deletion and data retention
If you have enabled storage, we retain fax logs and media for 13 months which you can access via the API. After 13 months, media and logs are deleted.
## Errors & statuses
Find error codes and explanations [here](https://developers.sinch.com/docs/fax/api-reference/fax/error-messages).
## Webhooks
You can configure your service to use webhooks to send a request to you when faxes arrive or complete on your account.
**Note:** When webhooks with Basic authentication credentials are shown in GET requests, the credentials are masked with `***`` symbols. It is not possible to retrieve previously-set credentials through the API.

Version: 3.1
License: MIT

## Servers

v3.0 of the Fax API
```
https://fax.api.sinch.com
```

## Security

### WebhookBasicAuth

You can validate whether a webhook is genuine by providing credentials you set and will check on your server side along with the callback URL, as in this example: `https://username:password@www.YourWebhookWebsite.com`

Type: http
Scheme: basic

### BasicAuth

The user name and password is your keyId and key secret from the [Access keys sections](https://dashboard.sinch.com/settings/access-keys)

Type: http
Scheme: basic

### OAuth2

The user name and password is your key id and key secret from the [Access keys sections](https://dashboard.sinch.com/settings/access-keys)

Type: oauth2
Token URL: https://auth.sinch.com/oauth2/token
Scopes:

## Download OpenAPI description

 - [Fax API](https://developers.sinch.com/_bundle/docs/fax/api-reference/fax.yaml)

## Faxes

 - [POST /v3/projects/{projectId}/faxes](https://developers.sinch.com/docs/fax/api-reference/fax/faxes/sendfax.md): Create and send a fax. Fax content may be supplied via one or more files or URLs of supported filetypes. This endpoint supports the following content types for the fax payload: - Multipart/form-data -
 - [GET /v3/projects/{projectId}/faxes](https://developers.sinch.com/docs/fax/api-reference/fax/faxes/getfaxes.md): List faxes sent (OUTBOUND) or received (INBOUND), set parameters to filter the list. Example: Return calls made between 1st of January 2021 and 10th of January 2021. ``` created>=2021-01-01&startTi
 - [GET /v3/projects/{projectId}/faxes/{id}](https://developers.sinch.com/docs/fax/api-reference/fax/faxes/getfaxinfoperid.md): Get fax information using the ID number of the fax.
 - [GET /v3/projects/{projectId}/faxes/{id}/file](https://developers.sinch.com/docs/fax/api-reference/fax/faxes/getfaxfilebyid.md): Download the fax content.
 - [DELETE /v3/projects/{projectId}/faxes/{id}/file](https://developers.sinch.com/docs/fax/api-reference/fax/faxes/deletefaxcontentbyid.md): Delete the fax content for a fax using the ID number of the fax. Please note that this only deletes the content of the fax from storage.
 - [GET /v3/projects/{projectId}/faxes/{id}/file.{fileFormat}](https://developers.sinch.com/docs/fax/api-reference/fax/faxes/getfaxfilebyiddeprecated.md): Download the fax content.
 - [POST incomingFax](https://developers.sinch.com/docs/fax/api-reference/fax/faxes/incomingfaxevent.md): This webhook is triggered when a fax is received on a Sinch number associated with a service. The webhook will contain information about the fax, such as the sender, the recipient, and the content of
 - [POST faxCompleted](https://developers.sinch.com/docs/fax/api-reference/fax/faxes/faxcompletedcallback.md): Triggered when the fax has been completed. The callback will contain information about the fax, such as the sender, the recipient, and the content of the fax. You must set the callback URL where you w
## Notifications

 - [Setting up webhooks](https://developers.sinch.com/docs/fax/api-reference/fax/notifications/setting-up-webhooks.md): ## Setting up webhooks Depending on the type of webhook, you can configure the callback URLs in a few ways: **Incoming fax notification**: - On your [Fax service](https://dashboard.sinch.com/fax/servi
 - [Retries](https://developers.sinch.com/docs/fax/api-reference/fax/notifications/retries.md): ### Retries If a webhook fails, we will automatically retry sending the fax up to 16 times. There will be a delay before each retry, which increases as follows: | Retry number | Delay | Cumulative wai
 - [IP Addresses](https://developers.sinch.com/docs/fax/api-reference/fax/notifications/ip-addresses.md): ### IP Addresses Notifications are sent from the following IP addresses so you can add them to allowlists if necessary. | IP address | Description | | --- | --- | | 34.232.249.173 | use1 (East) | | 4
 - [POST incomingFax](https://developers.sinch.com/docs/fax/api-reference/fax/notifications/incomingfaxevent.md): This webhook is triggered when a fax is received on a Sinch number associated with a service. The webhook will contain information about the fax, such as the sender, the recipient, and the content of
 - [POST faxCompleted](https://developers.sinch.com/docs/fax/api-reference/fax/notifications/faxcompletedcallback.md): Triggered when the fax has been completed. The callback will contain information about the fax, such as the sender, the recipient, and the content of the fax. You must set the callback URL where you w
## Fax to Email

 - [Setting up fax to email](https://developers.sinch.com/docs/fax/api-reference/fax/fax-to-email/setting-up-fax-to-email.md): ## Setting up fax to email 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 emai
 - [Fax to email example](https://developers.sinch.com/docs/fax/api-reference/fax/fax-to-email/fax-to-email-example.md): ## Fax to email example The following example shows how to configure Fax to Email using the API: 1. Buy a number in the dashboard and assign it to a Fax service 2. Add your email and associate it with
 - [Send a fax using email](https://developers.sinch.com/docs/fax/api-reference/fax/fax-to-email/send-a-fax-using-email.md): ## Send a fax using email Make sure the email address you are sending from is added to your account. You can add it in the dashboard under the **Fax to email** of your Fax service in the [Build dashbo
 - [Receive a fax using email](https://developers.sinch.com/docs/fax/api-reference/fax/fax-to-email/receive-a-fax-using-email.md): ## Receive a fax using email 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. +15612600
 - [Configuring your email system for best performance](https://developers.sinch.com/docs/fax/api-reference/fax/fax-to-email/configuring-your-email-system-for-best-performance.md): ## Configuring your email system for best performance 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. Ensur
 - [Encryption](https://developers.sinch.com/docs/fax/api-reference/fax/fax-to-email/encryption.md): ## Encryption All emails are sent using TLS during transport from Sinch.
 - [GET /v3/projects/{projectId}/services/{id}/numbers/{phoneNumber}/emails](https://developers.sinch.com/docs/fax/api-reference/fax/fax-to-email/getemailsfornumber.md): List any emails for a number.
 - [GET /v3/projects/{projectId}/services/{serviceId}/emails](https://developers.sinch.com/docs/fax/api-reference/fax/fax-to-email/getemailsforproject.md): List emails for the project.
 - [POST /v3/projects/{projectId}/services/{serviceId}/emails](https://developers.sinch.com/docs/fax/api-reference/fax/fax-to-email/createemailforproject.md): Add an email to the specified service to be used for sending and receiving faxes. Default settings for permissions parameter is `both`.
 - [PUT /v3/projects/{projectId}/services/{serviceId}/emails/{email}](https://developers.sinch.com/docs/fax/api-reference/fax/fax-to-email/updateemail.md): Set the numbers for an email.
 - [DELETE /v3/projects/{projectId}/services/{serviceId}/emails/{email}](https://developers.sinch.com/docs/fax/api-reference/fax/fax-to-email/deleteemail.md): Delete an email and associated numbers to that email to disable that email from sending and receiving faxes.
 - [GET /v3/projects/{projectId}/services/{serviceId}/emails/{email}/numbers](https://developers.sinch.com/docs/fax/api-reference/fax/fax-to-email/getnumbersbyemail.md): Get configured numbers for an email
## Domains

 - [GET /v3/projects/{projectId}/services/{serviceId}/domains](https://developers.sinch.com/docs/fax/api-reference/fax/domains/listdomains.md): List existing domains for the specified service.
 - [POST /v3/projects/{projectId}/services/{serviceId}/domains/{domainName}](https://developers.sinch.com/docs/fax/api-reference/fax/domains/createdomain.md): Creates a new domain on the specified service to host email templates.
 - [GET /v3/projects/{projectId}/services/{serviceId}/domains/{domainName}](https://developers.sinch.com/docs/fax/api-reference/fax/domains/getdomain.md): Retrieve a specific domain for the specified service.
 - [DELETE /v3/projects/{projectId}/services/{serviceId}/domains/{domainName}](https://developers.sinch.com/docs/fax/api-reference/fax/domains/deletedomain.md): Delete a specific domain for the specified service.
 - [GET /v3/projects/{projectId}/services/{serviceId}/domains/{domainName}:verify](https://developers.sinch.com/docs/fax/api-reference/fax/domains/verifydomain.md): Verify a specific domain for the specified service.
## Templates

 - [GET /v3/projects/{projectId}/services/{serviceId}/domains/{domainName}/templates](https://developers.sinch.com/docs/fax/api-reference/fax/templates/listtemplates.md): List templates for a specific domain for the specified service.
 - [GET /v3/projects/{projectId}/services/{serviceId}/domains/{domainName}/templates/{templateName}](https://developers.sinch.com/docs/fax/api-reference/fax/templates/gettemplate.md): Retrieve a named template for a specific domain for the specified service.
 - [PUT /v3/projects/{projectId}/services/{serviceId}/domains/{domainName}/templates/{templateName}](https://developers.sinch.com/docs/fax/api-reference/fax/templates/updatetemplate.md): Update a template for a specific domain for the specified service.
## Cover pages

 - [When cover pages are added](https://developers.sinch.com/docs/fax/api-reference/fax/cover-pages/when-cover-pages-are-added.md): ### When cover pages are added
 - [Via dashboard](https://developers.sinch.com/docs/fax/api-reference/fax/cover-pages/via-dashboard.md): #### Via dashboard In the **Send Fax** tab you can select the option to ***select a cover page from a drop down***. When one is selected it will use that cover page on all outbound faxes. **Note:** If
 - [Via API](https://developers.sinch.com/docs/fax/api-reference/fax/cover-pages/via-api.md): #### Via API When sending a fax using the API, you can specify `coverPageId` and supply your own cover page data.
 - [How to create a cover page](https://developers.sinch.com/docs/fax/api-reference/fax/cover-pages/how-to-create-a-cover-page.md): ### How to create a cover page Create a PDF that fits your brand. It should have all the standard static content you need to stay compliant. Insert tags that will be replaced at run time by us for dyn
 - [Automatic fields](https://developers.sinch.com/docs/fax/api-reference/fax/cover-pages/automatic-fields.md): #### Automatic fields If we find the tags described in the table below, we will replace these tokens with fax metadata. | Tag | Content | Example | Description | | --- | --- | --- | --- | | {{from}}
 - [Specifying your own dynamic fields in API calls](https://developers.sinch.com/docs/fax/api-reference/fax/cover-pages/specifying-your-own-dynamic-fields-in-api-calls.md): ### Specifying your own dynamic fields in API calls When sending faxes via API you can add any tags you like with `{{}}`` syntax and set those in your app calls for cover page data. Example: If you wo
 - [POST /v3/projects/{projectId}/services/{id}/coverPages](https://developers.sinch.com/docs/fax/api-reference/fax/cover-pages/addcoverpage.md): Add a cover page to your service
 - [GET /v3/projects/{projectId}/services/{id}/coverPages](https://developers.sinch.com/docs/fax/api-reference/fax/cover-pages/listcoverpages.md): Lists the cover pages on a service. To retrieve the cover page file, use the [Get a cover page](https://developers.sinch.com/docs/fax/api-reference/fax/cover-pages/getcoverpage) operation to download
 - [DELETE /v3/projects/{projectId}/services/{id}/coverPages/{coverPageId}](https://developers.sinch.com/docs/fax/api-reference/fax/cover-pages/deletecoverpage.md): Remove delete a cover page from a service.
 - [GET /v3/projects/{projectId}/services/{id}/coverPages/{coverPageId}](https://developers.sinch.com/docs/fax/api-reference/fax/cover-pages/getcoverpage.md): Get a cover page by ID.
## Error Messages

 - [Fax Error Messages](https://developers.sinch.com/docs/fax/api-reference/fax/error-messages/fax-error-messages.md): ## Fax Error Messages When a fax fails, the fax and its callback return `errorType`, `errorCode` and `errorMessage`. Read `errorCode` together with `errorType`, because the same number can mean differ
 - [General Error Messages](https://developers.sinch.com/docs/fax/api-reference/fax/error-messages/general-error-messages.md): ## General Error Messages Request errors are returned as HTTP status codes. The following table lists the possible error codes and their meaning. The type will give you a general idea of why the opera
 - [Http Error Codes](https://developers.sinch.com/docs/fax/api-reference/fax/error-messages/http-error-codes.md): ## Http Error Codes
 - [400 - Bad Request](https://developers.sinch.com/docs/fax/api-reference/fax/error-messages/400-bad-request.md): ### 400 - Bad Request ```json { "code": "400", "error": "Bad Request", "message": " The request could not be understood by the server due to malformed syntax. The client SHOULD NOT repeat t
 - [401 - Unauthorized](https://developers.sinch.com/docs/fax/api-reference/fax/error-messages/401-unauthorized.md): ### 401 - Unauthorized Empty body, or you have the wrong API key, secret, or project.
 - [402 - Payment required](https://developers.sinch.com/docs/fax/api-reference/fax/error-messages/402-payment-required.md): ### 402 - Payment required ```json { "code": "402", "error": "Payment required", "message": "You have reached 0 balance on your account please make a payment." } ```
 - [404 - Not found](https://developers.sinch.com/docs/fax/api-reference/fax/error-messages/404-not-found.md): ### 404 - Not found ```json { "code": "404", "error": "Not found", "message": "The resource is not found, not available, or does not exist." } ```
 - [422 - Unprocessable Content (Invalid parameters)](https://developers.sinch.com/docs/fax/api-reference/fax/error-messages/422-unprocessable-content-(invalid-parameters).md): ### 422 - Unprocessable Content (Invalid parameters) ```json { "code": "422", "error": "Invalid parameters", "message": "The request could not be understood by the server due to malformed synta
 - [429 Rate limit exceeded](https://developers.sinch.com/docs/fax/api-reference/fax/error-messages/429-rate-limit-exceeded.md): ### 429 Rate limit exceeded Rate limit exceeded, please back off and try again later. If you need higher rate please contact support.
 - [500 - Internal Server Error](https://developers.sinch.com/docs/fax/api-reference/fax/error-messages/500-internal-server-error.md): ### 500 - Internal Server Error Probably no body, but if there is a body it will look like this: ```json { "code": "500", "error": "Internal service error", "message": "Most likely a temporary
 - [800 - URL Connection Error](https://developers.sinch.com/docs/fax/api-reference/fax/error-messages/800-url-connection-error.md): ### 800 - URL Connection Error This non-http code will be used when there is an issue connecting to the designated callback URL. The response will look like this: ```json { "error": "Could not conn
 - [Error object](https://developers.sinch.com/docs/fax/api-reference/fax/error-messages/error-object.md): ## Error object Please note that the response code is probably the most important part of the response, but the error object will contain more information about the error. Not all errors return this o
 - [Older faxes](https://developers.sinch.com/docs/fax/api-reference/fax/error-messages/older-faxes.md): ## Older faxes Faxes created before October 26, 2026 may return the following legacy codes instead of the ones above.
 - [CALL_ERROR](https://developers.sinch.com/docs/fax/api-reference/fax/error-messages/call_error.md): ### CALL_ERROR | Code | Description | | --- | --- | | 11 | The call dropped prematurely | | 15 | Congestion | | 16 | Ring Timeout | | 17 | Busy | | 19 | Immediate Hangup | | 30 | No answer from a fax
 - [FAX_ERROR](https://developers.sinch.com/docs/fax/api-reference/fax/error-messages/fax_error.md): ### FAX_ERROR | Code | Description | | --- | --- | | 44 | Telephony Error | | 46 | Insufficient funds to send fax and not able to auto recharge; There was a problem charging your credit card. Please
## Services

 - [Dashboard](https://developers.sinch.com/docs/fax/api-reference/fax/services/dashboard.md): ## Dashboard You can manage all your fax services and their settings via the [Dashboard](https://dashboard.sinch.com/fax/services).
 - [Sending a test fax](https://developers.sinch.com/docs/fax/api-reference/fax/services/sending-a-test-fax.md): ## Sending a test fax To send a TEST Inbound fax event in the Dashboard, enter the `IncomingWebhookUrl` on the Incoming tab and click **Save**. Then click the **SEND TEST REQUEST** button. This will
 - [POST /v3/projects/{projectId}/services](https://developers.sinch.com/docs/fax/api-reference/fax/services/createservice.md): Creates a new service that you can use to set default configuration values.
 - [GET /v3/projects/{projectId}/services](https://developers.sinch.com/docs/fax/api-reference/fax/services/listservices.md): Get a list of services for a project.
 - [GET /v3/projects/{projectId}/services/{id}](https://developers.sinch.com/docs/fax/api-reference/fax/services/getservice.md): Get a service resource.
 - [PATCH /v3/projects/{projectId}/services/{id}](https://developers.sinch.com/docs/fax/api-reference/fax/services/updateservice.md): Update settings on the service.
 - [DELETE /v3/projects/{projectId}/services/{id}](https://developers.sinch.com/docs/fax/api-reference/fax/services/removeservice.md): Removes a service from your project.
 - [GET /v3/projects/{projectId}/services/{id}/numbers](https://developers.sinch.com/docs/fax/api-reference/fax/services/listnumbersforservice.md): List numbers for a service.
 - [PATCH /v3/projects/{projectId}/services/{id}/numbers/{phoneNumber}/suspend](https://developers.sinch.com/docs/fax/api-reference/fax/services/suspendnumber.md): Suspends a number assigned to the specified service. You can include a note as to the reason of the suspension.
