Skip to main content
PATCH
/
projects
/
{project_id}
Modifies a Project.
curl --request PATCH \
  --url https://api.totoy.ai/v1/projects/{project_id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "Totoy LLC Project"
}
'
{
  "project_id": "pj_avX7imfLaPcQnv5ckvGlOEBA9",
  "name": "Totoy LLC Project",
  "created_at": "2023-07-05T12:34:13Z",
  "updated_at": "2024-01-05T12:00:00Z",
  "knowledge_base_ids": [
    "kb_feMfJbeqbAEj4u8K5HqmKpUbY",
    "kb_kfjd34sfgsd2gfskijuh23zgt"
  ],
  "source_ids": [
    "src_oXiYDg8QOc9JsOk86idRXiywD",
    "src_qoY7rSGkiWtn4NP8kPXc7xzrq"
  ],
  "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.

Path Parameters

project_id
string
required

Unique identifier for a Project created in Totoy.

Maximum string length: 28

Body

application/json

Request body for modifying a Project.

name
string

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
}