Skip to main content
POST
/
v1
/
documents
Create a new document
curl --request POST \
  --url http://localhost:3000/v1/documents \
  --header 'Authorization: <api-key>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "title": "<string>",
  "content": "<string>",
  "folderId": "<string>"
}
'
{
  "id": "<string>",
  "title": "<string>",
  "content": "<string>",
  "folderId": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

API Key (sk...)

Body

application/json
title
string
required

Title of the document

content
string
required

Content of the document

folderId
string

Optional folder ID to place the document in

Response

Document created successfully

id
string

Unique identifier for the document

title
string

Title of the document

content
string

Content of the document

folderId
string

ID of the folder containing this document

createdAt
string<date-time>

Timestamp when the document was created

updatedAt
string<date-time>

Timestamp when the document was last updated