Skip to main content
POST
Restore a document from the trash

Authorizations

scribe_session
string
cookie
required

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

Path Parameters

id
string
required

Id of the trashed document to restore.

Response

The restored document.

Document metadata (content is served separately).

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