The Sinch Fax API uses webhooks to tell your application about incoming faxes and about outbound faxes that have finished. This article answers the most common questions. For full details, see Notifications in the API reference.
Where do I set my webhook URL?
- Incoming faxes: on your fax service, in the Sinch Build Dashboard or through the Fax API.
- Completed outbound faxes: in the callbackUrl field of each send request.
Can different numbers use different webhooks?
Yes. The incoming fax webhook belongs to the fax service, so assign the numbers to separate services and give each service its own URL. See Projects and services.
What IP addresses should I allow?
Webhooks are sent from these addresses:
- 34.232.249.173
- 44.226.9.173
How do I check that a webhook is really from Sinch?
Add a username and password to your webhook URL, then check them on your server:
https://username:password@www.yourwebhookwebsite.com
We send them as a Basic authentication header. Webhook signatures are not currently supported. When you view a webhook URL later, the credentials are masked, and they cannot be retrieved through the API.
What format are webhooks sent in?
The default is multipart/form-data, with the fax file as an attachment. For JSON, set callbackUrlContentType to application/json on the send request, or set the webhook content type on your service for incoming faxes.
What happens if my server does not respond?
Your server should return a 200 OK. If a webhook fails, it is retried up to 16 times:
| 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 about 3 days |
Why am I getting webhook failure emails?
The email means we could not deliver a webhook to your URL. The fax itself may have completed. Check that your URL is reachable and returns a 200 OK.
Contact Sinch Support, with your Project ID, if you need to:
- Stop the retries for a specific fax. Include the fax ID.
- Change the address these emails are sent to.
Comments
0 comments
Please sign in to leave a comment.