Skip to main content
POST
/
api
/
v1
/
collections
/
add
Create a collection
curl --request POST \
  --url https://app.aigmented.com/api/v1/collections/add \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Q4 2024 Contracts"
}
'
{
  "message": "Collection added",
  "data": {
    "id": 123,
    "name": "<string>",
    "status": "<string>",
    "publish_disabled": true,
    "uploaded_at": "2023-11-07T05:31:56Z",
    "user": {
      "id": "<string>",
      "email": "<string>",
      "name": "<string>"
    },
    "_count": {
      "knowledgeCards": 123,
      "fileInstances": 123,
      "chats": 123
    }
  }
}

Authorizations

Authorization
string
header
required

Pass your API key as a Bearer token. Example: Authorization: Bearer sk-xxxxxxxxxxxx

Body

application/json
name
string
required

Display name for the collection

Example:

"Q4 2024 Contracts"

Response

Collection created successfully

message
string
Example:

"Collection added"

data
object