Skip to main content
POST
/
documents
Create Document
curl --request POST \
  --url https://api.example.com/documents \
  --header 'Content-Type: application/json' \
  --data '
{
  "text": "<string>",
  "title": "<string>",
  "url": "<string>"
}
'
{
  "id": "<string>"
}

Body

text
string
required
The raw text content of the document.
title
string
An optional title for the document.
url
string
An optional URL specifying where the document originated.

Response

id
string
The ID of the newly created document.
Example Request
{
  "title": "Welcome",
  "text": "Hello world. This is a test document."
}
Example Response
{
  "id": "doc-456",
  "status": "pending"
}