Skip to main content
PATCH
/
v1
/
documents
/
{id}
Update a document
curl --request PATCH \
  --url http://localhost:3000/v1/documents/{id} \
  --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...)

Path Parameters

id
string
required

Document ID

Body

application/json
title
string

New title for the document

content
string

New content for the document

folderId
string

New folder ID for the document

Response

Document updated 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