Skip to main content
Upload a document

Authorizations

Authorization
string
header
required

Personal API key sent as a bearer token, together with X-Organization-Id. The key must have at least the access level the endpoint requires (read, write or admin).

Headers

X-Organization-Id
string

The organization to act in. Required for personal API keys; list the organizations you can access with GET /v1/organizations.

Query Parameters

category
enum<string>
Available options:
invoice,
agreement,
other
file_name
string
required
Required string length: 1 - 255
mime_type
string
required
Maximum string length: 255
Pattern: ^[a-z0-9!#$&^_.+-]+\/[a-z0-9!#$&^_.+-]+$
md5_checksum
string

Base64 MD5 of the file. If you can already see a document with the same checksum, size and category, that document is returned instead.

Pattern: ^[A-Za-z0-9+/]{22}==$

Body

application/octet-stream

The body is of type file.

Response

You can already see a document with this file; it was not stored again.

existing
boolean
required

True when md5_checksum, size and category matched a document you can already see: that document is returned and the file was not stored again.

document_id
string<uuid>
required
document
object
required