POST
/
collections
curl --request POST \
  --url https://api.portkey.ai/v1/collections \
  --header 'Content-Type: application/json' \
  --header 'x-portkey-api-key: <api-key>' \
  --data '{
  "workspace_id": "<string>",
  "name": "<string>",
  "parent_collection_id": "<string>"
}'
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "slug": "<string>"
}

Authorizations

x-portkey-api-key
string
header
required

Body

application/json
name
string
required

Name of the collection

workspace_id
string

ID or slug of the workspace

parent_collection_id
string

ID or slug of the parent collection (optional)

Response

200
application/json
Collection created successfully
id
string

ID of the created collection

slug
string

Slug of the created collection