Skip to content

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.

Note:

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 or Oauth2

Global URL

Sinch has a global server that will route your call to the appropriate geography region automatically:

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

In general we retain fax logs and media for 13 months and you can access that via the API.

Errors & statuses

Find error codes and explanations here.

Webhooks

You can configure your service to use webhooks to send a request to you when faxes arrive or complete on your account.

Download OpenAPI description
Overview
Languages
Servers
v3.0 of the Fax API
https://fax.api.sinch.com/v3/projects/{projectId}

Faxes

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.

Operations
Webhooks

Notifications

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.

Webhooks

Fax to Email

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.

Operations

Cover pages

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.

Operations

When cover pages are added

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 you are using Fax to Email, this is currently the only way to add a cover page to your faxes.

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

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 dynamic content.

Automatic fields

If we find the tags described in the table below, we will replace these tokens with fax metadata.

TagContentExampleDescription
{{from}}string+15557897890Your Sinch number that you used to send the fax.
{{to}}string+15551231234The number to which you are sending the fax.
{{date}}date2/4/2025The date when the fax was sent.
{{pageCount}}number52The total number of pages to be transmitted.

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 would like to add the recipient's name and your own message on the cover page:

/// in your template pdf
Fax to : {{to_name}}
{{my_custom_message}}

{
  ///other fax fields removed for clarity
  coverPageData: {
    "to_name": "Dr. John Smith",
    "my_custom_message": "I know you are busy please take on this patient"
    }
}

Add cover page

Request

Add a cover page to your service

Security
BasicAuth or OAuth2
Path
idstringrequired

the serviceId

Bodyapplication/json
fileobjectrequired

A PDF Cover encoded as base64

file.​fileContentstring(base64)base64required

A PDF Cover encoded as base64

file.​fileTypestringrequired

For now only PDF is supported.

Default "PDF"
ValueDescription
PDF

A PDF file.

nameanyrequired

The friendly name of the cover page.

Example: "Acme Company cover page"
curl -i -X POST \
  -u <username>:<password> \
  'https://fax.api.sinch.com/v3/projects/YOUR_project_id/services/{id}/coverPages' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Acme Company cover page",
    "file": {
      "fileContent": "string",
      "fileType": "PDF"
    }
  }'

Responses

The added coverpage, or an Error

Bodyapplication/json
fileobjectrequired

A PDF Cover encoded as base64

file.​fileContentstring(base64)base64required

A PDF Cover encoded as base64

file.​fileTypestringrequired

For now only PDF is supported.

Default "PDF"
ValueDescription
PDF

A PDF file.

nameanyrequired

The friendly name of the cover page.

Example: "Acme Company cover page"
idstring(ulid)read-only

ID of the cover page

projectIdstringread-only

The Id of the project associated with the call.

Example: "ae00f005-e392-44dc-b3f5-a657a2684dg3"
serviceIdstringread-only

ID of the fax service used.

Example: "01GVRB50KEQFFE1SGMPFRNBG6J"
createdTimestring(date-time)read-only

The date and time the cover page was created.

updatedTimestring(date-time)read-only

The date and time the cover page was updated.

Response
application/json
{ "id": "string", "name": "Acme Company cover page", "file": { "fileContent": "string", "fileType": "PDF" }, "projectId": "ae00f005-e392-44dc-b3f5-a657a2684dg3", "serviceId": "01GVRB50KEQFFE1SGMPFRNBG6J", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z" }

List cover pages

Request

List all cover page to a service

Security
BasicAuth or OAuth2
Path
idstringrequired

the serviceId

curl -i -X GET \
  -u <username>:<password> \
  'https://fax.api.sinch.com/v3/projects/YOUR_project_id/services/{id}/coverPages'

Responses

List of coverpages Error

Bodyapplication/json
coverPagesArray of objects(CoverPage)

List of cover pages

pageintegerread-only

Current page

totalPagesintegerread-only

Total number of pages.

pageSizeintegerread-only

Number of items per page.

totalItemsinteger(int32)read-only

Total size of the result.

Response
application/json
{ "coverPages": [ {} ], "page": 0, "totalPages": 0, "pageSize": 0, "totalItems": 0 }

Delete a cover page

Request

Remove delete a cover page from a service.

Security
BasicAuth or OAuth2
Path
idstringrequired

The serviceId containing the cover page you want to work with.

coverPageIdstringrequired

The coverPageId you want to work with.

curl -i -X DELETE \
  -u <username>:<password> \
  'https://fax.api.sinch.com/v3/projects/YOUR_project_id/services/{id}/coverPages/{coverPageId}'

Responses

The cover page was deleted.

Get a cover page

Request

Get a cover page by ID.

Security
BasicAuth or OAuth2
Path
idstringrequired

The serviceId containing the cover page you want to work with.

coverPageIdstringrequired

The coverPageId you want to work with.

curl -i -X GET \
  -u <username>:<password> \
  'https://fax.api.sinch.com/v3/projects/YOUR_project_id/services/{id}/coverPages/{coverPageId}'

Responses

The requested cover page, or an Error

Bodyapplication/json
fileobjectrequired

A PDF Cover encoded as base64

file.​fileContentstring(base64)base64required

A PDF Cover encoded as base64

file.​fileTypestringrequired

For now only PDF is supported.

Default "PDF"
ValueDescription
PDF

A PDF file.

nameanyrequired

The friendly name of the cover page.

Example: "Acme Company cover page"
idstring(ulid)read-only

ID of the cover page

projectIdstringread-only

The Id of the project associated with the call.

Example: "ae00f005-e392-44dc-b3f5-a657a2684dg3"
serviceIdstringread-only

ID of the fax service used.

Example: "01GVRB50KEQFFE1SGMPFRNBG6J"
createdTimestring(date-time)read-only

The date and time the cover page was created.

updatedTimestring(date-time)read-only

The date and time the cover page was updated.

Response
application/json
{ "id": "string", "name": "Acme Company cover page", "file": { "fileContent": "string", "fileType": "PDF" }, "projectId": "ae00f005-e392-44dc-b3f5-a657a2684dg3", "serviceId": "01GVRB50KEQFFE1SGMPFRNBG6J", "createdTime": "2019-08-24T14:15:22Z", "updatedTime": "2019-08-24T14:15:22Z" }

Error Messages

Services

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.

Operations