File uploads
Some endpoints accept optional binary attachments. You can use multipart form data, JSON with base64 payloads, or both as documented on each route.
Mechanisms
- Multipart —
Content-Type: multipart/form-data, one or more parts namedfiles. - JSON base64 —
Content-Type: application/json, with afilesorfilesBase64array (see below).
Per-file limit: 50 MB after base64 decode.
When both files and filesBase64 are present
If filesBase64 is present on the body (!== undefined), it is used as the base64 file array instead of files, so you can reserve files for other fields if needed.
JSON base64 object shape
Each entry in the array:
| Field | Type | Required | Description |
|---|---|---|---|
| filename or name | string | Required | File name to use when the attachment is sent upstream (either field name is accepted). |
| contentBase64 or dataBase64 | string | Required | File contents encoded as standard base64. Whitespace in the string is allowed. |
| contentType or mimeType | string | Optional | MIME type of the file (for example application/pdf). Defaults to application/octet-stream when omitted. |
Minimal JSON example
JSON
{
"files": [
{
"filename": "note.txt",
"contentType": "text/plain",
"contentBase64": "SGVsbG8gd29ybGQ="
}
]
}