Documents

Start uploading a new file version

POST
/documents/{document_id}/replace-upload

Start uploading a new file for an existing, confirmed document (a new version: same id, name, folder, sharing and record links). Returns a presigned PUT URL and an upload_token; PUT the bytes, then documents.replace_confirm. The document keeps its current file until the confirm.

Authorization

bearerApiKey
AuthorizationBearer <token>

Create a scoped API key in the Adlass settings.

In: header

Path Parameters

document_id*string

Resource identifier: document_id.

Formatuuid

Header Parameters

X-Request-Id?string

Optional correlation identifier.

Lengthlength <= 128

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

application/problem+json

curl -X POST "https://example.com/documents/123e4567-e89b-42d3-a456-426614174000/replace-upload" \  -H "Content-Type: application/json" \  -d '{    "file_size": 0  }'
{  "document_id": "123e4567-e89b-42d3-a456-426614174000",  "upload_token": "example",  "content_version": 0,  "presigned_url": "https://storage.example.com/invoice-2026-09.pdf?signature=example",  "expires_at": "2026-09-04T12:00:00Z",  "content_type": "application/pdf",  "recommended_headers": {},  "instructions_for_agent": "Upload the file with HTTP PUT to presigned_url."}