Skip to main content
POST
/
api
/
v1
/
collections
Create Collection
curl --request POST \
  --url https://api.example.com/api/v1/collections \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "description": "<string>",
  "store_type": "<string>",
  "visibility": "private",
  "status": "active",
  "tags": [
    "<string>"
  ],
  "parent_id": "<string>",
  "stats": {},
  "meta_data": {},
  "settings": {},
  "embedding": {},
  "source_type": "document",
  "source_id": "<string>"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "workspace_id": "<string>",
  "created_at": "<string>",
  "updated_at": "<string>",
  "description": "<string>",
  "store_type": "<string>",
  "visibility": "private",
  "status": "active",
  "tags": [
    "<string>"
  ],
  "parent_id": "<string>",
  "stats": {},
  "meta_data": {},
  "settings": {},
  "embedding": {},
  "source_type": "document",
  "source_id": "<string>",
  "created_by": "<string>"
}

Authorizations

Authorization
string
header
required

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

Headers

X-Workspace-Id
string | null

The workspace ID

Body

application/json

Schema for creating a new collection.

name
string
required

Collection name

Required string length: 1 - 100
description
string | null

Collection description

Maximum string length: 255
store_type

Storage type for the collection

visibility
string
default:private

Collection visibility (private/public)

status
string
default:active

Collection status

tags
string[] | null

Collection tags for organization

parent_id
string | null

Reference to parent collection

stats
Stats · object

Collection statistics

meta_data
Meta Data · object

Collection metadata

settings
Settings · object

Collection configuration settings

embedding
EmbeddingModelSettings · object

Embedding configuration

source_type
string | null
default:document

Collection source type

source_id
string | null

Collection source ID

Response

Successful Response

Schema for reading collection data.

id
string
required

Collection ID

name
string
required

Collection name

Required string length: 1 - 100
workspace_id
string
required

Reference to workspace

created_at
string | null
updated_at
string | null
description
string | null

Collection description

Maximum string length: 255
store_type

Storage type for the collection

visibility
string
default:private

Collection visibility (private/public)

status
string
default:active

Collection status

tags
string[] | null

Collection tags for organization

parent_id
string | null

Reference to parent collection

stats
Stats · object

Collection statistics

meta_data
Meta Data · object

Collection metadata

settings
Settings · object

Collection configuration settings

embedding
EmbeddingModelSettings · object

Embedding configuration

source_type
string | null
default:document

Collection source type

source_id
string | null

Collection source ID

created_by
string | null

User who created the collection