Skip to main content

Put a tag on a document.

POST/api/v1/documents/{document_id}/tagsdocuments:write

Needs Assign Document Tags, View Tags, and current document/tag access. A tag already on the document is 409 already_exists.

Scopedocuments:write
AsynchronousNo
MCP toolcreate_document_tag
Portal permissionsassign_document_tags, view_tags

Parameters​

NameInTypeRequiredDescription
document_idpathstringRequired
Docwize-Versionheaderstring (date)Optional
Idempotency-KeyheaderstringOptionalmax 255

Request body​

Content typeType
application/jsonDocumentTagCreateInput

Responses​

StatusDescriptionBody
201Success.application/json Tag or object
400invalid_version, malformed_jsonapplication/problem+json Problem
401token_expired, unauthenticatedapplication/problem+json Problem
403forbidden, insufficient_scope, token_owner_inactiveapplication/problem+json Problem
404not_foundapplication/problem+json Problem
405method_not_allowedapplication/problem+json Problem
406not_acceptableapplication/problem+json Problem
409already_exists, idempotency_in_progressapplication/problem+json Problem
413payload_too_largeapplication/problem+json Problem
415unsupported_media_typeapplication/problem+json Problem
421wrong_regionapplication/problem+json Problem
422idempotency_key_reused, validation_failedapplication/problem+json Problem
500internal_errorapplication/problem+json Problem
503tenant_unavailable, unavailableapplication/problem+json Problem
504timeoutapplication/problem+json Problem

Errors​

The problem codes this operation can answer with. Each code links to its page.

Schemas​

DocumentTagCreateInput​

FieldTypeRequiredDescription
tag_idstringRequiredThe tag to put on the document, from GET /tags.

Tag​

FieldTypeRequiredDescription
colorstring or nullRequired
created_atstring (date-time) or nullRequired
descriptionstring or nullRequired
group_idsarray of string or nullRequiredThe groups the tag is restricted to; none means open to all.
is_deletedbooleanRequiredtrue for a disabled tag: it leaves everyone's Tags tab and cannot be put on documents.
is_mutually_exclusivebooleanRequiredWhether a document can carry only one of the tag's children.
is_tag_groupbooleanRequiredWhether the tag only groups other tags.
namestringRequired
parent_tag_idstring or nullRequired
sort_orderinteger or nullRequired
tag_idstringRequired
updated_atstring (date-time) or nullRequired
user_idsarray of string or nullRequiredThe users the tag is restricted to; none means open to all.