API reference · Playground
Add a document to a project
POST/api/conversations/folders/{id}/documentsSigned in session
The text the browser read from a file (the bytes never reach the server). At most 5 documents and 60000 characters a project.
Parameters
| Field | Type | What it is |
|---|---|---|
| id (path)required | integer | The project (folder) id. |
Request body
application/json, required
| Field | Type | What it is |
|---|---|---|
| namerequired | string | |
| kindrequired | string | |
| textrequired | string |
Example
{
"name": "string",
"kind": "string",
"text": "string"
}Answer 201
Added.
| Field | Type | What it is |
|---|---|---|
| document | object |
Errors
- 400OpenAI shaped error.
- 401OpenAI shaped error.
- 404OpenAI shaped error.
- 409OpenAI shaped error.
- 429OpenAI shaped error.
Every error answers in one shape, with its type, code and the field it names. The whole list is in the docs' Errors section.