POST
/
knowledge-bases
curl --request POST \
  --url https://api.totoy.ai/v1/knowledge-bases \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "name": "Totoy Customer Support Assistant",
  "instructions": "You are a customer support assistant for the customers of the company Totoy.",
  "project_id": "pj_avX7imfLaPcQnv5ckvGlOEBA9"
}'
{
  "knowledge_base_id": "kb_feMfJbeqbAEj4u8K5HqmKpUbY",
  "name": "Totoy Customer Support Assistant",
  "instructions": "You are a customer support assistant for the customers of the company Totoy.",
  "project_id": "pj_avX7imfLaPcQnv5ckvGlOEBA9",
  "created_at": "2023-07-05T12:00:00Z",
  "updated_at": "2023-07-05T12:00:00Z"
}

Authorizations

Authorization
string
header
required

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

Body

application/json
name
string

The name for the Knowledge Base

Maximum length: 256
instructions
string

The instructions for the Knowledge Base.

Maximum length: 4096
project_id
string

The unique identifier for the Project that the Knowledge Base will be assigned to. If no project_id is provided, the Knowledge Base will be assigned to the default Project.

Maximum length: 28

Response

200
application/json
OK
knowledge_base_id
string
required

The unique identifier for the Knowledge Base.

Maximum length: 28
name
string
required

The name for the Knowledge Base.

Maximum length: 256
created_at
string
required

The date-time of when the Knowledge Base was created, in ISO 8601 format.

updated_at
string
required

The date-time of when the Knowledge Base was last modified, in ISO 8601 format.

instructions
string
required

The instructions for the Knowledge Base.

Maximum length: 4096
project_id
string
required

The unique identifier for the Project that the Knowledge Base is assigned to.

Maximum length: 28