Skip to main content
POST
Create a document

Authorizations

Authorization
string
header
required

Personal access token is obtained through your profile

Path Parameters

projectId
string<uuid>
required

Project unique identifier

Body

application/json
name
string
required

Document name

Example:

"Sample document"

type
enum<string>
default:f

Document type (file or directory)

Available options:
f,
d,
e
contentType
string

Content MIME type for files

content
any | null

Initial document content

testEvent
string | null

Default test event context

parent
string

Parent directory key path

duplicate
boolean
default:false

Allow duplicate names

meta
object

Document metadata

source
string

Source document key to copy content from

Response

200 - application/json

Newly created document

Newly created document

id
string<uuid>
required

Document unique identifier

key
string
required

Materialized lowercase path based on the name

path
string
required

Materialized path based on the name

name
string
required

Document name

type
enum<string>
required

Document type (file, directory, or external file)

Available options:
f,
d,
e
projectId
string<uuid>
required

Project ID

meta
object

Document metadata

contentType
string

Content MIME type

size
number

Document size in bytes

parentId
string<uuid> | null

Parent document ID

publishedId
string<uuid> | null

Currently published version ID

publishedAt
string | null

Publication timestamp

publishedBy
object

User who published the document

published
object

Published version details

versions
object[]

Document versions

changeRequests
object[]

Pending change requests

view
object | null

Document view configuration

updatedAt
string

Last update timestamp

deletedAt
string | null

Deletion timestamp if soft deleted