File a document in a folder.
POST/api/v1/folders/{folder_id}/documentsdocuments:write
Needs an edit grant on the document, which must not be locked, and read access to the folder. A document already filed there is 409 already_exists.
| Scope | documents:write |
| Asynchronous | No |
| MCP tool | create_folder_document |
| Portal permissions | add_document_folders |
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
folder_id | path | string | Required | |
Docwize-Version | header | string (date) | Optional | |
Idempotency-Key | header | string | Optional | max 255 |
Request body
| Content type | Type |
|---|---|
application/json | FolderDocumentCreateInput |
Responses
| Status | Description | Body |
|---|---|---|
201 | Success. | application/json DocumentSummary or object |
400 | invalid_version, malformed_json | application/problem+json Problem |
401 | token_expired, unauthenticated | application/problem+json Problem |
403 | forbidden, insufficient_scope, token_owner_inactive | application/problem+json Problem |
404 | not_found | application/problem+json Problem |
405 | method_not_allowed | application/problem+json Problem |
406 | not_acceptable | application/problem+json Problem |
409 | already_exists, conflict, idempotency_in_progress, locked | application/problem+json Problem |
413 | payload_too_large | application/problem+json Problem |
415 | unsupported_media_type | application/problem+json Problem |
421 | wrong_region | application/problem+json Problem |
422 | idempotency_key_reused, validation_failed | application/problem+json Problem |
500 | internal_error | application/problem+json Problem |
503 | tenant_unavailable, unavailable | application/problem+json Problem |
504 | timeout | application/problem+json Problem |
Errors
The problem codes this operation can answer with. Each code links to its page.
Schemas
AdditionalField
| Field | Type | Required | Description |
|---|---|---|---|
label | string or null | Required | |
value | string or null | Required |
AdditionalFields
| Field | Type | Required | Description |
|---|---|---|---|
additional_field_3 | AdditionalField | Required | |
additional_field_4 | AdditionalField | Required | |
additional_field_5 | AdditionalField | Required | |
additional_field_6 | AdditionalField | Required |
DocumentSummary
| Field | Type | Required | Description |
|---|---|---|---|
actual_submission_date | string or null | Required | |
additional_fields | AdditionalFields | Required | |
created_at | string (date-time) or null | Required | |
created_by | UserRef or null | Required | |
description | string or null | Required | |
document_date | string or null | Required | |
document_id | string | Required | |
document_number | string or null | Required | |
document_status | object or null | Required | The status shown as Status in the Portal (lookup_actionstatus). |
document_sub_type | object or null | Required | |
document_type | object or null | Required | |
duplicate_of | string or null | Required | The number of the document this one duplicates (the Portal's Duplicate Of). |
from_contact | object or null | Required | |
from_organisation | object or null | Required | |
is_latest_revision | boolean | Required | |
is_locked | boolean | Required | |
is_privileged | boolean | Required | |
main_document_date | string or null | Required | |
owner | UserRef or null | Required | |
page_end | number or null | Required | Last page of the range this document covers in its file. |
page_start | number or null | Required | First page of the range this document covers in its file. |
post_review_status | object or null | Required | |
project | object or null | Required | The stored project number text, with the project's ID when one matches. |
project_organisation | object or null | Required | |
reference_number | string or null | Required | |
relevance | number or null | Required | 1 is relevant (the default), 0 is irrelevant (the Portal's Irrelevant switch). |
responded_with | string or null | Required | The reference of the document that responded to this one (the Portal's Responded With). |
response_date | string or null | Required | |
response_due_date | string or null | Required | |
revision_number | string or null | Required | |
to_contact | object or null | Required | |
to_organisation | object or null | Required |
FolderDocumentCreateInput
| Field | Type | Required | Description |
|---|---|---|---|
document_id | string | Required |
UserRef
| Field | Type | Required | Description |
|---|---|---|---|
display_name | string | Required | |
kind | string: user, system, integration or string | Required | |
user_id | string or null | Required |