Fax status lifecycle
Every fax moves through a predictable set of states:| Status | Meaning | Terminal? |
|---|---|---|
queued | Fax accepted and waiting for processing | No |
submitted | Sent to the carrier for transmission | No |
in_progress | Carrier is actively transmitting pages | No |
delivered | Carrier confirmed receipt. Credits captured. | Yes |
failed | All retry attempts exhausted. Credits released (hold refunded). | Yes |
delivered or failed, the status will not change again.
Approach 1: Poll the API
Polling works well for one-off scripts, debugging, and simple integrations where you want to check status on your own schedule. CallGET /fax/{id} to retrieve the full fax record, including status, error_code, error_message, and timestamps.
error_code and error_message:
Poll loop example
If you need to wait for a terminal status, poll with a delay between requests. Fax delivery typically takes 30 seconds to a few minutes depending on page count and carrier conditions.Approach 2: Webhooks
Webhooks push status updates to your server the moment they happen. Use them for production systems that need real-time delivery confirmation without polling overhead.Set up a webhook endpoint
Register your endpoint and subscribe to the events you care about:Events for delivery tracking
These are the events relevant to tracking a fax through its lifecycle:| Event | Fires when |
|---|---|
fax.queued | Fax accepted and placed in the processing queue |
fax.sending | Delivery attempt against the destination begins. Fires once per attempt. |
fax.delivered | Carrier confirmed delivery. Terminal. |
fax.failed | All attempts exhausted or a terminal error code returned. Terminal. |
fax.delivered and fax.failed is enough. Add fax.sending if you want per-attempt visibility into transient failures before the final outcome.
Webhook payload
Every event payload includes a uniqueid for deduplication and created for ordering:
id you process and skip duplicates. Events may arrive out of order, so use the created timestamp and status to determine the latest state.
Per-fax webhook override
Need delivery updates for a specific fax sent to a different URL? Passwebhook_url when you send the fax:
Retry behavior
mintfax retries failed delivery attempts automatically. By default, each fax gets up to 3 attempts (configurable from 1 to 5 via fax settings). Here is how retries work:- The carrier reports a failure (busy line, no answer, etc.).
- If the error is classified as retryable and attempts remain, mintfax schedules the next attempt with a backoff delay.
- When the next attempt starts, mintfax fires
fax.sendingagain. Each attempt fires its ownfax.sending. - If every attempt is exhausted or a terminal error code is returned, mintfax fires
fax.failedand releases the credit hold.
retries_remaining field on the fax record tells you how many attempts are left. When you poll a fax that is mid-retry, you will see a non-terminal status with a decremented retries_remaining value:
failed.
Choosing an approach
| Consideration | Polling | Webhooks |
|---|---|---|
| Setup complexity | None - just call GET /fax/{id} | Requires a public HTTPS endpoint |
| Latency | Depends on poll interval | Near real-time |
| Scale | Fine for low volume | Better at high volume |
| Infrastructure | No server required | Needs a reachable server |
| Best for | Scripts, debugging, batch checks | Production apps, real-time dashboards |
Test in the sandbox
Use sandbox magic numbers to exercise every delivery outcome without sending real faxes:| Number | Outcome |
|---|---|
+15005550001 | Always delivers |
+15005550002 | Always busy |
+15005550005 | Permanent failure |
+15005550001 with a sandbox key (mfx_test_...) to confirm your polling loop or webhook handler processes a delivered status. Send to +15005550005 to confirm your integration handles failed. See Sandbox for the full magic number matrix.
What to do next
- Webhooks - endpoint setup, delivery behavior, and signature overview.
- Webhook signing - verify that payloads came from mintfax with HMAC-SHA256.
- Events - full list of event types and payload schemas.
- Sandbox - magic numbers and simulated failure scenarios.
- Errors - error codes, HTTP statuses, and recommended actions.