Skip to main content
POST
/
ai
/
documents
Create document
curl --request POST \
  --url https://api.getcargo.io/v1/ai/documents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "uuid": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "kind": "text",
  "title": "<string>",
  "content": "<string>"
}
'
{
  "document": {
    "uuid": "<string>",
    "workspaceUuid": "<string>",
    "userUuid": "<string>",
    "title": "<string>",
    "content": "<string>",
    "kind": "text",
    "createdAt": "<string>",
    "deletedAt": "<string>"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json

Request body schema.

uuid
string<uuid>
required

Document identifier.

Pattern: ^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$
kind
enum<string>
required

Document kind.

Available options:
text,
code,
sheet,
image
title
string
required

Document title.

content
string
required

Document content.

Response

Successful response

document
Document · object
required

Created document details.