---
title: "Create document"
method: POST
path: "/ai/documents"
tags: ["AI - Documents"]
---

# Create document

`POST /ai/documents`

Create a new AI document

## Request body

- object — Request body schema.
  - `uuid` string, uuid, required — Document identifier.
  - `kind` 'text' | 'code' | 'sheet' | 'image', required — Document kind.
  - `title` string, required — Document title.
  - `content` string, required — Document content.

## Response `200`

Successful response

- object
  - `document` object, required — Created document details.
    - `uuid` string, required
    - `workspaceUuid` string, required
    - `userUuid` string, required
    - `title` string, nullable, required
    - `content` string, required
    - `kind` 'text' | 'code' | 'sheet' | 'image', required
    - `createdAt` string, required
    - `deletedAt` string, nullable, required

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `404` — Not found
- `500` — Internal server error

---

[API](https://skmtc.net/getcargo/apis/cargo-api.md) · [All operations](https://skmtc.net/getcargo/apis/cargo-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/getcargo/cargo-api/revisions/1d5a19e01d83/schema)
