Skip to main content

Fax API

List and track fax (MMS/T.38) transmissions on Telnyx-backed fax numbers (sending flows through the Messaging API) Base path: /api/v1/fax Endpoint count: 3

title: “Errors worth branching on” description: “Per-endpoint failure templates matching the envelope — what actually fires, what to retry, what to surface to the operator.”

Errors worth branching on

These five failures cover the fax send (POST /api/v1/fax), on every send from the document viewer. Each block below is a full { error, meta } envelope as the API returns it, and the matrix at the bottom answers retry vs surface for the same five classes. For the platform-wide decision table these branches plug into, see the error handling guide.

401 — Unauthorized

A 401 on this page is the bearer key failing before the route ran — it never means the resource is wrong. Rotate the key or re-mint the scoped token; retrying the same request changes nothing.

403 — Forbidden

A 403 means the key authenticated but the operation is gated by scope — check the key’s scopes on the developer page; a 403 is never a data-not-found shape.

422 — Schema

A 422 means the payload did not match the request schema — branch on error.details.field and resend with an https:// media_url to a PDF or TIFF instead of blind-retrying the same body.

429 — Rate

The Retry-After header and error.details.retry_after are both set on every 429 — resend the SAME request after the lower of the two.

402 — Feature gate

Surface provisioning — the retry succeeds only once the number is fax-capable.

60-second retry matrix


List fax message history

GET /api/v1/fax
Cursor-paginated history of fax (MMS/T.38) transmissions for the authenticated tenant. Returns the standard paginated envelope; pass cursor from a prior page’s meta.pagination.cursor to page forward.
string
Opaque pagination cursor from a prior page’s meta.pagination.cursor. Omit for the first page.
integer
Page size (1–200, default 25).
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Get fax message details

GET /api/v1/fax/{id}
Fetch a single fax (MMS/T.38) message by its ID, scoped to the authenticated tenant. Returns 404 when no fax message with the given ID exists for the tenant.
string
required
Fax message ID (msg_…).
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.

Get fax delivery status

GET /api/v1/fax/{id}/status
Retrieve the current delivery status of a fax (MMS/T.38) transmission by its message ID. Resolves the provider-side external_id first, then returns the live provider status (cached for ~10s per tenant). Returns 404 when no fax message exists for the tenant OR the transmission has not yet been dispatched (no external_id).
string
required
Fax message ID (msg_…).
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.