POST
/
files
/
upload
curl --request POST \
  --url https://api.invaro.ai/api/v1/files/upload \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'files=[
  "document1.pdf",
  "document2.jpg"
]'
{
  "success": true,
  "data": {
    "files": [
      {
        "doc_id": "72f574a0-b3d2-4a0f-8527-f542e6ea7500",
        "type": "invoice",
        "validation": {
          "page_count": 1,
          "file_size": 84898,
          "format": "PDF"
        }
      }
    ],
    "status": "done"
  }
}

Upload Files

POST /files/upload

Upload files for processing with automatic document type detection. This endpoint supports multiple file formats and maintains backward compatibility with the existing upload endpoint.

Features

  • Supports PDF, JPG, JPEG, PNG formats
  • Maximum 50 files per request, 10MB per file
  • Automatic document type detection
  • Maintains backward compatibility with existing upload endpoint

Request

curl -X POST "https://api.invaro.ai/api/v1/files/upload" \
  -H "Authorization: Bearer your_api_key" \
  -F "files=@document.pdf"

Response

{
  "success": true,
  "data": {
    "files": [
      {
        "doc_id": "72f574a0-b3d2-4a0f-8527-f542e6ea7500",
        "type": "invoice",
        "validation": {
          "page_count": 1,
          "file_size": 84898,
          "format": "PDF"
        }
      }
    ],
    "status": "done"
  }
}

Response Fields

FieldTypeDescription
doc_idstringUnique identifier for the uploaded document
typestringAutomatically detected document type (invoice, bank_statement, etc.)
validation.page_countintegerNumber of pages in the document
validation.file_sizeintegerFile size in bytes
validation.formatstringFile format (PDF, JPG, JPEG, PNG)
statusstringUpload status (“done” when successful)

Try It Out

Use the interactive playground above to test the upload endpoint. You can:

  1. Add your API key in the Authorization header
  2. Select files to upload (PDF, JPG, JPEG, or PNG)
  3. Execute the request to see the response

The playground will show you the exact curl command and response format.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data

Response

200 - application/json

Files uploaded successfully

The response is of type object.