Create Document Record
Documents
Create Document Record
Register a new document record in the workspace’s document library
POST
Create Document Record
Request
Binary uploads are handled out-of-band through a signed URL flow. This endpoint records the metadata for a document whose bytes have already been uploaded to the workspace’s object store atstorage_path. To obtain a signed upload URL, use POST /v1/documents/upload-url (documented separately under Storage).
Headers
Optional UUID for retry deduplication within 24 hours.
Body Parameters
Display name of the document. 1 - 255 characters.
IANA media type of the file (e.g.
application/pdf, image/png).Object storage key where the uploaded bytes live. Usually returned by the signed-upload flow.
Size of the uploaded file, in bytes. Used for quota tracking.
Optional description.
Optional folder path. Created on demand. Example:
/clients/acme/ndas.Optional array of tag strings.
Response
The created document record (same shape as
GET /v1/documents/{id}).X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, and X-Request-ID.
Example Response
Errors
| Status | Code | Description |
|---|---|---|
| 400 | validation_error | Missing required fields or invalid MIME type |
| 401 | invalid_key | Invalid or expired API key |
| 403 | insufficient_permissions | Missing write:documents permission |
| 409 | storage_conflict | A document already exists at the supplied storage_path |
| 429 | rate_limited | Rate limit exceeded |