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/

or, you can also specify what location you want to call by prefixing the above global URL with one of the region codes in the table below:

RegionURL
US East Coastuse1.fax.api.sinch.com
Europeeu1.fax.api.sinch.com
South Americasae1.fax.api.sinch.com
South East Asia 1apse1.fax.api.sinch.com
South East Asia 2apse2.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.

OperationsWebhooks

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

Setting up webhooks

Depending on the type of webhook, you can configure the callback URLs in a few ways:

Incoming fax notification:

Fax completed notification:

  • By including the callbackUrl property in the request body when you send a fax via the /faxes endpoint.

Retries

If a webhook fails, we will automatically retry sending the fax up to 16 times. There will be a back off before each retry, which increases as follows:

Retry numberBack off
15 minutes
210 minutes
320 minutes
430 minutes
5-166 hours

Request

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 the fax. You set the callback URL for incoming fax events on the service, either through the dashboard or using the service API.

Example payloads

Multipart/form-data request payloads are encoded as forms with a content type of JSON and the actual fax content as a 'file' application/pdf attachment.

Application/json request payloads are a JSON object with the file encoded as a base64 string as part of the JSON object.

Security
BasicAuth
Body
eventstring

The value is always INCOMING_FAX for this event.

Default "INCOMING_FAX"
Enum ValueDescription
INCOMING_FAX

A webhook event triggered by an fax is incoming.

FAX_COMPLETED

A webhook event triggered by a fax that has successfully completed.

filestring(binary)binary

The fax content as a PDF attachment to the body

eventTimestring(date-time)

Time of the event.

faxobject(Fax)
{
  "event": "INCOMING_FAX",
  "eventTime": "2021-11-01T23:25:67Z",
  "fax": {
    "id": "01HDFHACK1YN7CCDYRA6ZRMA8Z",
    "direction": "INBOUND",
    "from": "+14155552222",
    "to": "+14155553333",
    "numberOfPages": 1,
    "status": "COMPLETED",
    "price": {
      "amount": "0.00",
      "currencyCode": "USD"
    },
    "createTime": "2021-11-01T23:25:67Z",
    "completedTime": "2021-11-01T23:25:67Z",
    "projectId": "YOUR_PROJECT_ID",
    "serviceId": "YOUR_SERVICE_ID"
  },
  "file": "{application/pdf}"
}

Responses

Returns a 200 OK response if the webhook was received successfully.

Request

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 want the callback sent when you make a send fax request.

Security
BasicAuth
Body
eventstring

Always fax completed for this event.

Default "FAX_COMPLETED"
Enum ValueDescription
INCOMING_FAX

A webhook event triggered by an fax is incoming.

FAX_COMPLETED

A webhook event triggered by a fax that has successfully completed.

filestring(binary)binary

The fax content as pdf attachment to the body

eventTimestring(date-time)

Time of the event.

faxobject(Fax)
{
  "event": "FAX_COMPLETED",
  "eventTime": "2021-11-01T23:25:67Z",
  "fax": {
    "id": "01HDFHACK1YN7CCDYRA6ZRMA8Z",
    "direction": "INBOUND",
    "from": "+14155552222",
    "to": "+14155553333",
    "numberOfPages": 1,
    "status": "COMPLETED",
    "price": {
      "amount": "0.07",
      "currencyCode": "USD"
    },
    "createTime": "2021-11-01T23:25:67Z",
    "completedTime": "2021-11-01T23:25:67Z",
    "callbackUrl": "https://www.my-website.com/callback",
    "callbackUrlContentType": "multipart/form-data",
    "imageConversionMethod": "HALFTONE",
    "projectId": "YOUR_PROJECT_ID",
    "serviceId": "YOUR_SERVICE_ID"
  },
  "file": "{application/pdf}"
}

Responses

Returns a 200 OK response if the webhook was received successfully.

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

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