post
/{tenantId}/v1/documentsCreate document
Requires Authentication
Documents
Creates a document metadata record and returns a presigned S3 upload URL.
The client should upload the file directly to S3 using the returned URL,
then call the confirm endpoint to mark the document as ready.
Path Parameters
| Name | Type | Description |
|---|---|---|
tenantIdrequired | string (uuid) | Tenant UUID |
Request Body
required
fileNamestring
required
- Original file namecontentTypestring
required
- MIME content typefileSizeinteger (int64)
required
- Expected file size in bytesdocumentSetIdstring (uuid)
- Optional document set to add this document toResponses
Document created with presigned upload URL
Response Bodyapplication/json
idstring (uuid)
- Document IDuploadUrlstring
- Presigned S3 PUT URL for uploading the file (expires in 15 minutes)Code Examples
curl -X POST 'https://api-next.checkio.co.uk/{tenantId}/v1/documents' \
-H 'Authorization: Bearer {token}' \
-H 'Content-Type: application/json' \
-d '{
"fileName": "invoice.pdf",
"contentType": "application/pdf",
"fileSize": 524288,
"documentSetId": "00000000-0000-0000-0000-000000000000"
}'