Upload a document for a company
Uploads a single file under one of a fixed set of document categories. The tenant is derived from the bearer token; only the authenticated company's id may be used in the path. Maximum file size: 25 MB. For category LIABILITY_UPLOAD the downstream service additionally triggers asynchronous AI analysis (the upload response is returned regardless of the AI outcome). Required caller roles (enforced by the downstream service): COMPANY_ADMINISTRATOR, TRUSTED_USER, ACCOUNTANT, CUSTOMER_RELATIONSHIP_MANAGER, EMPLOYEE or MYKLARA_USER.<br/><br/><strong>Important:</strong> When uploading documents as part of the <strong>create booking</strong> functionality only the <code>LIABILITY_UPLOAD</code> category is allowed (the documents are automatically moved to <code>LIABILITIES</code> when the booking is created successfully via <code>POST /core/v1/bookings</code>). The GUI implementation of booking creation must therefore always pass <code>LIABILITY_UPLOAD</code> as the <code>category</code> value in the request body.
Request
- Base URL: https://api.klara.ch
- URL: https://api.klara.ch/core/latest/companies/{company-id}/documents
- Auth: one of:
- API key in header X-API-KEY
- HTTP bearer
Path parameters
Identifier of the company that owns the document. Must match the company id carried by the bearer token, otherwise the request is rejected with 403.
Response
Document successfully uploaded.
Example response
{
"documentId": "550e8400-e29b-41d4-a716-446655440000"
}Changes
No recorded changes to this operation across all 1 revision of this API.