Skip to main content

Upload File

POST /api/files

Upload a new file to the system and optionally process it.

Code Examples

curl --request POST \
--url 'https://tess.pareto.io/api/files' \
--header 'Authorization: Bearer YOUR_API_KEY' \
--header 'Content-Type: multipart/form-data' \
--form 'file=@/path/to/file' \
--form 'process=false'

Headers

ParameterTypeRequiredDescription
x-workspace-idintegerNoID of the workspace. If not provided, the user's selected workspace will be used.

Request Body

ParameterTypeRequiredDescription
filebinaryYesThe file to upload
processbooleanNoWhether to process the file after upload (default: false). The file processing consume credits (true).

Response

{
"id": 73325,
"object": "file",
"bytes": 35504128,
"created_at": "2025-01-05T22:26:27+00:00",
"filename": "endpoints.pdf",
"credits": 0,
"status": "waiting"
}

Try it out!

Authentication

This endpoint requires Bearer token authentication.

Test Endpoint

Multipart Fields