Start a fax
create_faxUse this once the person has confirmed the fax number, and given you their email if they aren't signed in. It creates the fax and returns status_url, the page where the person checks the fax number, documents and price, and pays to send it. Nothing is sent or charged until they pay there. Pass the document_ids from create_document. Without them, the fax waits on the status page for the person to add their files. Each call creates a separate fax. To see how a fax is doing, use get_fax_status, or get_fax when the person is signed in.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| No | The person's email address, where Faxette sends the receipt and updates. Ask the person for it. Leave it out when they're signed in: their account's email is used. | ||
| fax_number | Yes | The fax number the fax goes to, in international format, like +14155552671. Numbers in the US and Canada only. | |
| document_ids | No | The document_id of each file from create_document, in the order they're faxed. Up to 10. Leave it out to let the person add files on the status page. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | The fax's id. Pass it to get_fax when the person is signed in. | |
| price | Yes | Before tax. Null until the pages are counted. | |
| status | Yes | draft: waiting for files, or for a file to be fixed. processing_documents: counting pages. documents_ready: ready to pay. awaiting_payment: the person is paying. scheduled: paid, about to dial. sending, delivered, failed. canceled: not paid in time. | |
| attempt | Yes | The current attempt to dial the fax number. | |
| payment | Yes | The person's payment once they start paying, by card or from their credit. amount_cents includes tax. | |
| resend_by | Yes | For a failed fax: until when the person can correct the fax number on the status page and send it again. | |
| fax_number | Yes | ||
| page_count | Yes | Null until the pages are counted. | |
| status_url | Yes | The page where the person checks the fax and pays. Give it to them. | |
| max_attempts | Yes | ||
| failure_reason | Yes | For a failed fax: temporary (busy or no answer on every attempt), wrong_number (no fax machine answered), or our_side. | |
| document_errors | Yes | Files Faxette couldn't use. position is the file's number in the fax. The person fixes them on the status page. | |
| next_attempt_at | Yes | When the next attempt dials, if the line was busy or didn't answer. | |
| checkout_available | Yes | True when the person can pay on the status page. |