Every API here is available over the APIs.io API and to AI agents over MCP.
openapi: 3.2.0
info:
title: FaxTerra Account API
version: '1'
description: 'Send faxes from code or an agent, on the same account, prices and free pages as the website. Sign in with an emailed code and the person’s acceptance of the Terms, upload, send, then poll each fax at its nextCheckAfter. The same calls are MCP tools at /api/v1/mcp (streamable HTTP), for an AI assistant connected with OAuth or any v1 credential. A body field or query parameter an operation doesn’t take is refused with VALIDATION_ERROR and its name in error.field, on every operation that takes a token or key; the three public reads (the guide, this document and the price list) ignore one. Each operation lists the error codes it can answer. Calls from a web page to the REST endpoints are not supported. They send no CORS headers, and an OPTIONS preflight gets 204 with an Allow header and no Access-Control headers, which a browser refuses. A token or API key is a secret that a web page would show to anyone who opens it, so call from a server, or from an app or agent that keeps the credential to itself. The MCP endpoint is the one exception: it answers a browser’s preflight, for assistants that connect from a browser with OAuth. A fax to a test number is never dialled and uses no pages: +12015550100 (echo), +12015550101 (delivered), +12015550102 (busy then delivered), +12015550103 (no answer), +12015550104 (voice line). POST /webhooks/{id}/test sends an endpoint a signed test event of any type. During early access, any change to v1, breaking or not, can take effect the day the changelog lists it. Changes to v1, and what counts as breaking: https://faxterra.com/developers/changes.'
servers:
- url: https://faxterra.com/api/v1
security:
- bearerAuth: []
tags:
- name: Account
description: An owner or admin creates an API key in Settings, under Developer tools, for the account’s own software. It is shown once, acts in that account as the member who made it, and stops when revoked there or when that member leaves. On an account with the HIPAA add-on the owner or admin confirms the key is for the account’s own software; a key made before the add-on is paused until they do (`KEY_ATTESTATION_REQUIRED`).
paths:
/account:
get:
operationId: getAccount
tags:
- Account
summary: Account state, balances, Terms and prices
responses:
'200':
description: The account
content:
application/json:
schema:
type: object
properties:
success:
const: true
data:
$ref: '#/components/schemas/Account'
required:
- success
- data
'400':
description: '`VALIDATION_ERROR` with `error.field`: a query parameter or field this call does not take.'
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Error'
- type: object
properties:
error:
type: object
properties:
code:
enum:
- VALIDATION_ERROR
required:
- code
required:
- error
'401':
description: '`UNAUTHORIZED`: no valid token or key (missing, wrong or expired). `TOKEN_REVOKED`: the person’s API sign-ins were signed out. `SESSION_INVALID`: the person this sign-in names no longer exists. In each case, sign in again with a new code; the same token will not work again. If POST /auth/token then answers `ACCOUNT_DELETED`, the account was deleted.'
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Error'
- type: object
properties:
error:
type: object
properties:
code:
enum:
- UNAUTHORIZED
- TOKEN_REVOKED
- SESSION_INVALID
- ACCOUNT_DELETED
required:
- code
required:
- error
'403':
description: '`HIPAA_ACCOUNT`: the account gained the HIPAA add-on after this sign-in, and apps and AI assistants can’t sign in to it; signing in again will not help. On a received fax’s document, it means the account held that fax while it had the add-on, and apps and AI assistants can’t open it even after the add-on ends. `KEY_ATTESTATION_REQUIRED`: this API key predates the account’s HIPAA add-on and is paused until an owner or admin confirms it in Settings. `INSUFFICIENT_SCOPE`: the call is outside what the assistant was connected to do. One connected read only asked to send, change or delete something, or one connected send only asked to open, mark or delete a received fax, or to open a sent document.'
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Error'
- type: object
properties:
error:
type: object
properties:
code:
enum:
- HIPAA_ACCOUNT
- KEY_ATTESTATION_REQUIRED
- INSUFFICIENT_SCOPE
required:
- code
required:
- error
'409':
description: '`ACCOUNT_UNAVAILABLE`: this person can no longer act in the account the credential names (they were removed from it); `error.message` says what to do.'
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Error'
- type: object
properties:
error:
type: object
properties:
code:
enum:
- ACCOUNT_UNAVAILABLE
required:
- code
required:
- error
'429':
description: '`RATE_LIMITED`: too many requests on this sign-in. It always carries `Retry-After` (also `error.retryAfter`). Wait that many seconds, then try again. A 429 with no JSON body is the limit on calls from one IP address. Wait 1 minute, then try again.'
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Error'
- type: object
properties:
error:
type: object
properties:
code:
enum:
- RATE_LIMITED
required:
- code
required:
- error
headers:
Retry-After:
schema:
type: integer
description: Seconds to wait before trying again
'500':
description: '`INTERNAL_ERROR`: something went wrong on our side. Try again.'
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Error'
- type: object
properties:
error:
type: object
properties:
code:
enum:
- INTERNAL_ERROR
required:
- code
required:
- error
/terms/accept:
post:
operationId: acceptTerms
tags:
- Account
summary: Accept revised Terms of Service on the person’s behalf
description: Needed only after the Terms are revised, since the sign-in records the first acceptance. When GET /account reports terms.needsAcceptance, or a send is refused with `TOS_REQUIRED`, show the person the revised Terms and send this only when they agree.
requestBody:
required: true
content:
application/json:
schema:
type: object
properties:
version:
type: string
description: terms.currentVersion from GET /account
required:
- version
additionalProperties: false
example:
version: '2026-11-25'
responses:
'200':
description: Recorded
content:
application/json:
schema:
type: object
properties:
success:
const: true
data:
type: object
properties:
version:
type: string
acceptedAt:
type: string
format: date-time
required:
- version
- acceptedAt
required:
- success
- data
'400':
description: '`BAD_REQUEST`: version is missing. `VALIDATION_ERROR`: a field this call does not take.'
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Error'
- type: object
properties:
error:
type: object
properties:
code:
enum:
- BAD_REQUEST
- VALIDATION_ERROR
required:
- code
required:
- error
'401':
description: '`UNAUTHORIZED`: no valid token or key (missing, wrong or expired). `TOKEN_REVOKED`: the person’s API sign-ins were signed out. `SESSION_INVALID`: the person this sign-in names no longer exists. In each case, sign in again with a new code; the same token will not work again. If POST /auth/token then answers `ACCOUNT_DELETED`, the account was deleted.'
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Error'
- type: object
properties:
error:
type: object
properties:
code:
enum:
- UNAUTHORIZED
- TOKEN_REVOKED
- SESSION_INVALID
- ACCOUNT_DELETED
required:
- code
required:
- error
'403':
description: '`HIPAA_ACCOUNT`: the account gained the HIPAA add-on after this sign-in, and apps and AI assistants can’t sign in to it; signing in again will not help. On a received fax’s document, it means the account held that fax while it had the add-on, and apps and AI assistants can’t open it even after the add-on ends. `KEY_ATTESTATION_REQUIRED`: this API key predates the account’s HIPAA add-on and is paused until an owner or admin confirms it in Settings. `INSUFFICIENT_SCOPE`: the call is outside what the assistant was connected to do. One connected read only asked to send, change or delete something, or one connected send only asked to open, mark or delete a received fax, or to open a sent document.'
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Error'
- type: object
properties:
error:
type: object
properties:
code:
enum:
- HIPAA_ACCOUNT
- KEY_ATTESTATION_REQUIRED
- INSUFFICIENT_SCOPE
required:
- code
required:
- error
'409':
description: '`STALE_VERSION`: not the version in force; read terms.currentVersion from GET /account and show the person those Terms. `ACCOUNT_UNAVAILABLE`: this person can no longer act in the account the credential names (they were removed from it); `error.message` says what to do.'
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Error'
- type: object
properties:
error:
type: object
properties:
code:
enum:
- STALE_VERSION
- ACCOUNT_UNAVAILABLE
required:
- code
required:
- error
'429':
description: '`RATE_LIMITED`: too many requests on this sign-in. It always carries `Retry-After` (also `error.retryAfter`). Wait that many seconds, then try again. A 429 with no JSON body is the limit on calls from one IP address. Wait 1 minute, then try again.'
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Error'
- type: object
properties:
error:
type: object
properties:
code:
enum:
- RATE_LIMITED
required:
- code
required:
- error
headers:
Retry-After:
schema:
type: integer
description: Seconds to wait before trying again
'500':
description: '`INTERNAL_ERROR`: something went wrong on our side. Try again.'
content:
application/json:
schema:
allOf:
- $ref: '#/components/schemas/Error'
- type: object
properties:
error:
type: object
properties:
code:
enum:
- INTERNAL_ERROR
required:
- code
required:
- error
components:
schemas:
Account:
type: object
properties:
apiVersion:
type: string
description: The API version, as in the /api/v1 path
credential:
type: object
properties:
kind:
enum:
- emailed_code
- api_key
- assistant
name:
anyOf:
- type: string
description: The key's name, or the connected app's
- type: 'null'
account:
type: object
properties:
id:
type: string
name:
anyOf:
- type: string
- type: 'null'
role:
anyOf:
- type: string
- type: 'null'
required:
- id
- name
- role
access:
enum:
- read
- send
- read_and_send
description: '`read` for an assistant the person connected read only (scope fax:read), `send` for one connected send only (scope fax:send alone). Over MCP each is offered only the tools its access covers, and a call to any other answers an error that the tool is disabled: a read-only connection can''t send, change or delete, and a send-only one can''t open received faxes or sent documents. Over REST, an assistant''s token is taken only by POST /auth/sign-out, which answers every access. Every other credential reads and sends.'
can:
type: array
items:
type: string
description: What this credential can do in the account, at its access
hipaa:
type: object
properties:
account:
type: boolean
keyAttested:
anyOf:
- type: boolean
- type: 'null'
required:
- account
- keyAttested
required:
- kind
- name
- account
- access
- can
- hipaa
user:
type: object
properties:
id:
type: string
email:
type: string
required:
- id
- email
account:
type: object
properties:
plan:
type: string
subscriptionStatus:
anyOf:
- type: string
- type: 'null'
billedBy:
anyOf:
- type: string
- type: 'null'
suspended:
type: boolean
number:
anyOf:
- type: string
description: The account’s own fax number (E.164), when it has one.
- type: 'null'
sharedNumber:
anyOf:
- type: string
- type: 'null'
sendsFrom:
anyOf:
- type: string
description: The number a recipient sees a fax from this account come from
- type: 'null'
pastNumbers:
type: array
items:
type: object
properties:
number:
type: string
releasedAt:
anyOf:
- type: string
format: date-time
- type: 'null'
past:
const: true
required:
- number
- releasedAt
- past
retention:
type: object
properties:
receivedDays:
anyOf:
- type: integer
description: Days a received document is kept; null keeps it until deleted
- type: 'null'
sentDays:
anyOf:
- type: integer
description: Days a sent document is kept; null keeps it until deleted
- type: 'null'
required:
- receivedDays
- sentDays
timeZones:
type: object
properties:
confirmations:
type: string
description: The account's zone, which delivery confirmations state their times in and name (Eastern when none is set)
account:
type: string
description: The owner's zone, which forwarded-fax emails use
required:
- confirmations
- account
textBudget:
type: object
properties:
pagesPerDay:
type: integer
description: Received-fax pages the account can have read to text (format=text) in a day
pagesLeft:
type: integer
description: Pages left now. A fax whose text is already read costs none
resetsAt:
anyOf:
- type: string
format: date-time
description: When the whole budget is back; null while none of it is spent
- type: 'null'
required:
- pagesPerDay
- pagesLeft
- resetsAt
linkUploadBudget:
type: object
properties:
bytesPerDay:
type: integer
description: Bytes the account’s uploads from a link (POST /uploads/from-url) can fetch in a day
bytesLeft:
type: integer
description: Bytes left now. A fetch counts what it downloaded
resetsAt:
anyOf:
- type: string
format: date-time
description: When the whole budget is back; null while none of it is spent
- type: 'null'
required:
- bytesPerDay
- bytesLeft
- resetsAt
required:
- plan
- subscriptionStatus
- billedBy
- suspended
- number
- sharedNumber
- sendsFrom
- pastNumbers
- retention
- timeZones
terms:
type: object
properties:
currentVersion:
type: string
acceptedVersion:
anyOf:
- type: string
- type: 'null'
needsAcceptance:
type: boolean
acceptanceRequiredVersion:
type: string
description: The oldest Terms version that needs no new acceptance. A revision that does not require it moves currentVersion only, so acceptedVersion may be older than currentVersion with needsAcceptance false.
required:
- currentVersion
- acceptedVersion
- needsAcceptance
- acceptanceRequiredVersion
balances:
type: object
properties:
freePagesRemaining:
type: integer
freePagesHeldUntil:
anyOf:
- type: string
format: date-time
- type: 'null'
freePagesHoldNote:
anyOf:
- type: string
- type: 'null'
includedPagesRemaining:
type: integer
creditBalance:
type: integer
pendingPages:
type: integer
required:
- freePagesRemaining
- freePagesHeldUntil
- freePagesHoldNote
- includedPagesRemaining
- creditBalance
- pendingPages
inFlight:
type: object
properties:
faxes:
type: integer
pages:
type: integer
units:
type: integer
required:
- faxes
- pages
- units
limits:
type: object
properties:
freePagesPerPeriod:
type: integer
freePeriodResetAt:
anyOf:
- type: string
format: date-time
- type: 'null'
internationalPageMultiplier:
type: integer
destinationPageMultipliers:
type: object
description: Units a page costs to each supported country outside the US and Canada, by ISO code. A quote gives the exact number’s value (unitsPerPage).
additionalProperties:
type: integer
required:
- freePagesPerPeriod
- freePeriodResetAt
- internationalPageMultiplier
- destinationPageMultipliers
purchase:
type: object
properties:
creditPacks:
$ref: '#/components/schemas/PurchaseOption'
subscription:
$ref: '#/components/schemas/PurchaseOption'
oneTimeNumber:
$ref: '#/components/schemas/PurchaseOption'
required:
- creditPacks
- subscription
- oneTimeNumber
pricing:
$ref: '#/components/schemas/Pricing'
required:
- apiVersion
- credential
- user
- account
- terms
- balances
- inFlight
- limits
- purchase
- pricing
Pricing:
type: object
properties:
currency:
type: string
freeTier:
type: object
properties:
pagesPerPeriod:
type: integer
resetPeriod:
type: string
required:
- pagesPerPeriod
- resetPeriod
creditPacks:
type: array
items:
type: object
properties:
id:
type: string
label:
type: string
pages:
type: integer
priceCents:
type: integer
perPageCents:
type: number
required:
- id
- label
- pages
- priceCents
- perPageCents
subscriptions:
type: array
items:
type: object
properties:
id:
type: string
label:
type: string
monthlyPriceCents:
type: integer
annualPriceCents:
anyOf:
- type: integer
- type: 'null'
includedPagesPerMonth:
type: integer
includesNumber:
type: boolean
required:
- id
- label
- monthlyPriceCents
- annualPriceCents
- includedPagesPerMonth
- includesNumber
oneTimeNumbers:
type: array
items:
type: object
properties:
id:
type: string
label:
type: string
priceCents:
type: integer
windowDays:
type: integer
includedPages:
type: integer
required:
- id
- label
- priceCents
- windowDays
- includedPages
pageUnits:
type: object
properties:
domestic:
type: integer
internationalMultiplier:
type: integer
required:
- domestic
- internationalMultiplier
required:
- currency
- freeTier
- creditPacks
- subscriptions
- oneTimeNumbers
- pageUnits
PurchaseOption:
type: object
properties:
available:
type: boolean
reason:
anyOf:
- type: string
description: Why it cannot be bought now; null when it can.
- type: 'null'
required:
- available
- reason
Error:
type: object
properties:
success:
const: false
error:
type: object
properties:
code:
type: string
description: 'What went wrong, stable: act on this'
message:
type: string
description: The same, written for a person
field:
type: string
description: The request field at fault, dotted (`files.0.fileKey`), when one is
reason:
type: string
description: 'With `field`: the check it failed (`unrecognized_keys`, `invalid_format`, `invalid_number`, …)'
retryAfter:
type: integer
description: 'On a request-limit 429: seconds to wait, as in Retry-After. Absent on a sending limit or TOO_MANY_ATTEMPTS.'
version:
type: string
description: 'On `TOS_REQUIRED` at sign-in: the Terms version to send as acceptTerms'
termsUrl:
type: string
format: uri
description: 'On `TOS_REQUIRED` at sign-in: where the Terms are'
required:
- code
- message
required:
- success
- error
securitySchemes:
bearerAuth:
type: http
scheme: bearer
description: 'A token from POST /auth/token, or an API key (ftk_…), as "Authorization: Bearer <token>". A token the FaxTerra app holds does not work here. A token acts in the person’s default account: their own signup account when they are an active member of it, otherwise their first active membership. An API key is bound to the one account it was created in and acts in that one, as the person who created it. No cookie or header on the request changes which account. Keep a token or key secret, like a password: never in a URL or a log.'