Skip to main content
POST
Create document record

Authorizations

Authorization
string
header
required

API key authentication. Use format: Authorization: Bearer tavrn_sk_live_... Live keys (tavrn_sk_live_...) work only against https://enterprise.tavrn.ai; sandbox test keys (tavrn_sk_test_..., from https://sandbox.tavrn.ai) work only against https://sandbox.tavrn.ai.

Headers

Tavrn-Version
string

Dated API version (YYYY-MM-DD) to apply to this request. Defaults to the version pinned to the API key, then to the baseline 2026-10-16. Unknown values return 400 invalid_api_version. See Guides > Versioning.

Pattern: ^\d{4}-\d{2}-\d{2}$
Example:

"2026-10-16"

Idempotency-Key
string

Optional opaque key (1-255 characters, a UUID v4 is recommended) that makes a POST safe to retry. Scoped to your organization and kept for 24 hours. A retry with the same key and the same body replays the original status and body with Idempotent-Replayed: true; the same key with a different body returns 422 idempotency_key_reused_with_different_payload; a retry while the first attempt is still running returns 409 idempotency_key_in_use. Only 2xx and 4xx outcomes are stored - a 5xx releases the key so the retry executes again. See the Idempotent requests guide.

Required string length: 1 - 255

Path Parameters

case_id
string
required

Case ID

Body

application/json
upload_id
string
required

Upload ID from sign-upload endpoint

Example:

"11111111-1111-4111-8111-111111111111"

path
string | null

Virtual path for UI grouping

Example:

"Example_General_Hospital"

Response

Document created successfully

id
string
required

Unique document identifier

Example:

"doc_abc123"

case_id
string
required

Associated case ID

Example:

"case_xyz"

file_name
string
required

File name

Example:

"medical_record.pdf"

file_size
integer
required

File size in bytes

Example:

1234567

file_type
string
required

MIME type

Example:

"application/pdf"

archived
boolean
required

Whether document is archived

Example:

false

created_at
string<date-time>
required

Creation timestamp (ISO 8601)

Example:

"2025-02-01T12:34:56Z"

updated_at
string<date-time>
required

Last update timestamp (ISO 8601)

Example:

"2025-02-01T12:34:56Z"

path
string | null

Virtual path for UI grouping

Example:

"Example_General_Hospital"