Skip to main content
PATCH
Update a document

Authorizations

scribe_session
string
cookie
required

Browser session cookie set by the WorkOS sign-in flow.

Path Parameters

id
string
required

Id of the document whose metadata to update.

Body

application/json

Document fields to update.

Update document metadata. Omitted fields are left unchanged.

title
string

New document title.

Required string length: 1 - 500
Example:

"Launch plan v2"

folderId
string | null

New containing folder id, or null to move the document to the root of its section.

Example:

"fld_7qRsTuVwXyZaBcDeFg3h"

scope
enum<string>

New scope. Changing scope is restricted to the document owner and resets the folder.

Available options:
workspace,
private
Example:

"workspace"

Response

The updated document.

Document metadata including the access level of the calling actor.

id
string
required

Document id.

Example:

"doc_S9tUvWxYzAbCdEfGh12i"

title
string
required

Document title.

Example:

"Launch plan"

scope
enum<string>
required

Section the document lives in: workspace or private.

Available options:
workspace,
private
Example:

"workspace"

folderId
string | null
required

Containing folder id, or null at the root of its section.

Example:

"fld_7qRsTuVwXyZaBcDeFg3h"

ownerUserId
string
required

User id of the document owner.

Example:

"usr_V1StGXR8_Z5jdHi6BmyT"

wordCount
integer
required

Word count of the latest snapshot.

Example:

1280

charCount
integer
required

Character count of the latest snapshot.

Example:

8214

Whether a public read-only link is enabled.

Example:

false

deletedAt
integer | null
required

When the document was trashed, or null while active.

Example:

1752624000000

createdAt
integer
required

When the document was created (epoch milliseconds).

Example:

1752624000000

updatedAt
integer
required

When the document metadata or content last changed (epoch milliseconds).

Example:

1752624000000

lastEditedBy
string | null
required

User id of the last editor, or null.

Example:

"usr_V1StGXR8_Z5jdHi6BmyT"

lastEditedAt
integer | null
required

When the content was last edited, or null.

Example:

1752624000000

myAccess
object
required

Resolved access of the calling actor on a document.

Example:
publicToken
string | null
required

Public link token when enabled and visible to the caller, otherwise null.

Example:

"pub_9zYxWvUtSrQpOnMlKj4i"