v1

latestOpenAPI 3.1.02026-07-261344388.3 KB
Document

Create a document

Create a new document or directory within a project.

post/api/projects/{projectId}/documents

Path parameters

projectIdstring uuid required

Project unique identifier

Request body

namestring required

Document name

type'f' | 'd' | 'e'

Document type (file or directory)

contentTypestring

Content MIME type for files

{"stackTrail":"paths:/api/projects/{projectId}/documents:post:requestBody:content:application/json:schema:properties:content","oasType":"schema","type":"unknown","description":"Initial document content","nullable":true}
testEventstring nullable

Default test event context

parentstring

Parent directory key path

duplicateboolean

Allow duplicate names

metaobject

Document metadata

sourcestring

Source document key to copy content from

Example request

{
  "name": "Sample document"
}

Response

Newly created document

idstring uuid required

Document unique identifier

keystring required

Materialized lowercase path based on the name

pathstring required

Materialized path based on the name

namestring required

Document name

type'f' | 'd' | 'e' required

Document type (file, directory, or external file)

metaobject

Document metadata

contentTypestring

Content MIME type

sizenumber

Document size in bytes

parentIdstring uuid nullable

Parent document ID

projectIdstring uuid required

Project ID

publishedIdstring uuid nullable

Currently published version ID

publishedAtstring nullable

Publication timestamp

updatedAtstring

Last update timestamp

deletedAtstring nullable

Deletion timestamp if soft deleted