Skip to content

Upload a file

Request

This endpoint allows a client to upload a binary file. The id returned in the response represents the file in Hypatos systems. It can be used in other endpoints, for example to initiate processing of the file to create a document holding captured data, or to include the file in a case.

Security
OAuth2(Required scopes: files.write)
Headers
X-Hy-Filenamestring, <= 256 characters

Optional name of the file to be stored along with the content.

Bodyrequired

Payload of the file

string, (binary)(BinaryFile)
curl -i -X POST https://api.cloud.hypatos.ai/v2/files \
  -H "Authorization: Bearer <YOUR_TOKEN_HERE>" \
  -H "Content-Type: application/pdf" \
  -H "X-Hy-Filename: invoice.pdf" \
  --data-binary @/path/to/your/document.pdf

Responses

File uploaded

Bodyapplication/json
idstringrequired
Example:"6040dc9680b782b365ea77d5"
Response
{ "id": "6040dc9680b782b365ea77d5" }