Sinch Notifications API

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. **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. ## 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/services) in the dashboard. - Using the [API when configuring your service](https://developers.sinch.com/docs/fax/api-reference/fax/services/createnotificationwebhook). This is required to receive notifications about incoming calls to your Sinch number. **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 delay before each retry, which increases as follows: | Retry number | Delay | Cumulative wait | | ------------ | ---------- | ------------ | | 1 | 5 minutes | 5 minutes | | 2 | 10 minutes | 15 minutes | | 3 | 20 minutes | 35 minutes | | 4 | 30 minutes | 1 hour 5 minutes | | 5-16 | 6 hours | up to ~3 days | ### 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) | | 44.226.9.173 | usw2 (West) |

Documentation

📖
Documentation
https://developers.sinch.com/docs/conversation
📖
APIReference
https://developers.sinch.com/docs/conversation/api-reference/template
📖
Documentation
https://developers.sinch.com/docs/est
📖
APIReference
https://developers.sinch.com/docs/est/api-reference/est
📖
Documentation
https://developers.sinch.com/docs/fax
📖
APIReference
https://developers.sinch.com/docs/fax/api-reference/fax
📖
Documentation
https://developers.sinch.com/docs/number-lookup-api-v2
📖
APIReference
https://developers.sinch.com/docs/number-lookup-api-v2/api-reference/number-lookup-v2
📖
Documentation
https://developers.sinch.com/docs/numbers
📖
APIReference
https://developers.sinch.com/docs/numbers/api-reference/imported-hosting
📖
APIReference
https://developers.sinch.com/docs/numbers/api-reference/numbers
📖
APIReference
https://developers.sinch.com/docs/numbers/api-reference/porting
📖
Documentation
https://developers.sinch.com/docs/provisioning-api
📖
APIReference
https://developers.sinch.com/docs/provisioning-api/api-reference/provisioning-api-1
📖
Documentation
https://developers.sinch.com/docs/verification
📖
APIReference
https://developers.sinch.com/docs/verification/api-reference/verification
📖
Documentation
https://developers.sinch.com/docs/voice-2.0
📖
APIReference
https://developers.sinch.com/docs/voice-2.0/api-reference/voice
📖
Documentation
https://developers.sinch.com/docs/10dlc-registration
📖
APIReference
https://developers.sinch.com/docs/10dlc-registration/api-reference/10dlc-registration
📖
Documentation
https://developers.sinch.com/docs/accesskeys
📖
APIReference
https://developers.sinch.com/docs/accesskeys/api-reference/oldaccesskeys
📖
APIReference
https://developers.sinch.com/docs/accesskeys/api-reference/accesskeys
📖
Documentation
https://developers.sinch.com/docs/campaigns
📖
APIReference
https://developers.sinch.com/docs/campaigns/api-reference/campaigns
📖
Documentation
https://developers.sinch.com/docs/chatlayer-analytics
📖
APIReference
https://developers.sinch.com/docs/chatlayer-analytics/api-reference/chatlayer-analytics
📖
Documentation
https://developers.sinch.com/docs/compliance-center
📖
APIReference
https://developers.sinch.com/docs/compliance-center/api-reference/compliance-brands
📖
Documentation
https://developers.sinch.com/docs/subprojects
📖
APIReference
https://developers.sinch.com/docs/subprojects/api-reference/subprojects

Specifications

Schemas & Data

📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-v2-template-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-v2-list-translations-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-v2-list-templates-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-call-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-sip-trunk-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-sip-endpoint-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-ip-range-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-access-control-list-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-number-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-fax-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-service-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-template-by-name-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-update-template-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-service-phone-number-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-cover-page-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-number-lookup-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-number-lookup-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-hosting-order-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-qualified-number-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-text-enable-numbers-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-hosting-order-number-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-imported-number-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-list-imported-numbers-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-active-number-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-rent-any-number-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-validate-address-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-number-order-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-create-number-order-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-registration-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-order-list-item-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-defaults-configuration-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-pagination-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-voice-configuration-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-order-document-base-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-port-in-order-group-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-whatsapp-account-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-whatsapp-sender-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-whatsapp-template-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-whatsapp-partial-template-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-webhook-webhook-input-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-webhook-update-webhook-input-dto-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-verification-report-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-batch-summary-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-session-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-call-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-service-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-validate-svaml-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-create-tcr-campaign-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-access-key-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-create-access-key-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-list-access-keys-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-create-access-key-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-update-access-key-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-campaign-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-carrier-order-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-note-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-list-campaign-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-campaign-attachment-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-create-campaign-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-get-flow-step-details-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-get-conversation-flow-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-funnel-step-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-funnel-step-filter-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-get-intents-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-list-event-definitions-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-brand-order-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-brand-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-attachment-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-import-brand-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-create-brand-request-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-callback-config-response-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-subproject-schema.json
📊
JSONSchema
https://raw.githubusercontent.com/api-evangelist/sinch/refs/heads/main/json-schema/sinch-list-subprojects-response-schema.json

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/sinch:sinch-notifications-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Discovery needs no key. Ratings and market analysis are Pro.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

sinch-notifications-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  version: '3.0'
  title: Fax Notifications API
  description: This document provides a detailed user guide and reference documentation on the Fax REST API.
  contact:
    name: Contact Fax API Team
    url: https://www.sinch.com/contact/
    email: faxteam@sinch.com
  license:
    url: https://www.sinch.com/toc
    name: MIT
servers:
- url: https://fax.api.sinch.com
  description: v3.0 of the Fax API
security:
- BasicAuth: []
- OAuth2: []
tags:
- name: Notifications
  description: Webhooks allow you to get updates in real-time about the status of your faxes.
paths: {}
webhooks:
  incomingFax:
    post:
      security:
      - WebhookBasicAuth: []
      operationId: incomingFaxEvent
      tags:
      - Notifications
      summary: Incoming fax event
      description: '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.'
      requestBody:
        content:
          multipart/form-data:
            schema:
              allOf:
              - type: object
                properties:
                  event:
                    type: string
                    description: The value is always `INCOMING_FAX` for this event.
                    enum:
                    - INCOMING_FAX
                    default: INCOMING_FAX
                  file:
                    $ref: '#/components/schemas/FileTypeMultiPart'
              - $ref: '#/components/schemas/GenericEvent'
            encoding:
              file:
                contentType: application/pdf
              fax:
                contentType: application/json
              event:
                contentType: application/json
            example:
              event: INCOMING_FAX
              eventTime: '2021-11-01T23:25:57Z'
              fax:
                id: 01HDFHACK1YN7CCDYRA6ZRMA8Z
                direction: INBOUND
                from: '+14155552222'
                to: '+14155553333'
                numberOfPages: 1
                status: COMPLETED
                price:
                  amount: '0.00'
                  currencyCode: USD
                createTime: '2021-11-01T23:25:57Z'
                completedTime: '2021-11-01T23:25:57Z'
                projectId: YOUR_PROJECT_ID
                serviceId: YOUR_SERVICE_ID
              file: '{application/pdf}'
          application/json:
            schema:
              type: object
              properties:
                event:
                  allOf:
                  - $ref: '#/components/schemas/WebhookEvents'
                  description: Always `INCOMING_FAX` for this event.
                  enum:
                  - INCOMING_FAX
                  default: INCOMING_FAX
                eventTime:
                  description: Time of the event.
                  type: string
                  format: date-time
                fax:
                  description: The incoming fax.
                  $ref: '#/components/schemas/Fax'
                file:
                  description: The base64 encoded file.
                  type: string
                  example: '{base64_encodedData}'
                fileType:
                  $ref: '#/components/schemas/FileTypeJson'
            example:
              event: INCOMING_FAX
              eventTime: '2021-11-01T23:25:57Z'
              fax:
                id: 01HDFHACK1YN7CCDYRA6ZRMA8Z
                direction: INBOUND
                from: '+14155552222'
                to: '+14155553333'
                numberOfPages: 1
                status: COMPLETED
                price:
                  amount: '0.00'
                  currencyCode: USD
                createTime: '2021-11-01T23:25:57Z'
                completedTime: '2021-11-01T23:25:57Z'
                projectId: YOUR_PROJECT_ID
                serviceId: YOUR_SERVICE_ID
              file: '{base64_encodedData}'
              fileType: PDF
      responses:
        '200':
          description: Returns a 200 OK response if the webhook was received successfully.
  faxCompleted:
    post:
      security:
      - WebhookBasicAuth: []
      summary: Fax completed
      description: 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.
      operationId: faxCompletedCallback
      tags:
      - Notifications
      requestBody:
        content:
          multipart/form-data:
            schema:
              allOf:
              - type: object
                properties:
                  event:
                    type: string
                    description: Always fax completed for this event.
                    enum:
                    - FAX_COMPLETED
                    default: FAX_COMPLETED
                  file:
                    description: The fax content as pdf attachment to the body
                    type: string
                    format: binary
                    contentMediaType: application/pdf
                    contentEncoding: binary
              - $ref: '#/components/schemas/GenericEvent'
            encoding:
              file:
                contentType: application/pdf
              fax:
                contentType: application/json
              event:
                contentType: application/json
            example:
              event: FAX_COMPLETED
              eventTime: '2021-11-01T23:25:57Z'
              fax:
                id: 01HDFHACK1YN7CCDYRA6ZRMA8Z
                direction: INBOUND
                from: '+14155552222'
                to: '+14155553333'
                numberOfPages: 1
                status: COMPLETED
                price:
                  amount: '0.07'
                  currencyCode: USD
                createTime: '2021-11-01T23:25:57Z'
                completedTime: '2021-11-01T23:25:57Z'
                callbackUrl: https://www.my-website.com/callback
                callbackUrlContentType: multipart/form-data
                imageConversionMethod: HALFTONE
                projectId: YOUR_PROJECT_ID
                serviceId: YOUR_SERVICE_ID
              file: '{application/pdf}'
          application/json:
            schema:
              type: object
              properties:
                event:
                  allOf:
                  - $ref: '#/components/schemas/WebhookEvents'
                  description: Always `FAX_COMPLETED` for this event.
                  enum:
                  - FAX_COMPLETED
                  default: FAX_COMPLETED
                eventTime:
                  description: Time of the event.
                  type: string
                  format: date-time
                fax:
                  description: The incoming fax.
                  $ref: '#/components/schemas/Fax'
                files:
                  type: array
                  items:
                    $ref: '#/components/schemas/FaxBase64File'
            example:
              event: FAX_COMPLETED
              eventTime: '2021-11-01T23:25:57Z'
              fax:
                id: 01HDFHACK1YN7CCDYRA6ZRMA8Z
                direction: INBOUND
                from: '+14155552222'
                to: '+14155553333'
                numberOfPages: 1
                status: COMPLETED
                price:
                  amount: '0.07'
                  currencyCode: USD
                createTime: '2021-11-01T23:25:57Z'
                completedTime: '2021-11-01T23:25:57Z'
                callbackUrl: https://www.my-website.com/callback
                callbackUrlContentType: application/json
                projectId: YOUR_PROJECT_ID
                serviceId: YOUR_SERVICE_ID
              files:
              - file: '{base64ecnodeddata}'
                fileType: PDF
      responses:
        '200':
          description: Returns a 200 OK response if the webhook was received successfully.
components:
  schemas:
    Resolution:
      type: string
      description: The resolution for the fax. If this is set at the service, this applies to all faxes sent using that service. If this is set on the fax, this will override the service setting.
      enum:
      - FINE
      - SUPERFINE
      x-enumDescriptions:
        FINE: Most commonly accepted fax resolution at 200 dpi.
        SUPERFINE: Higher but less commonly accepted fax resolution at 400 dpi. May be required when sending small text or detailed images.
    FaxId:
      type: string
      readOnly: true
      description: The id of a fax
      example: 01F3J0G1M4WQR6HGY6HCF6JA0K
    Money:
      description: This is where we need description to be overridden by `$ref:` description
      type: object
      readOnly: true
      properties:
        currencyCode:
          readOnly: true
          description: The 3-letter currency code defined in ISO 4217.
          type: string
          example: USD
        amount:
          readOnly: true
          description: The amount with 4 decimals and decimal delimiter `.`.
          type: string
          example: '0.0040'
    WebhookEvents:
      type: string
      enum:
      - INCOMING_FAX
      - FAX_COMPLETED
      x-enumDescriptions:
        INCOMING_FAX: A webhook event triggered by an fax is incoming.
        FAX_COMPLETED: A webhook event triggered by a fax that has successfully completed.
      description: The different events that can trigger a webhook
    FaxBase64File:
      type: object
      properties:
        file:
          type: string
          format: base64
          contentEncoding: base64
          description: When application/json Base64 encoded file content, this is only present when using application/json for request/response.
          example: '{base64-encoded content}'
        fileType:
          $ref: '#/components/schemas/FileTypeJson'
    Fax:
      type: object
      properties:
        id:
          readOnly: true
          allOf:
          - $ref: '#/components/schemas/FaxId'
        direction:
          allOf:
          - $ref: '#/components/schemas/FaxDirection'
          readOnly: true
        from:
          allOf:
          - $ref: '#/components/schemas/PhoneNumber'
          readOnly: false
          description: 'For `INBOUND` faxes, this is the number where the fax is sent from

            For `OUTBOUND` faxes, this is the Sinch number you want to have as sender'
        to:
          allOf:
          - $ref: '#/components/schemas/PhoneNumber'
          readOnly: false
          description: "For `INBOUND` faxes, this is the Sinch number someone sent the fax to.\nFor `OUTBOUND` faxes, this is the phone number you want to send a fax to.\n\nYou can add multiple numbers by adding them as an array. For example:\n\n  application/json\n\n  ```json\n  \"to\": [\"+14155552222\", \"+14155553333\"]\n  ```\n\n  multipart/form\n  ```json\n  to=+14155552222&to=+14155553333\n\n  ```"
        contentUrl:
          anyOf:
          - type: string
            format: url
            description: 'Single URL. Fetched documents must be one of the following file types: `.docx`, `html.`, `.jpg`, `.pdf`, `.png`, `.tif`, `.txt`.'
            example: https://example.com/fax.pdf
          - type: array
            items:
              type: string
              format: url
            description: 'Multiple URLs. Fetched documents must be one of the following file types: `.docx`, `html.`, `.jpg`, `.pdf`, `.png`, `.tif`, `.txt`.'
            example:
            - https://www.google.com
            - https://www.sinch.com
          format: URL
          description: 'Give us any URL on the Internet (including ones with basic authentication)

            At least one file or contentUrl parameter is required.

            Please note: If you are passing fax a secure URL (starting with https://), make sure that your SSL certificate (including your intermediate cert, if you have one) is installed properly, valid, and up-to-date.

            If the file parameter is specified as well, content from URLs will be rendered before content from files.


            You can add multiple URLs by adding them as an array them with a comma when posting as multipart/form-data


            For example: "https://developers.sinch.com/fax/fax.pdf, https://developers.sinch.com/" or if posting JSON `"contentUrl": ["https://developers.sinch.com/fax/fax.pdf", "https://developers.sinch.com/"]`'
          example: https://developers.sinch.com/fax/fax.pdf
        numberOfPages:
          type: integer
          readOnly: true
          description: The number of pages in the fax.
        status:
          $ref: '#/components/schemas/FaxStatus'
        price:
          description: The total price for this fax. This field is populated after the final fax price is calculated.
          allOf:
          - $ref: '#/components/schemas/Money'
          readOnly: true
        barCodes:
          description: The bar codes found in the fax. This field is populated when Sinch detects bar codes on incoming faxes.
          readOnly: true
          type: array
          items:
            $ref: '#/components/schemas/BarCode'
        createTime:
          readOnly: true
          type: string
          format: date-time
          description: A timestamp representing the time when the initial API call was made.
        completedTime:
          type: string
          format: date-time
          readOnly: true
          description: If the job is complete, this is a timestamp representing the time the job was completed.
        pagesSentSuccessfully:
          type: integer
          description: The number of pages successfully sent to the receiving side in the fax.
          readOnly: true
          example: 3
        headerText:
          description: Text that will be displayed at the top of each page of the fax. 50 characters maximum. Default header text is "-". Note that the header is not applied until the fax is transmitted, so it will not appear on fax PDFs or thumbnails.
          type: string
          maximum: 50
          default: ''
        headerPageNumbers:
          type: boolean
          description: If true, page numbers will be displayed in the header. Default is true.
          default: true
        headerTimeZone:
          type: string
          format: timezone
          description: A [TZ database name](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones) string specifying the timezone for the header timestamp.
          default: America/New_York
        retryDelaySeconds:
          description: The number of seconds to wait between retries if the fax is not yet completed.
          type: integer
          minimum: 30
          maximum: 300
          default: 60
        labels:
          x-version: 2
          description: You can use this to attach labels to your call that you can use in your BI solutions.
          allOf:
          - $ref: '#/components/schemas/Labels'
          example:
            customerId: '1234'
            customerName: John Doe
        callbackUrl:
          type: string
          description: 'The URL to which a callback will be sent when the fax is completed. The callback will be sent as a POST request with a JSON body. The callback will be sent to the URL specified in the `callbackUrl` parameter, if provided, otherwise it will be sent to the URL specified in the `callbackUrl` field of the Fax Service object.


            Note: If a callback URL uses basicauth credentials, when the callback URL is retrieved those credentials are masked. It is not possible to retrieve previously-set credentials through the API.'
          format: URL
          example: https://www.my-website.com/callback
        callbackUrlContentType:
          description: The content type of the callback.
          type: string
          default: multipart/form-data
          enum:
          - multipart/form-data
          - application/json
          x-enumDescriptions:
            multipart/form-data: The callback will be sent as a multipart/form-data request with files as attachments to the body.
            application/json: The callback will be sent as a JSON request with the files as base64 encoded strings in the JSON object.
        imageConversionMethod:
          $ref: '#/components/schemas/ImageConversionMethod'
        errorType:
          readOnly: true
          allOf:
          - $ref: '#/components/schemas/ErrorType'
        errorCode:
          readOnly: true
          type: integer
          description: One of the error numbers listed in the [Fax Error Messages section](https://developers.sinch.com/docs/fax/api-reference/fax/error-messages).
        errorMessage:
          readOnly: true
          type: string
          description: One of the error codes listed in the [Fax Error Messages section](https://developers.sinch.com/docs/fax/api-reference/fax/error-messages).
        maxRetries:
          readOnly: false
          type: integer
          description: '| The number of times the fax will be retired before cancel. Default value is set in your fax service.

            | The maximum number of retries is 5.'
          maximum: 5
          minimum: 0
        retryCount:
          readOnly: true
          type: integer
          description: The number of times the fax has been retried.
        hasFile:
          readOnly: true
          type: boolean
          description: Only shown on the fax result. This indicates if the content of the fax is stored with Sinch. (true or false)
        resolution:
          $ref: '#/components/schemas/Resolution'
        coverPageId:
          type: string
          description: The cover page id you want to use for the fax
        coverPageData:
          $ref: '#/components/schemas/CoverPageData'
        inProgressNotifications:
          type: boolean
          description: If set to `true`, you will receive a webhook notification for each page sent on an outbound fax.
          default: false
        fromCountry:
          readOnly: true
          type: string
          description: The country code in ISO 3166-1 alpha-2 format of the number sending the fax.
          example: US
        toCountry:
          readOnly: true
          type: string
          description: The country code in ISO 3166-1 alpha-2 format of the number receiving the fax.
          example: US
        projectId:
          readOnly: true
          x-version: 1
          allOf:
          - $ref: '#/components/schemas/ProjectId'
        serviceId:
          readOnly: false
          x-version: 1
          allOf:
          - $ref: '#/components/schemas/ServiceId'
    Labels:
      type: object
      title: label
      description: 'You can use this to attach labels to your call that you can use in your applications. It is a key value store.


        - `application/json` format: `"labels": {"label1":"value1"}`

        - `multipart/form-data` format: `labels[label1] = value1`'
      additionalProperties:
        type: string
        x-additionalPropertiesName: labelKey
      example:
        use-case: fraudPrevention
        costCenter: sales
    ServiceId:
      x-PII: false
      x-v1: true
      readOnly: true
      type: string
      example: 01GVRB50KEQFFE1SGMPFRNBG6J
      description: ID of the fax service used.
    CoverPageData:
      type: object
      title: Cover page data
      description: 'You can use this to specify custom data for your cover page that will be sent as part of the fax. It is a key value store. Read more about how to use this [here](https://developers.sinch.com/docs/fax/api-reference/fax/cover-pages/). All keys used must be lower case.


        - `application/json` format: `"coverPageData": {"customfield1":"customdata1"}`

        - `multipart/form-data` format: `coverPageData[customfield1] = customdata1`'
      additionalProperties:
        type: string
        x-additionalPropertiesName: coverPageKey
      example:
        toName: Acme Corp
    GenericEvent:
      type: object
      properties:
        event:
          $ref: '#/components/schemas/WebhookEvents'
        eventTime:
          description: Time of the event.
          type: string
          format: date-time
        fax:
          $ref: '#/components/schemas/Fax'
    ProjectId:
      type: string
      x-PII: false
      x-v1: false
      description: The `Id` of the project associated with the call.
      x-Internal: to support future account keys
      readOnly: true
      example: ae00f005-e392-44dc-b3f5-a657a2684dg3
    ErrorType:
      readOnly: true
      description: Error type
      type: string
      enum:
      - DOCUMENT_CONVERSION_ERROR
      - CALL_ERROR
      - FAX_ERROR
      - FATAL_ERROR
      - GENERAL_ERROR
      x-enumDescriptions:
        DOCUMENT_CONVERSION_ERROR: A documentation conversion error.
        CALL_ERROR: A call error.
        FAX_ERROR: A fax error.
        FATAL_ERROR: A fatal error.
        GENERAL_ERROR: A general error.
    BarCode:
      type: object
      description: Sinch will scan all pages of all incoming faxes for Code-128 and DataMatrix bar codes and include this information in webhook requests and via the API.
      properties:
        type:
          type: string
          description: The type of barcode found.
          enum:
          - CODE_128
          - DATA_MATRIX
          x-enumDescriptions:
            CODE_128: Code-128 barcode.
            DATA_MATRIX: DataMatrix barcode.
        page:
          description: The page number on which the barcode was found.
          type: integer
        value:
          description: The  information of the barcode.
          type: string
    FileTypeJson:
      type: string
      description: When request/response is application/json and file is part of payload. This is the file type of the file.
      enum:
      - DOCX
      - PDF
      - TIF
      - JPG
      - TXT
      - HTML
      - PNG
      x-enumDescriptions:
        DOCX: Microsoft Word
        PDF: PDF
        TIF: TIFF
        JPG: JPEG
        TXT: Text
        HTML: HTML
        PNG: PNG
    FaxStatus:
      type: string
      description: The status of the fax
      readOnly: true
      enum:
      - QUEUED
      - IN_PROGRESS
      - COMPLETED
      - FAILURE
      x-enumDescriptions:
        QUEUED: The operation is currently in a queue on a server and should be executed very soon.
        IN_PROGRESS: The fax is currently being sent (OUTBOUND) or received (INBOUND).
        COMPLETED: The fax operation succeeded. Everything went as normally planned.
        FAILURE: The fax operation failed. Details of the error can be found in the error_code field. For OUTBOUND fax, this means that NONE of the recipients received the fax.
    FaxDirection:
      type: string
      description: The direction of the fax.
      readOnly: true
      enum:
      - OUTBOUND
      - INBOUND
      x-enumDescriptions:
        OUTBOUND: The fax was sent by you via the API.
        INBOUND: The fax was received on one of your numbers.
      example: OUTBOUND
    PhoneNumber:
      x-PII: true
      x-v1: true
      type: string
      format: phoneNumber
      description: A phone number in [E.164](https://community.sinch.com/t5/Glossary/E-164/ta-p/7537) format, including the leading '+'.
      example: '+15551235656'
    FileTypeMultiPart:
      description: When request/response is multipart/form-data and file is part of payload. This is the file type of the file.
      enum:
      - application/docx
      - application/pdf
      - application/tif
      - application/jpg
      - application/txt
      - application/html
      - application/png
      x-enumDescriptions:
        application/docx: Microsoft Word
        application/pdf: PDF
        application/tif: TIFF
        application/jpg: JPEG
        application/txt: Text
        application/html: HTML
        application/png: PNG
    ImageConversionMethod:
      type: string
      description: Determines how documents are converted to black and white on OUTBOUND faxes only.  Image conversion is not done on INBOUND faxes. Defaults to value selected on Fax Service object.
      enum:
      - HALFTONE
      - MONOCHROME
      x-enumDescriptions:
        HALFTONE: Converts the image to halftone.
        MONOCHROME: Converts the image to monochrome.
      default: HALFTONE
  securitySchemes:
    WebhookBasicAuth:
      type: http
      scheme: basic
      description: '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`'
    BasicAuth:
      type: http
      scheme: basic
      description: The user name and password is your keyId and key secret from the [Access keys sections](https://dashboard.sinch.com/settings/access-keys)
    OAuth2:
      type: oauth2
      description: The user name and password is your key id and key secret from the [Access keys sections](https://dashboard.sinch.com/settings/access-keys)
      flows:
        clientCredentials:
          tokenUrl: https://auth.sinch.com/oauth2/token
          scopes: {}