Skip to content
LogoLogo

Update Document metadata

Update Document metadata

PATCH/api/v1/documents/{document_id}

Applies an optimistic compare-and-swap to Document metadata. Content is replaced through the separate content operation so a title rename never competes with an autosave for the same revision. Public Document creation and transitions to public visibility require the Workspace's public-publishing billing entitlement; denial returns 403 paid_workspace_required. Unpublishing and ordinary edits of an existing publication remain available subject to normal authorization. Public links are unavailable while the entitlement is absent.

Path Parameters

document_idRequired
string <uuid>
Example0198ac5e-f9b7-7000-8000-000000000001

Header Parameters

X-CSRF-TokenRequired
string·min 43·max 43

Session-bound CSRF token. It must exactly match the __Host-assign_csrf cookie sent with the request.

Idempotency-KeyRequired
string·min 16·max 200

Opaque client-generated key for safely retrying this operation.

If-MatchRequired
string

Entity tag containing the resource version last observed by the client.

Request Body

application/json
title
string·min 1·max 500
project_id
string <uuid>

Opaque Assign-owned UUIDv7 identifier. Clients must not derive meaning from it.

Example0198ac5e-f9b7-7000-8000-000000000001
visibility
string
Values
workspaceprojectpublic
parent_document_id
string <uuid>

Opaque Assign-owned UUIDv7 identifier. Clients must not derive meaning from it.

Example0198ac5e-f9b7-7000-8000-000000000001

Responses