Documentation
Send faxes with agent-safe defaults.
AgentFax exposes a stable JSON API for fax delivery. Live Telnyx sending currently accepts `media_url` or `media_name`; sandbox mode also accepts generated text and HTML for validation workflows.
Checkout verification
Your production API key
Store this key now. AgentFax only returns it during Checkout activation.
Authentication
Use bearer API keys. Production keys are returned once and stored hashed.
Authorization: Bearer afx_live_...
Send a Fax
POST /v1/faxes
Content-Type: application/json
Idempotency-Key: invoice-123-v1
{
"to": "+13125550123",
"media_url": "https://example.com/invoice-123.pdf",
"client_reference": "invoice-123",
"dry_run": false
}
Idempotency
Pass `Idempotency-Key` on every send attempt. If the same account repeats the same key, AgentFax returns the original fax record instead of transmitting a second fax.
Webhooks
Provider delivery events are normalized into AgentFax events. Register account-level webhook endpoints with `POST /v1/webhooks`, or pass a one-off `webhook_url` on an individual fax.
{
"type": "fax.delivered",
"fax_id": "fax_...",
"status": "delivered",
"created_at": "2026-07-03T14:30:00.000Z"
}
Deliveries include `AgentFax-Event-Id`, `AgentFax-Timestamp`, and `AgentFax-Signature` headers. Verify the signature with the signing secret returned when the webhook endpoint is created.
If a send request includes a one-off `webhook_url`, the fax response includes `webhook_signing_secret` for that per-fax callback path.
OpenAPI and LLM Docs
The Worker serves `/openapi.json`, `/llms.txt`, and `/llms-full.txt` so agents can discover the API without scraping a marketing page.
Billing
`POST /billing/onboarding` creates a pending account and subscription Checkout URL. After the customer returns with `session_id`, call `POST /billing/claim` once with the one-time `claim_token` returned by onboarding. The claim verifies Checkout and returns the first API key. Authenticated accounts can call `POST /billing/portal` after Stripe customer linkage to manage payment methods and subscription state.
POST /billing/onboarding
{
"name": "Acme Ops",
"email": "ops@example.com"
}
POST /billing/claim
{
"checkout_session_id": "cs_live_...",
"claim_token": "afx_claim_..."
}