Skip to main content
POST
/
projects
Creates a Project.
curl --request POST \
  --url https://api.totoy.ai/v1/projects \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Totoy GmbH Project"
}
'
{
  "project_id": "pj_avX7imfLaPcQnv5ckvGlOEBA9",
  "name": "Totoy GmbH Project",
  "created_at": "2023-07-05T12:34:13Z",
  "updated_at": "2023-07-05T12:34:13Z",
  "knowledge_base_ids": [],
  "source_ids": [],
  "is_default": false,
  "usage": {
    "assistant_messages": {
      "knowledge_bases_chats": 1354,
      "explanations": 1234,
      "total": 2588
    },
    "document_sources_pages": 2534,
    "text_sources": 3756
  }
}

Authorizations

Authorization
string
header
required

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

Body

application/json
name
string
required

The name of the Project.

Maximum string length: 256
Example:

"Totoy GmbH Project"

Response

OK

A project is a collection of Sources and Knowledge Bases with the same lifespan. If a project is deleted, all associated resources will also be deleted. Explanations can also be assigned to Projects for billing purposes.

project_id
string
required

The unique identifier of a Project

Maximum string length: 28
Example:

"pj_avX7imfLaPcQnv5ckvGlOEBA9"

name
string
required

The name of the Project

Maximum string length: 256
Example:

"Totoy GmbH Project"

created_at
string<date-time>
required

Date-time of when the Project was created, in ISO 8601 format

Example:

"2023-07-05T12:34:13Z"

updated_at
string<date-time>
required

Date-time of when the Project was last modified, in ISO 8601 format

Example:

"2023-07-05T12:34:13Z"

knowledge_base_ids
string[]
required

A list of knowledge_base_ids that are assigned to the Project. One Project can have multiple Knowledge Bases.

Maximum array length: 1500
Maximum string length: 28
Example:
[]
source_ids
string[]
required

A list of source_ids of Sources that are assigned to the Project.

Maximum array length: 10000

Unique identifier for a Source that is assigned to the Project.

Maximum string length: 29
Example:
[
  "src_oXiYDg8QOc9JsOk86idRXiywD",
  "src_qoY7rSGkiWtn4NP8kPXc7xzrq"
]
is_default
boolean
required

Whether the Project is the default Project for the Organization. The default Project is used when no Project is specified in an API request. The default Project cannot be deleted.

Example:

false

usage
object

The usage of the Project.

Example:
{
  "assistant_messages": {
    "knowledge_bases_chats": 1354,
    "explanations": 1234,
    "total": 2588
  },
  "document_sources_pages": 2534,
  "text_sources": 3756
}