FaxTerra

Quickstart

Send your first fax through the API in five steps. The samples read the token or API key from FAXTERRA_TOKEN.

1. Sign in

Ask for a code for the person's email address with POST /auth/email-code. They read it from the email. On an account with the HIPAA add-on, apps and AI assistants can't sign in: no code is sent, and the email says why.

curl -X POST "https://faxterra.com/api/v1/auth/email-code" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "jamie@halvenridgefamilymed.example",
    "client": "Practice assistant"
  }'

Then send the code to POST /auth/token with acceptTerms, sent only once the person has seen the Terms and agreed. The answer is the token for every request after this. The account's own software can use an API key instead, made by an owner or admin with developer access.

curl -X POST "https://faxterra.com/api/v1/auth/token" \
  -H "Content-Type: application/json" \
  -d '{
    "email": "jamie@halvenridgefamilymed.example",
    "code": "482915",
    "acceptTerms": "2026-11-25"
  }'

2. Upload

Ask for an upload URL with POST /uploads, PUT the file to it with the headers the answer gives, then finalize it with POST /uploads/{fileKey}/finalize, which counts its pages and refuses a file that can't be faxed. You can also fetch a document from a link with POST /uploads/from-url, or send text instead of a file.

curl -X POST "https://faxterra.com/api/v1/uploads" \
  -H "Authorization: Bearer $FAXTERRA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "fileName": "invoice-1042.pdf",
    "contentType": "application/pdf",
    "fileSize": 48213
  }'
curl -X PUT "$UPLOAD_URL" \
  -H "Content-Type: application/pdf" \
  --data-binary @invoice-1042.pdf
curl -X POST "https://faxterra.com/api/v1/uploads/3f2504e0-4f89-41d3-9a0c-0305e82c3301.pdf/finalize" \
  -H "Authorization: Bearer $FAXTERRA_TOKEN"

3. Quote

POST /faxes/quote answers whether the fax can go, its pages, what it costs, and any warnings to tell the person. It sends nothing.

curl -X POST "https://faxterra.com/api/v1/faxes/quote" \
  -H "Authorization: Bearer $FAXTERRA_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+12025550123",
    "toName": "Billing office",
    "files": [
      {
        "fileKey": "3f2504e0-4f89-41d3-9a0c-0305e82c3301.pdf"
      }
    ],
    "cover": {
      "fromName": "Owen Pruitt",
      "message": "Invoice 1042 attached."
    },
    "reference": "invoice-1042",
    "recipientConsent": true
  }'

4. Send

POST /faxes with an Idempotency-Key, and recipientConsent: true only when the person states the recipient agreed to receive it and its content is lawful. Repeating an accepted send with the same key within 24 hours gets its answer back, and the fax goes at most once.

curl -X POST "https://faxterra.com/api/v1/faxes" \
  -H "Authorization: Bearer $FAXTERRA_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)" \
  -H "Content-Type: application/json" \
  -d '{
    "to": "+12025550123",
    "toName": "Billing office",
    "files": [
      {
        "fileKey": "3f2504e0-4f89-41d3-9a0c-0305e82c3301.pdf"
      }
    ],
    "cover": {
      "fromName": "Owen Pruitt",
      "message": "Invoice 1042 attached."
    },
    "reference": "invoice-1042",
    "recipientConsent": true
  }'

5. Follow

Check it with GET /faxes/{id}, no sooner than its nextCheckAfter, or get a webhook when it ends.

curl "https://faxterra.com/api/v1/faxes/6fa459ea-ee8a-4ca4-894e-db77e160355e" \
  -H "Authorization: Bearer $FAXTERRA_TOKEN"