Endpoint
multipart/form-data for files, or JSON when the
document is inline Markdown or a cover page alone.
A complete fax
A call that carries a file, a letter as inlinemarkdown, or a cover page
makes a draft and returns 201. The answer has id, url and status_url.
Give url to the person: it opens the preview with the price. The draft is
abandoned after 4 hours if the person does not pay.
When you write the document
Send the text as Markdown in themarkdown field. JSON is the natural form:
\n. The answer is the same
as for a file. The text becomes the first document of the fax, a file named
letter.md. Headings, lists and tables work. Raw HTML is printed as text.
A fax has no cover page unless you ask for one. So the letter must carry its
own names, date and address block.
If the person must also add a file (a signed form, for example), send the
letter and set file_expected=true. The form then opens with the letter
attached.
A fax that still needs a file
When the person must add a file, send what you have and setfile_expected
to true. A call with no file, no letter and no cover page is handled the
same way. The answer is 200 with only url (no id, no status_url),
and no fax exists yet.
url to the person. It opens the web form with what you sent, the
person adds the file there, and then sees the preview and pays. The link is
good for 24 hours.
Fields
Errors
Errors are JSON.422 - validation error
422 - validation error
A field is wrong, a field name is unknown, or the body is not valid JSON.
The body has
message and errors (the messages for each field). The
messages say how to fix the call.429 - too many calls
429 - too many calls
Too many calls from one address in an hour. Wait for the number of
seconds in the
Retry-After header, then try again.503 - new orders paused
503 - new orders paused
New orders are paused for a short time. Try again later.
OpenAPI
The full field reference and example answers are in the OpenAPI file.Related
Check the status
Poll for
pending, delivered, failed, expiredPage for AI assistants
The rules in plain language
