Upload a file
create_documentUse this to add a file the person gave you to a fax: a PDF, or a photo saved as JPG, PNG, WEBP or HEIC, up to 20 MB. Call it once per file, before create_fax, in the order the files should be faxed. It returns document_id, upload_url and upload_headers: PUT the file's exact bytes to upload_url with those headers within 5 minutes, then pass document_id to create_fax within an hour. Nothing is faxed or charged. If you can't read the file's bytes, don't use this: call create_fax without document_ids, and the person adds the file on the status page.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"fax_number": "<fax_number>",
"filename": "<filename>",
"byte_size": "<byte_size>",
"checksum": "<checksum>",
"content_type": "<content_type>"
},
"name": "create_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| region | No | For a fax to the US or Canada from a person who isn't signed in and who the conversation shows is in Europe: pass "eu" to send it through Faxette's European service. It's ignored for other numbers and when the person is signed in. Pass the same value to create_document and create_fax. | |
| checksum | Yes | The file's MD5 digest, base64-encoded, as printed by: openssl md5 -binary <file> | base64 | |
| filename | Yes | The file's name with its extension, like referral.pdf. | |
| byte_size | Yes | The file's exact size in bytes. | |
| fax_number | Yes | The fax number the file will be faxed to, in international format, like +14155552671. Numbers in the US, Canada, Mexico, Puerto Rico, Costa Rica, the EU, the UK, Switzerland, Norway, Iceland, Liechtenstein, Monaco, Montenegro, Ukraine and the Isle of Man only. Use the same number in create_fax. | |
| content_type | Yes | The file's media type. It must match the file's contents. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| upload_url | Yes | PUT the file's exact bytes here within 5 minutes. | |
| document_id | Yes | Pass this to create_fax in document_ids. | |
| upload_headers | Yes | Send these headers, unchanged, with the PUT. |