Skip to main content
POST
Create a document

Authorizations

scribe_session
string
cookie
required

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

Body

application/json

Title, scope, and optional folder of the new document.

Create a document.

scope
enum<string>
required

Section to create the document in.

Available options:
workspace,
private
Example:

"workspace"

title
string

Document title. Defaults to 'Untitled'.

Required string length: 1 - 500
Example:

"Launch plan"

folderId
string

Folder to create the document in. Omit for the section root.

Example:

"fld_7qRsTuVwXyZaBcDeFg3h"

Response

The created 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