Webhooks allow Phaxio to update you 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.
Specifying Webhook URLs
The first thing we need to send you a webhook is a destination URL. This should be a valid URI with a
mailto scheme that points to a destination that you control. Examples of valid webhook URLs are
There are three places where you can specify URLs:
- For sent and received faxes, you can set global webhook URLs on your webhook settings page. These apply to all faxes unless superceded by a more specific URL.
- For received faxes, you can specify webhook URLs for particular numbers in your account on the phone numbers page.
- For sent faxes, you can specify a webhook URL using the
callback_urlparameter in your send fax request.
Specifying a Webhook Version
Webhooks are versioned to match the API, and you can update your webhook version on the webhook settings page. This document applies to v2.1 webhooks.
Enabling Inflight Webhooks
Currently, Phaxio supports two categories of webhooks: postflight and inflight. Postflight webhooks are triggered when a fax completes, regardless of success. Inflight webhooks are triggered by events during the transmission of a fax, such as the transfer of individual pages.
Inflight webhooks are disabled by default, but can be enabled on the webhook settings page.
Email webhooks are normal HTML emails containing information about the fax. HTTP webhooks are multipart/form-data POST requests, and should be processed like form submissions. See the documentation for send fax webhooks and receive fax webhooks for more specific information.
On the webhook settings page, you can generate a webhook token. If present, Phaxio will use this token to generate a signature for the request. In your application, you can then verify the request using the token, as documented on the Verifying Webhook Requests page.
If a webhook fails, we will automatically retry up to 16 times. There will be a backoff before each retry, which increases as follows: