Skip to main content
POST
/
api
/
documents
/
assistant
/
folders
Create a new folder
curl --request POST \
  --url https://api.example.com/api/documents/assistant/folders \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <x-api-key>' \
  --data '
{
  "name": "Product Documentation"
}
'
{
  "id": "550e8400-e29b-41d4-a716-446655440000",
  "name": "Product Documentation",
  "icon": "📚",
  "sort_order": 0,
  "client_id": "<string>",
  "created_at": "2024-01-15T10:00:00.000Z"
}

Headers

x-api-key
string
required

API key needed to authorize the request

Body

application/json

Folder details

name
string
required

Folder name

Example:

"Product Documentation"

icon
string

Optional icon/emoji for the folder

Example:

"📚"

sort_order
number

Optional sort order (default: 0)

Example:

0

parent_folder_id
string

Optional parent folder ID for nested folders

Example:

null

Response

Folder created successfully.

id
string
Example:

"550e8400-e29b-41d4-a716-446655440000"

name
string
Example:

"Product Documentation"

icon
string
Example:

"📚"

sort_order
number
Example:

0

client_id
string
created_at
string
Example:

"2024-01-15T10:00:00.000Z"