Upload a document to an inbox
upload_documentAdd one document to an inbox. It is read with the inbox's fields in the background, the same as a document dropped into the inbox in the console, and costs 1 credit per page. Send the file as file_base64 (a PDF, PNG or JPEG) with its file_name. Returns the new document's id. Upload only to the inbox the document belongs in: call get_inbox to read an inbox's fields when you are not sure.
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": {
"inbox_id": "<inbox_id>",
"file_name": "<file_name>",
"file_base64": "<file_base64>"
},
"name": "upload_document"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| inbox_id | Yes | The inbox id returned by create_inbox. | |
| file_name | Yes | The file's name, such as invoice-1042.pdf. Shown in the inbox. | |
| file_base64 | Yes | The file, base64-encoded: a PDF, PNG or JPEG. The type is read from the bytes, not the name. The size limit is the workspace plan's per-document limit. |