{ "openapi": "3.0.2", "info": { "title": "CustomGPT.ai", "description": "API Documentation for CustomGPT.ai.", "contact": { "name": "CustomGPT.ai", "url": "https:\/\/app.customgpt.ai", "email": "hello@customgpt.ai" }, "version": "1.0.0" }, "servers": [ { "url": "https:\/\/app.customgpt.ai", "description": "API Version 1" } ], "paths": { "\/api\/v1\/projects": { "get": { "tags": [ "Agents" ], "summary": "List all agents.", "description": "Returns a list of your agents (formerly known as projects). The agents are returned sorted by creation date, with the most recent agents appearing first. It is a paginated API and you can use the page parameter to fetch the next page of agents. The default page size is 10.\n\nHere is an example to list agents: using [API](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/List_all_projects_for_an_account_with_pagination.ipynb) and using our python [SDK](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/SDK_List_all_projects_using_pagination.ipynb).", "parameters": [ { "name": "page", "in": "query", "description": "Page number to return", "required": false, "schema": { "default": 1, "type": "integer", "example": 1 } }, { "name": "duration", "in": "query", "description": "The duration of the agents to list.", "required": false, "schema": { "type": "integer" }, "example": 90 }, { "name": "order", "in": "query", "description": "The order of the agents to list. Defaults to desc.", "required": false, "schema": { "enum": [ "asc", "desc" ], "default": "desc", "type": "string", "example": "desc" } }, { "name": "orderBy", "in": "query", "description": "The orderBy to sort the results by given field", "required": false, "schema": { "enum": [ "id", "created_at" ], "default": "id", "type": "string", "example": "id" } }, { "name": "width", "in": "query", "description": "The width of the embed code. Defaults to 100%.", "required": false, "schema": { "default": "100%", "type": "string", "example": "50rem" } }, { "name": "height", "in": "query", "description": "The height of the embed code. Defaults to 100%.", "required": false, "schema": { "default": "auto", "type": "string", "example": "50rem" } }, { "name": "name", "in": "query", "description": "Filter the results by agent name", "required": false, "schema": { "type": "string", "example": "Sample agent" } } ], "responses": { "200": { "description": "Successfully retrieved list of agents that belong to the user.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "current_page": { "description": "The current page number", "type": "integer", "example": 1 }, "data": { "type": "array", "items": { "$ref": "#\/components\/schemas\/Project" } }, "first_page_url": { "description": "The first page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "from": { "description": "The first item number of the current page", "type": "integer", "example": 1 }, "last_page": { "description": "The last page number", "type": "integer", "example": 1 }, "last_page_url": { "description": "The last page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "next_page_url": { "description": "The next page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "path": { "description": "The current page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "per_page": { "description": "The number of items per page", "type": "integer", "example": 10 }, "prev_page_url": { "description": "The previous page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "to": { "description": "The last item number of the current page", "type": "integer", "example": 1 }, "total": { "description": "The total number of items", "type": "integer", "example": 1 } } } } } } } }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] }, "post": { "tags": [ "Agents" ], "summary": "Create a new agent.", "description": "Create a new agent by importing data either from a sitemap or an uploaded file. This endpoint enables you to initiate the creation of a new agent by supplying the necessary agent data that will be used as the context. You can choose to import the agent knowledge and content from a sitemap url or upload a specific file format that contains the context can be any text, audio or video format. The system will process the provided data and generate a new agent based on the imported or uploaded information.\nHere is an example to create an agent using a sitemap: [API](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/Create_Bot_By_Sitemap.ipynb) [SDK](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/SDK_Create_Bot_By_Sitemap.ipynb).", "requestBody": { "description": "Create a new agent from a sitemap or a file", "content": { "multipart\/form-data": { "schema": { "type": "object", "properties": { "project_name": { "description": "Agent name", "type": "string", "example": "My agent" }, "sitemap_path": { "description": "The sitemap path", "type": "string", "example": "https:\/\/example.com\/sitemap.xml" }, "file_data_retension": { "description": "File data retension", "type": "boolean", "example": true }, "is_ocr_enabled": { "description": "OCR enabled", "type": "boolean", "example": false }, "is_anonymized": { "description": "Anonymized", "type": "boolean", "example": false }, "file": { "description": "The submitted file.", "format": "binary", "type": "string", "example": "file.pdf" } } } } } }, "responses": { "201": { "$ref": "#\/components\/responses\/ProjectCreatedResponse" }, "400": { "$ref": "#\/components\/responses\/CreateProjectErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}": { "get": { "tags": [ "Agents" ], "summary": "Show a certain agent.", "description": "Retrieve details of an agent (formerly known as project) based on its unique project ID. This endpoint allows you to fetch specific information about an agent.", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique agent identifier.", "required": true, "schema": { "type": "integer", "example": 1 } }, { "name": "width", "in": "query", "description": "The width of the embed code. Defaults to 100%.", "required": false, "schema": { "default": "100%", "type": "string", "example": "50rem" } }, { "name": "height", "in": "query", "description": "The height of the embed code. Defaults to 100%.", "required": false, "schema": { "default": "auto", "type": "string", "example": "50rem" } } ], "responses": { "200": { "$ref": "#\/components\/responses\/ListProjectResponse" }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] }, "post": { "tags": [ "Agents" ], "summary": "Update a certain agent.", "description": "Update an agent (formerly known as project) with specific details based on its unique projectId. This endpoint allows you to modify and revise the information associated with a particular agent\nHere is an example to a update a specific object: [API](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/Update%20a%20project%20name.ipynb) [SDK](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/SDK_Update_a_project_name.ipynb).", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique identifier of the agent (formerly known as project).", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "description": "Update an agent", "content": { "multipart\/form-data": { "schema": { "type": "object", "properties": { "project_name": { "description": "Agent name", "type": "string", "example": "My agent" }, "is_shared": { "description": "Whether the agent is public or not", "type": "boolean", "example": true }, "sitemap_path": { "description": "Sitemap path", "type": "string", "example": "https:\/\/example.com\/sitemap.xml" }, "file_data_retension": { "description": "File data retension", "type": "boolean", "example": true }, "is_ocr_enabled": { "description": "OCR enabled", "type": "boolean", "example": false }, "is_anonymized": { "description": "Anonymized", "type": "boolean", "example": false }, "file": { "description": "File", "format": "binary", "type": "string", "example": "file.pdf" }, "are_licenses_allowed": { "description": "Whether project licenses are allowed", "default": false, "type": "boolean", "example": true } } } } } }, "responses": { "200": { "$ref": "#\/components\/responses\/UpdateProjectResponse" }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] }, "delete": { "tags": [ "Agents" ], "summary": "Delete a certain agent.", "description": "Delete an agent (formerly known as project) by its unique project ID. This endpoint allows you to remove an existing agent from the system based on its ID.\nHere is an example to delete an agent: [API](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/Delete_a_project.ipynb) [SDK](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/SDK_Delete_a_project.ipynb).", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique identifier of the agent (formerly known as project).", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "$ref": "#\/components\/responses\/DeleteProjectResponse" }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/replicate": { "post": { "tags": [ "Agents" ], "summary": "Replicate agent by given ID.", "description": "Replicate an agent (formerly known as project) by copying the agent info, settings, sitemap sources and uploaded files. This endpoint enables you to initiate the replication of an agent by supplying the necessary ID. The system will process the replicated data and generate a new agent based on the information of existing agent.", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique agent identifier.", "required": true, "schema": { "type": "integer", "example": 1 } } ], "responses": { "201": { "$ref": "#\/components\/responses\/ProjectCreatedResponse" }, "400": { "$ref": "#\/components\/responses\/CreateProjectErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/chat\/completions": { "post": { "tags": [ "Conversations" ], "summary": "Send a message to a conversation in openai format.", "description": "Send a message to a conversation within an agent (formerly known as project) identified by its unique projectId and sessionId. This endpoint enables you to send a new message to a specific conversation, facilitating seamless communication and collaboration within the agent. By providing the projectId and sessionId, you can target the desired conversation and contribute to the ongoing discussion. This API endpoint supports real-time streaming, allowing for instant message delivery and dynamic updates which enables efficient and interactive communication between the user and agent.\nHere is an example to send a message to a conversation: [API](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/Create_a_new_conversation_and_send_a_message_to_the_conversation.ipynb) [SDK](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/SDK_Create_a_new_conversation_and_send_a_message_to_the_conversation.ipynb).", "parameters": [ { "name": "projectId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "description": "Send a message in OpenAI chat completion format.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "messages": { "description": "The messages to send to OpenAI", "type": "array", "items": { "type": "object", "properties": { "role": { "enum": [ "system", "user", "assistant" ], "type": "string" }, "content": { "type": "string" } } } }, "model": { "description": "ID of the model to use", "type": "string", "nullable": true }, "stream": { "description": "Whether to stream the response", "default": false, "type": "boolean" }, "lang": { "description": "Response language", "default": "en", "type": "string" }, "external_id": { "description": "External identifier", "type": "string", "nullable": true }, "is_inline_citation": { "description": "Whether to include inline citations", "default": false, "type": "boolean" } } } } } }, "responses": { "200": { "$ref": "#\/components\/responses\/SendConversationMessageOpenAI" }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectNotFoundErrorResponse" }, "429": { "$ref": "#\/components\/responses\/SendMessageResourceExhaustedErrorResponse" }, "501": { "$ref": "#\/components\/responses\/UnsupportedArgumentsResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/stats": { "get": { "tags": [ "Agents" ], "summary": "Get the stats for a certain agent.", "description": "Retrieve statistical data for an agent (formerly known as project) using its unique projectId. This endpoint provides extensive statistics about the agent's performance, activity, or other relevant metrics.\nHere is an example to a specific object stats: [API](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/Get_Project_Stats.ipynb) [SDK](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/SDK_Get_Project_Stats.ipynb).", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique identifier of the agent (formerly known as project).", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "$ref": "#\/components\/responses\/ProjectStatsResponse" }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/pages": { "get": { "tags": [ "Pages" ], "summary": "List all pages that belong to an agent.", "description": "Retrieve a list of all pages associated with an agent (formerly known as project). This endpoint allows you to fetch agent details and a collection of pages that belong to a specific agent. Each page object includes information such as the page ID, URL, hash of the URL, agent ID, crawl status, index status, file details (if applicable), creation and update timestamps, and other relevant attributes.\nHere is an example to list all pages belonging to agent: [API](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/List_all_pages_of_a_project.ipynb) [SDK](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/SDK_List_all_pages_belonging_to_a_project.ipynb).", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique agent identifier.", "required": true, "schema": { "type": "integer", "example": 1 } }, { "name": "page", "in": "query", "description": "Page number to return", "required": false, "schema": { "default": 1, "type": "integer" } }, { "name": "limit", "in": "query", "description": "Limit the number of documents to return. Defaults to 20.", "required": false, "schema": { "default": 20, "type": "integer" } }, { "name": "order", "in": "query", "description": "The order of the documents to list. Sorts by page ID.", "required": false, "schema": { "enum": [ "asc", "desc" ], "default": "desc", "type": "string" } }, { "name": "crawl_status", "in": "query", "description": "The crawl status of the documents to list.", "required": false, "schema": { "enum": [ "all", "ok", "failed", "n\/a", "queued", "limited" ], "default": "all", "type": "string" } }, { "name": "index_status", "in": "query", "description": "The index status of the documents to list.", "required": false, "schema": { "enum": [ "all", "ok", "failed", "n\/a", "queued", "limited" ], "default": "all", "type": "string" } } ], "responses": { "200": { "description": "List of pages successfully retrieved.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "project": { "$ref": "#\/components\/schemas\/Project" }, "pages": { "type": "object", "properties": { "current_page": { "description": "The current page number", "type": "integer", "example": 1 }, "data": { "type": "array", "items": { "$ref": "#\/components\/schemas\/Page" } }, "first_page_url": { "description": "The first page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "from": { "description": "The first item number of the current page", "type": "integer", "example": 1 }, "last_page": { "description": "The last page number", "type": "integer", "example": 1 }, "last_page_url": { "description": "The last page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "next_page_url": { "description": "The next page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "path": { "description": "The current page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "per_page": { "description": "The number of items per page", "type": "integer", "example": 10 }, "prev_page_url": { "description": "The previous page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "to": { "description": "The last item number of the current page", "type": "integer", "example": 1 }, "total": { "description": "The total number of items", "type": "integer", "example": 1 } } } } } } } } } }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/pages\/{pageId}": { "delete": { "tags": [ "Pages" ], "summary": "Delete a certain page that belongs to a certain agent.", "description": "Delete a specific page within an agent (formerly known as project) based on its unique projectId and pageId. This endpoint allows you to remove a particular page from the agent, permanently deleting its associated context.\nHere is an example to delete a certain page: [API](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/Delete_a_page_from_the_project.ipynb) [SDK](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/SDK_Delete_a_project_page.ipynb).", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique identifier of the agent (formerly known as project).", "required": true, "schema": { "type": "integer" } }, { "name": "pageId", "in": "path", "description": "The page id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "$ref": "#\/components\/responses\/DeleteProjectResponse" }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/pages\/{pageId}\/reindex": { "post": { "tags": [ "Pages" ], "summary": "Reindex a certain page that belongs to a certain agent.", "description": "Reindex a specific page within an agent (formerly known as project) based on its unique projectId and pageId. This endpoint allows you to refresh a particular page from the agent. Our system will crawl and index page content newly.", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique identifier of the agent (formerly known as project).", "required": true, "schema": { "type": "integer" } }, { "name": "pageId", "in": "path", "description": "The page id", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Updating Document with the new content", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "updated": { "description": "Whether the process to update the Document started successfully or not", "type": "boolean", "example": true } } } } } } } }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "403": { "$ref": "#\/components\/responses\/PageReindexErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/pages\/{pageId}\/metadata": { "get": { "tags": [ "Pages Metadata" ], "summary": "Get the Metadata for a certain page.", "description": "Retrieve the Metadata for a page based on its unique identifier. This endpoint allows you to fetch the metadata associated with a specific page.", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique identifier of the agent (formerly known as project).", "required": true, "schema": { "type": "integer" } }, { "name": "pageId", "in": "path", "description": "The unique identifier of the page.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "description": "Get the document metadata data for a citation", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/PageMetadata" } } } } } }, "400": { "$ref": "#\/components\/responses\/CreatePageMetadataErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/PageNotFoundErrorResponse" } }, "security": [ { "BearerToken": [] } ] }, "put": { "tags": [ "Pages Metadata" ], "summary": "Update metadata for a certain page.", "description": "Update the metadata for a specific page identified by its unique pageId. This endpoint allows you to update the associated metadata of the page.", "parameters": [ { "name": "projectId", "in": "path", "description": "The id of an agent (formerly known as project) in which page is stored.", "required": true, "schema": { "type": "integer" } }, { "name": "pageId", "in": "path", "description": "The id of a page in which metadata will be updated.", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "description": "Update a page metadata", "content": { "application\/json": { "schema": { "type": "object", "properties": { "title": { "description": "The title of the document used in citations", "type": "string", "maxLength": 255, "nullable": true, "example": "Title" }, "url": { "description": "The url of the document used in citations", "type": "string", "maxLength": 2000, "nullable": true, "example": "https:\/\/example.com\/" }, "description": { "description": "The description of the document used in citations", "type": "string", "maxLength": 500, "nullable": true, "example": "One to two sentences." }, "image": { "description": "The url of the image used in citations", "type": "string", "maxLength": 2000, "nullable": true, "example": "https:\/\/example.com\/image.png" } } } } } }, "responses": { "200": { "description": "Get the document metadata data for a citation", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/PageMetadata" } } } } } }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/PageNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/settings": { "get": { "tags": [ "Agent Settings" ], "summary": "Get agent settings.", "description": "Retrieve the agent (formerly known as project) settings for a specific agent. This endpoint allows you to fetch the configuration and settings associated with the project.\nHere is an example to get an agent settings: [API](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/Get_Settings_for_a_particular_project.ipynb) [SDK](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/SDK_Get_settings_for_a_particular_project.ipynb).", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique identifier of the agent (formerly known as project).", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "$ref": "#\/components\/responses\/ListProjectSettingsResponse" }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] }, "post": { "tags": [ "Agent Settings" ], "summary": "Update agent settings.", "description": "Update the agent (formerly known as project) settings for a specific agent. This endpoint allows you to update the configuration and settings associated with the agent.\nHere is an example to get an agent settings: [API](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/Update_settings_for_a_particular_project.ipynb) [SDK](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/SDK_Update_project_settings.ipynb).", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique identifier of the agent (formerly known as project).", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "description": "Update agent settings", "content": { "multipart\/form-data": { "schema": { "properties": { "chat_bot_avatar": { "description": "This is the avatar that is shown in the agent response. You can make it a profile picture or your company logo.", "format": "binary", "type": "string", "example": "avatar.png" }, "chat_bot_bg": { "description": "This is the background image shown in the agent conversations widget. You can change it to a company logo or background image.", "format": "binary", "type": "string", "example": "bg.png" }, "default_prompt": { "description": "This is the default prompt shown to the user. You can customize this for your company or client.", "type": "string", "maxLength": 255, "example": "How can I help you?" }, "example_questions[]": { "description": "These are example questions shown to guide users. You can create customized questions to suit your company or client needs.", "type": "array", "items": { "type": "string", "example": "How can I help you?" } }, "response_source": { "description": "By default, we ask ChatGPT to use only your content in its response (recommended). If you wish ChatGPT to improvise and use its own knowledgebase as well, you can select \"My Content + ChatGPT\"", "enum": [ "default", "own_content", "openai_content" ], "type": "string", "maxLength": 255, "example": "own_content" }, "chatbot_msg_lang": { "description": "By default, the agent messages like 'Ask Me Anything' are in English. You can customize this to your preferred language. Please note: This setting does not control what language ChatGPT responds in. That is controlled by the user's question. So a user asking in Portuguese, will most likely get a response from ChatGPT in Portuguese.", "enum": [ [ "sq", "ar", "hy", "az", "ba", "eu", "be", "bn", "bh", "bs", "pt-BR", "bg", "yue", "ca", "hne", "hr", "cs", "da", "doi", "nl", "en", "et", "fo", "fi", "fr", "gl", "ka", "de", "el", "gu", "hry", "he", "hi", "hu", "id", "ga", "it", "ja", "jv", "kn", "ks", "kk", "kok", "ko", "ky", "lv", "lt", "mk", "mai", "ms", "mt", "cmn", "mr", "mwr", "nan", "mo", "mn", "me", "ne", "no", "or", "ps", "fa", "pl", "pt", "pa", "raj", "ro", "ru", "sa", "sat", "sr", "sd", "si", "sk", "sl", "es", "sw", "sv", "tg", "ta", "tt", "te", "th", "tr", "tk", "uk", "ur", "uz", "vi", "cy", "wuu" ] ], "type": "string", "maxLength": 255, "example": "en" }, "chatbot_color": { "description": "Color of the agent in hex format", "type": "string", "maxLength": 9, "example": "#000000" }, "chatbot_toolbar_color": { "description": "Color of the agent toolbar in hex format", "type": "string", "maxLength": 9, "example": "#000000" }, "persona_instructions": { "description": "Customize your agent behavior by adjusting the system parameter to control its personality traits and role.", "type": "string", "maxLength": 12000, "nullable": true, "example": "You are a custom AI Agent called CustomGPT.ai, a friendly lawyer who answers questions based on the given context." }, "citations_answer_source_label_msg": { "description": "This is the message shown to indicate where the response came from. You can customize this message based on your business or language.", "type": "string", "maxLength": 255, "nullable": true, "example": "Where did this answer come from?" }, "citations_sources_label_msg": { "description": "This is the message shown for the Sources label. You can customize this message based on your business or language.", "type": "string", "maxLength": 255, "nullable": true, "example": "Sources" }, "hang_in_there_msg": { "description": "This is the message shown when the agent is thinking and waiting to answer. You can customize this message based on your tone, personality or language.", "type": "string", "maxLength": 255, "nullable": true, "example": "Hang in there! I'm thinking.." }, "chatbot_siesta_msg": { "description": "This is the message shown when the agent has encountered a problem or error. You can customize this message based on your tone, personality or language.", "type": "string", "maxLength": 255, "nullable": true, "example": "Oops! The agent is taking a siesta. We are aware of this and will get it back soon! Please try again later." }, "is_loading_indicator_enabled": { "description": "Show animated loading indicator while waiting for a response from the agent", "default": true, "type": "boolean", "nullable": true, "example": true }, "enable_citations": { "description": "Each agent response shows an option for the user to see the sources\/citations from your content from which the response was generated.", "enum": [ 0, 1, 2, 3 ], "default": 3, "type": "integer", "nullable": true, "example": 3 }, "enable_feedbacks": { "description": "Each agent response shows an thumbs up\/down for the user to left own feedback.", "default": true, "type": "boolean", "nullable": true, "example": true }, "citations_view_type": { "description": "Control how citations are shown. By default, the user can initiate to see the citations. You can choose to have it \"Auto Shown\" or \"Auto Hide\"", "enum": [ "user", "show", "hide" ], "default": "user", "type": "string", "nullable": true, "example": "user" }, "image_citation_display": { "description": "Controls how images are displayed in citations. Default displays like regular citations, first_only inserts the image below the first paragraph where referenced, all inserts the image below all referenced paragraphs.", "enum": [ "default", "first_only" ], "default": "default", "type": "string", "nullable": true, "example": "default" }, "no_answer_message": { "description": "This is the message shown when the agent cannot answer. You can customize it to a message asking the user to contact customer support or leave their email \/ phone.", "default": "I'm sorry, I don't know the answer", "type": "string", "maxLength": 1000, "nullable": true, "example": "Sorry, I don't have an answer for that." }, "ending_message": { "description": "You can instruct ChatGPT to end every response with some text like asking \"Please email us for further support\" (Not recommended for most use cases)", "type": "string", "maxLength": 1000, "nullable": true, "example": "Please email us for further support" }, "try_asking_questions_msg": { "description": "This is the message shown to the user to encourage them to ask questions. You can customize this message based on your tone, personality or language.", "default": "Try asking these questions...", "type": "string", "maxLength": 255, "nullable": true, "example": "Try asking these questions..." }, "view_more_msg": { "description": "This is the message shown to the user to view more starter questions. You can customize this message based on your tone, personality or language.", "default": "View more", "type": "string", "maxLength": 255, "nullable": true, "example": "View more" }, "view_less_msg": { "description": "This is the message shown to the user to view less starter questions. You can customize this message based on your tone, personality or language.", "default": "View less", "type": "string", "maxLength": 255, "nullable": true, "example": "View less" }, "remove_branding": { "description": "Controls what branding is shown at the bottom of the agent.", "default": false, "type": "boolean", "nullable": true, "example": false }, "enable_recaptcha_for_public_chatbots": { "description": "Should we check messages from guests with Recaptcha when your agent is publicly available (i.e. shared or embedded).", "default": false, "type": "boolean", "nullable": true, "example": false }, "chatbot_model": { "description": "This is the model used by the agent. You can choose a different model to suit your needs.", "enum": [ "gpt-4-o", "gpt-4-1", "gpt-4o-mini", "gpt-4-1-mini", "claude-3-sonnet", "claude-3.5-sonnet", "gpt-o4-mini-low", "gpt-o4-mini-medium", "gpt-o4-mini-high" ], "type": "string", "nullable": true, "example": "gpt-4-o" }, "is_selling_enabled": { "description": "Enable selling of the agent for monetization", "default": false, "type": "boolean", "nullable": true, "example": false }, "can_share_conversation": { "description": "Toggle conversation sharing.", "default": false, "type": "boolean", "nullable": true, "example": false }, "can_export_conversation": { "description": "Toggle export sharing.", "default": false, "type": "boolean", "nullable": true, "example": false }, "hide_sources_from_responses": { "description": "Should the agent mention source names?", "default": true, "type": "boolean", "nullable": true, "example": true }, "agent_capability": { "description": "Agent capability", "enum": [ "fastest-responses", "optimal-choice", "advanced-reasoning", "complex-tasks" ], "type": "string", "nullable": true, "example": "fastest-responses" }, "input_field_addendum": { "description": "You can add URL for your Terms of Service here, and it will be automatically added to your agent's interface.", "default": "", "type": "string", "maxLength": 100, "nullable": true }, "user_avatar_enabled": { "description": "Enable user avatar", "default": false, "type": "boolean", "example": false }, "user_avatar": { "description": "User avatar", "format": "binary", "type": "string", "nullable": true, "example": "avatar.png" }, "spotlight_avatar_enabled": { "description": "Enable spotlight avatar", "default": false, "type": "boolean", "example": false }, "spotlight_avatar": { "description": "Spotlight avatar", "default": "spotlight_avatar.png", "format": "binary", "type": "string", "nullable": true }, "spotlight_avatar_shape": { "description": "Spotlight avatar shape", "enum": [ "circle", "rectangle" ], "default": "rectangle", "type": "string", "nullable": true, "example": "rectangle" }, "spotlight_avatar_type": { "description": "Spotlight avatar type", "enum": [ "default", "image" ], "default": "default", "type": "string", "nullable": true, "example": "default" }, "user_avatar_orientation": { "description": "Avatars orientation", "enum": [ "agent-left-user-right", "agent-right-user-right", "agent-right-user-left", "agent-left-user-left" ], "default": "agent-left-user-right", "type": "string", "nullable": true }, "chatbot_title": { "description": "Chatbot title", "default": "", "type": "string", "maxLength": 30, "nullable": true }, "chatbot_title_color": { "description": "Chatbot title color, HEX color code", "default": "#000000", "type": "string", "nullable": true, "example": "#000000" }, "enable_inline_citations_api": { "description": "Should the citations be shown inline in the response?", "default": false, "type": "boolean", "nullable": true, "example": false }, "conversation_time_window": { "description": "Defines the maximum duration of a conversation. If set to false, users can continue the conversation beyond 24 hours, but the agent will ignore messages older than 24 hours. If set to true, the agent will consider messages older than 24 hours.", "default": false, "type": "boolean", "nullable": true, "example": false }, "conversation_retention_period": { "description": "Period after which we automatically delete all conversations.", "enum": [ "custom", "year", "never" ], "default": "year", "type": "string", "example": "year" }, "conversation_retention_days": { "description": "Custom period in days after which we automatically delete all conversations.", "default": 0, "type": "integer", "example": 180 }, "use_context_aware_starter_question": { "description": "Use context-aware starter question", "default": false, "type": "boolean", "nullable": true, "example": false }, "enable_agent_knowledge_base_awareness": { "description": "Enable agent knowledge base awareness", "default": true, "type": "boolean", "example": true }, "markdown_enabled": { "description": "Enable Markdown support in the agent responses. This allows for rich text formatting in the agent responses, such as bold, italics, lists, and links.", "default": true, "type": "boolean", "nullable": true, "example": true } } } } } }, "responses": { "200": { "$ref": "#\/components\/responses\/UpdateProjectSettingsResponse" }, "400": { "$ref": "#\/components\/responses\/UpdateProjectSettingsErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/plugins": { "get": { "tags": [ "Agent Plugins" ], "summary": "Show a certain agent plugin.", "description": "Retrieve the plugin details associated with an agent (formerly known as project). This endpoint provides information about the agent plugin.", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique agent id.", "required": true, "schema": { "type": "integer", "example": 1 } } ], "responses": { "200": { "$ref": "#\/components\/responses\/ListProjectPluginResponse" }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectPluginNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] }, "post": { "tags": [ "Agent Plugins" ], "summary": "Create a plugin.", "description": "Create a new plugin for a specific agent (formerly known as project) identified by its unique projectId. This endpoint enables you to create a custom plugin for the project. Which allows you to share the custom agent as openai plugin to be shared globally.", "parameters": [ { "name": "projectId", "in": "path", "description": "The id of an agent (formerly known as project) in which plugin will be stored.", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "description": "Create an agent plugin", "content": { "application\/json": { "schema": { "type": "object", "properties": { "model_name": { "description": "Model Name", "type": "string", "example": "IndoorPlants" }, "human_name": { "description": "Name For Human", "type": "string", "example": "The Indoor Plants Channel" }, "keywords": { "description": "Keywords For Model", "type": "string", "example": "Indoor plants, Gardening, Trusted information." }, "description": { "description": "Description For Human", "type": "string", "example": "Trusted information about indoor plants and gardening." }, "is_active": { "description": "Whether the agent plugin is active or not", "default": false, "type": "boolean", "example": true } } } } } }, "responses": { "201": { "$ref": "#\/components\/responses\/CreateProjectPluginResponse" }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] }, "put": { "tags": [ "Agent Plugins" ], "summary": "Update a plugin.", "description": "Update the plugin configuration for a specific agent (formerly known as project) identified by its unique projectId. This endpoint allows you to update the associated attributes of the plugin.", "parameters": [ { "name": "projectId", "in": "path", "description": "The id of an agent (formerly known as project) in which plugin will be stored.", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "description": "Update an agent plugin", "content": { "application\/json": { "schema": { "type": "object", "properties": { "model_name": { "description": "Model Name", "type": "string", "example": "IndoorPlants" }, "human_name": { "description": "Name For Human", "type": "string", "example": "The Indoor Plants Channel" }, "keywords": { "description": "Keywords For Model", "type": "string", "example": "Indoor plants, Gardening, Trusted information." }, "description": { "description": "Description For Human", "type": "string", "example": "Trusted information about indoor plants and gardening." }, "is_active": { "description": "Whether the agent plugin is active or not", "default": false, "type": "boolean", "example": true } } } } } }, "responses": { "200": { "$ref": "#\/components\/responses\/UpdateProjectPluginResponse" }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectPluginNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/conversations": { "get": { "tags": [ "Conversations" ], "summary": "List all conversations for an agent (formerly known as project).", "description": "Retrieve all conversations associated with an agent based on its unique projectId. This endpoint allows you to fetch a collection of conversations related to a specific agent.", "parameters": [ { "name": "projectId", "in": "path", "description": "The ID of the agent to get the conversations for", "required": true, "schema": { "type": "integer", "example": 1 } }, { "name": "page", "in": "query", "description": "Page number to return", "required": false, "schema": { "default": 1, "type": "integer" } }, { "name": "order", "in": "query", "description": "The order to sort the results in given direction", "required": false, "schema": { "enum": [ "asc", "desc" ], "default": "desc", "type": "string", "example": "desc" } }, { "name": "orderBy", "in": "query", "description": "The orderBy to sort the results by given field", "required": false, "schema": { "enum": [ "id", "created_at" ], "default": "id", "type": "string", "example": "id" } }, { "name": "userFilter", "in": "query", "description": "Filter the results by the user that created the conversation", "required": false, "schema": { "enum": [ "all", "anonymous", "team_member", "me" ], "default": "all", "type": "string", "example": "all" } }, { "name": "name", "in": "query", "description": "Filter the results by conversation name", "required": false, "schema": { "type": "string", "example": "Ask me anything" } } ], "responses": { "200": { "description": "List of conversations for an agent", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "current_page": { "description": "The current page number", "type": "integer", "example": 1 }, "data": { "type": "array", "items": { "$ref": "#\/components\/schemas\/Conversation" } }, "first_page_url": { "description": "The first page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "from": { "description": "The first item number of the current page", "type": "integer", "example": 1 }, "last_page": { "description": "The last page number", "type": "integer", "example": 1 }, "last_page_url": { "description": "The last page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "next_page_url": { "description": "The next page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "path": { "description": "The current page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "per_page": { "description": "The number of items per page", "type": "integer", "example": 10 }, "prev_page_url": { "description": "The previous page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "to": { "description": "The last item number of the current page", "type": "integer", "example": 1 }, "total": { "description": "The total number of items", "type": "integer", "example": 1 } } } } } } } }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] }, "post": { "tags": [ "Conversations" ], "summary": "Create a new conversation.", "description": "Create a new conversation for an agent (formerly known as project) identified by its unique projectId. This endpoint allows you to initiate a new conversation within a specific agent. A conversation serves as a platform for users to exchange messages regarding agent-related matters. By providing the projectId, you can establish a conversation within the context of the agent allowing you to seamlessly communicate with it.\nHere is an example to create a conversation: [API](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/Create_a_new_conversation_and_send_a_message_to_the_conversation.ipynb) [SDK](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/SDK_Create_a_new_conversation_and_send_a_message_to_the_conversation.ipynb).", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique identifier of the agent (formerly known as project).", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "description": "Create a new conversation", "content": { "application\/json": { "schema": { "type": "object", "properties": { "name": { "description": "Conversation name", "type": "string", "maxLength": 255, "example": "My conversation" } } } } } }, "responses": { "201": { "$ref": "#\/components\/responses\/CreateConversationResponse" }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/conversations\/{sessionId}": { "put": { "tags": [ "Conversations" ], "summary": "Update a conversation.", "description": "Update a conversation within an agent (formerly known as project) identified by its unique projectId and sessionId. This endpoint allows you to modify and update the properties of a specific conversation. By providing the projectId and sessionId, you can target the desired conversation and make changes to its attributes.\nHere is an example to update a conversation: [API](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/Update_Delete_a_conversation.ipynb) [SDK](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/SDK_Update_Delete_a_conversation.ipynb).", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique identifier of the agent (formerly known as project).", "required": true, "schema": { "type": "integer" } }, { "name": "sessionId", "in": "path", "description": "The unique session identifier.", "required": true, "schema": { "type": "string" } } ], "requestBody": { "description": "Update a conversation", "content": { "application\/json": { "schema": { "type": "object", "properties": { "name": { "description": "The new name of the conversation", "type": "string", "example": "My new conversation name" } } } } } }, "responses": { "200": { "description": "Update conversation information", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/Conversation" } } } } } }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] }, "delete": { "tags": [ "Conversations" ], "summary": "Delete a conversation.", "description": "Delete a conversation within an agent (formerly known as project) identified by its unique projectId and sessionId. This endpoint allows you to remove a specific conversation from the agent, permanently deleting all associated messages. By providing the projectId and sessionId, you can target the conversation to be deleted, ensuring the removal of all conversation-related data.\nHere is an example to delete a conversation: [API](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/Update_Delete_a_conversation.ipynb) [SDK](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/SDK_Update_Delete_a_conversation.ipynb).", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique identifier of the agent (formerly known as project).", "required": true, "schema": { "type": "integer" } }, { "name": "sessionId", "in": "path", "description": "The unique session identifier.", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "$ref": "#\/components\/responses\/DeleteProjectResponse" }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/conversations\/{sessionId}\/messages": { "get": { "tags": [ "Conversations" ], "summary": "Retrieve messages that have been sent in a conversation.", "description": "Retrieve all messages sent within a conversation of an agent (formerly known as project) identified by its unique projectId and sessionId. This endpoint allows you to retrieve a collection of messages exchanged in a specific conversation. Messages contain the content, timestamps, and other relevant information shared during the course of the conversation. By providing the projectId and sessionId, you can access all the messages associated with that particular conversation within the agent context.\nHere is an example to retrieve messages of a conversation: [API](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/Retrieve_messages_for_a_conversation.ipynb) [SDK](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/SDK_Retrieve_Messages_of_conversation.ipynb).", "parameters": [ { "name": "projectId", "in": "path", "description": "The ID of the agent to get the messages for", "required": true, "schema": { "type": "integer", "example": 1 } }, { "name": "sessionId", "in": "path", "description": "The session ID of the converstaions to get the messages for", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "page", "in": "query", "description": "Page number to return", "required": false, "schema": { "default": 1, "type": "integer" } }, { "name": "order", "in": "query", "description": "The order to sort the results by", "required": false, "schema": { "enum": [ "asc", "desc" ], "default": "desc", "type": "string", "example": "desc" } } ], "responses": { "200": { "$ref": "#\/components\/responses\/ConversationMessageListResponse" }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] }, "post": { "tags": [ "Conversations" ], "summary": "Send a message to a conversation.", "description": "Send a message to a conversation within an agent (formerly known as project) identified by its unique projectId and sessionId. This endpoint enables you to send a new message to a specific conversation, facilitating seamless communication and collaboration within the agent. By providing the projectId and sessionId, you can target the desired conversation and contribute to the ongoing discussion. This API endpoint supports real-time streaming, allowing for instant message delivery and dynamic updates which enables efficient and interactive communication between the user and agent.\nHere is an example to send a message to a conversation: [API](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/Create_a_new_conversation_and_send_a_message_to_the_conversation.ipynb) [SDK](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/SDK_Create_a_new_conversation_and_send_a_message_to_the_conversation.ipynb).", "parameters": [ { "name": "projectId", "in": "path", "description": "The ID of the agent to get the messages for", "required": true, "schema": { "type": "integer", "example": 1 } }, { "name": "sessionId", "in": "path", "description": "The session ID of the converstaions to get the messages for", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "stream", "in": "query", "description": "Whether to stream the response or not, if stream the responses will be sent as data-only server-sent events as they become available, with the stream terminated by a `status: \"finish\"` message. [Example Python code](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/SDK_Create_a_new_conversation_and_send_a_message_to_the_conversation.ipynb).", "required": false, "schema": { "default": false, "type": "boolean" } }, { "name": "lang", "in": "query", "description": "The language to use for the prompt", "required": false, "schema": { "default": "en", "type": "string" } }, { "name": "external_id", "in": "query", "description": "The external ID of the prompt history.", "required": false, "schema": { "type": "string", "maxLength": 128 } } ], "requestBody": { "description": "Send a message to a conversation.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "prompt": { "description": "Prompt to send to OpenAI", "type": "string", "example": "Write me hello world program in C" }, "custom_persona": { "description": "Custom persona to use for the conversation", "type": "string", "nullable": true, "example": "You are a custom AI Agent called *agent name*, a friendly *agent role* who works for *organization* and answers questions based on the given context. Be as helpful as possible. Always prioritize the customer. Escalate complex issues. Stay on topic. Use appropriate language, Acknowledge limitations." }, "chatbot_model": { "description": "Agent model to use for the conversation", "enum": [ "gpt-4-o", "gpt-4-1", "gpt-4o-mini", "gpt-4-1-mini", "claude-3-sonnet", "claude-3.5-sonnet", "gpt-o4-mini-low", "gpt-o4-mini-medium", "gpt-o4-mini-high" ], "type": "string", "nullable": true, "example": "gpt-4-o" }, "response_source": { "description": "By default, we ask ChatGPT to use only your content in its response (recommended). If you wish ChatGPT to improvise and use its own knowledgebase as well, you can set this to \"openai_content\".", "enum": [ "default", "own_content", "openai_content" ], "default": "default", "type": "string", "nullable": true, "example": "default" } } } } } }, "responses": { "200": { "$ref": "#\/components\/responses\/SendConversationResponse" }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectNotFoundErrorResponse" }, "429": { "$ref": "#\/components\/responses\/SendMessageResourceExhaustedErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/conversations\/{sessionId}\/messages\/{promptId}": { "get": { "tags": [ "Message" ], "summary": "Get a message by message ID", "parameters": [ { "name": "projectId", "in": "path", "description": "The ID of the agent to get the messages for", "required": true, "schema": { "type": "integer", "example": 1 } }, { "name": "sessionId", "in": "path", "description": "The session ID of the conversation to get the messages for", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "promptId", "in": "path", "description": "The message id of the message", "required": true, "schema": { "type": "integer", "example": "1" } } ], "responses": { "200": { "$ref": "#\/components\/responses\/GetConversationMessageResponse" }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ConversationMessageNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/conversations\/{sessionId}\/messages\/{promptId}\/feedback": { "put": { "tags": [ "Message" ], "summary": "Update the reaction for a specific message", "parameters": [ { "name": "projectId", "in": "path", "description": "The ID of the agent to get the messages for", "required": true, "schema": { "type": "integer", "example": 1 } }, { "name": "sessionId", "in": "path", "description": "The session ID of the conversation to get the messages for", "required": true, "schema": { "type": "string", "example": "1" } }, { "name": "promptId", "in": "path", "description": "The message id of the message", "required": true, "schema": { "type": "integer", "example": "1" } } ], "requestBody": { "description": "Update a message feedback", "content": { "application\/json": { "schema": { "type": "object", "properties": { "reaction": { "description": "The new reaction", "enum": [ [ "neutral", "disliked", "liked" ] ], "type": "string", "example": "liked" } } } } } }, "responses": { "200": { "$ref": "#\/components\/responses\/UpdateMessageFeedbackResponse" }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ConversationMessageNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/citations\/{citationId}": { "get": { "tags": [ "Citations" ], "summary": "Get the Open Graph data for a citation.", "description": "Retrieve the Open Graph data for a citation based on its unique identifier. This endpoint allows you to fetch the Open Graph metadata associated with a specific citation.\nHere is an example to get citation detail: [API](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/Get_citation_details.ipynb) [SDK](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/SDK_Get_Citation_Details.ipynb).", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique project identifier.", "required": true, "schema": { "type": "integer", "example": 1 } }, { "name": "citationId", "in": "path", "description": "The unique citation identifier.", "required": true, "schema": { "type": "integer", "example": 1 } } ], "responses": { "200": { "description": "Get the document metadata data for a citation", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/PageMetadata" } } } } } }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/PageNotFoundErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/sources": { "get": { "tags": [ "Sources" ], "summary": "List a certain agent's sources.", "description": "Retrieve a list of all sources associated with a given agent (formerly known as project). This endpoint provides a collection of sources that are linked to a specific agent. Sources serve as references or contexts for the agent.", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique identifier of the agent (formerly known as project).", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "$ref": "#\/components\/responses\/ListProjectsResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] }, "post": { "tags": [ "Sources" ], "summary": "Create a new agent source.", "description": "Create a new data source for a given agent (formerly known as project), allowing you to add additional context by specifying a sitemap URL or uploading a file. This endpoint enables you to enrich the agent's information by incorporating relevant data sources.\nHere is an example to add a new source to agent: [API](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/Add_a_sitemap_to_an_existing_project.ipynb) [SDK](https:\/\/github.com\/Poll-The-People\/customgpt-cookbook\/blob\/main\/examples\/SDK_Add_a_Sitemap_to_project.ipynb).", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique identifier of the agent (formerly known as project).", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "description": "Create a new agent source from a sitemap or a file", "content": { "multipart\/form-data": { "schema": { "type": "object", "properties": { "sitemap_path": { "description": "The sitemap path", "type": "string", "example": "https:\/\/example.com\/sitemap.xml" }, "file_data_retension": { "description": "File data retension", "type": "boolean", "example": true }, "is_ocr_enabled": { "description": "OCR enabled", "type": "boolean", "example": false }, "is_anonymized": { "description": "Anonymized", "type": "boolean", "example": false }, "file": { "description": "The submitted file.", "format": "binary", "type": "string", "example": "file.pdf" } } } } } }, "responses": { "201": { "$ref": "#\/components\/responses\/CreateProjectSourceResponse" }, "400": { "$ref": "#\/components\/responses\/FlaskServiceErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/sources\/{sourceId}": { "put": { "tags": [ "Sources" ], "summary": "Update agent source settings.", "description": "Update a data source settings, allowing you to change additional settings.", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique identifier of the agent (formerly known as project).", "required": true, "schema": { "type": "integer" } }, { "name": "sourceId", "in": "path", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "description": "Update a agent source", "content": { "application\/json": { "schema": { "type": "object", "properties": { "executive_js": { "description": "Whether the agent source should execute JavaScript", "default": true, "type": "boolean", "example": true }, "data_refresh_frequency": { "description": "The agent source data refresh frequency", "enum": [ [ "never", "daily", "weekly", "monthly", "advanced" ] ], "default": "never", "type": "string", "example": "never" }, "create_new_pages": { "description": "Add new pages to agent automatically during refresh agent source", "default": true, "type": "boolean", "example": true }, "remove_unexist_pages": { "description": "Remove pages from agent automatically during refresh agent source", "default": true, "type": "boolean", "example": false }, "refresh_existing_pages": { "description": "Refresh existing page during refresh agent source", "enum": [ [ "never", "always", "if_updated" ] ], "default": "never", "type": "string", "example": "never" }, "refresh_schedule": { "description": "Custom schedule for advanced data frequency", "default": [], "type": "array", "items": { "$ref": "#\/components\/schemas\/Time" }, "nullable": true, "example": { "days": [ 1, 3, 5 ], "hours": [ "08:00", "23:59" ] } } } } } } }, "responses": { "201": { "$ref": "#\/components\/responses\/UpdateProjectSourceResponse" }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectSourceNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] }, "delete": { "tags": [ "Sources" ], "summary": "Delete an agent source.", "description": "Delete a source for a given agent.", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique identifier of the agent (formerly known as project).", "required": true, "schema": { "type": "integer" } }, { "name": "sourceId", "in": "path", "description": "The unique identifier of a source.", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "description": "Agent source deleted successfully", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "deleted": { "description": "Whether the agent source was deleted successfully or not", "type": "boolean", "example": true } } } } } } } }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/sources\/{sourceId}\/instant-sync": { "put": { "tags": [ "Sources" ], "summary": "Instant sync the specified sitemap", "parameters": [ { "name": "projectId", "in": "path", "required": true, "schema": { "type": "integer" } }, { "name": "sourceId", "in": "path", "description": "The source id", "required": true, "schema": { "type": "integer" } } ], "responses": { "201": { "$ref": "#\/components\/responses\/SyncProjectSourceResponse" }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "403": { "$ref": "#\/components\/responses\/SyncSourceErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectSourceNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/reports\/traffic": { "get": { "tags": [ "Reports & Analytics" ], "summary": "Provide summary of various metrics of users interactions with the application.", "description": "Provide summary of various metrics of users interactions with the application such as the users number (both named and anonymous),\ntheir geographical locations, the browsers they use, and the sources from which they arrived at the application.", "parameters": [ { "name": "projectId", "in": "path", "description": "The ID of the agent to get traffic for", "required": true, "schema": { "type": "integer", "example": 1 } }, { "name": "filters", "in": "query", "description": "Filters to return traffic metrics for.", "required": true, "style": "form", "schema": { "type": "array", "items": { "enum": [ "sources" ], "type": "string" } } } ], "responses": { "200": { "description": "Get the traffic metrics for an agent", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/ProjectAnalyticsTraffic" } } } } } }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/reports\/queries": { "get": { "tags": [ "Reports & Analytics" ], "summary": "Provide summary of overall query metrics accross all conversations.", "parameters": [ { "name": "projectId", "in": "path", "description": "The ID of the agent to get queries for", "required": true, "schema": { "type": "integer", "example": 1 } }, { "name": "filters", "in": "query", "description": "Filters to return queries metrics for.", "required": true, "style": "form", "schema": { "type": "array", "items": { "enum": [ "total", "query_status" ], "type": "string" } } } ], "responses": { "200": { "description": "Get the query metrics for an agent", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/ProjectAnalyticsQuery" } } } } } }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/reports\/conversations": { "get": { "tags": [ "Reports & Analytics" ], "summary": "Provide summary of overall conversation metrics.", "parameters": [ { "name": "projectId", "in": "path", "description": "The ID of the agent to get conversations for", "required": true, "schema": { "type": "integer", "example": 1 } }, { "name": "filters", "in": "query", "description": "Filters to return conversations metrics for.", "required": true, "style": "form", "schema": { "type": "array", "items": { "enum": [ "total", "average_queries_per_conversation" ], "type": "string" } } } ], "responses": { "200": { "description": "Get the conversation metrics data for an agent", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/ProjectAnalyticsConversation" } } } } } }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/reports\/analysis": { "get": { "tags": [ "Reports & Analytics" ], "summary": "Provide graph-ready analysis data of various metrics.", "parameters": [ { "name": "projectId", "in": "path", "description": "The ID of the agent to get analysis for", "required": true, "schema": { "type": "integer", "example": 1 } }, { "name": "filters", "in": "query", "description": "Filters to return graph-ready analysis data for.", "required": true, "style": "form", "schema": { "type": "array", "items": { "enum": [ "queries", "conversations", "queries_per_conversation" ], "type": "string" } } }, { "name": "interval", "in": "query", "description": "Interval to return graph-ready analysis data inbetween.", "required": false, "schema": { "enum": [ "daily", "weekly" ], "default": "weekly", "type": "string" } } ], "responses": { "200": { "description": "Get the graph-ready data analysis for an agent", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/ProjectAnalyticsAnalysis" } } } } } }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/reports\/intelligence": { "get": { "tags": [ "Customer Intelligence" ], "summary": "Get customer intelligence analytics data for a project.", "description": "Retrieves comprehensive customer intelligence data including user interactions,\nemotions, intents, feedback, and behavioral analytics for the specified project.", "parameters": [ { "name": "projectId", "in": "path", "description": "The ID of the project to get customer intelligence for", "required": true, "schema": { "type": "integer", "example": 1 } }, { "name": "page", "in": "query", "description": "Page number for pagination", "required": false, "schema": { "default": 1, "type": "integer" } }, { "name": "limit", "in": "query", "description": "Number of items per page", "required": false, "schema": { "default": 100, "type": "integer" } }, { "name": "start_date", "in": "query", "description": "Start date for filtering data", "required": false, "schema": { "format": "date-time", "type": "string" } }, { "name": "end_date", "in": "query", "description": "End date for filtering data", "required": false, "schema": { "format": "date-time", "type": "string" } } ], "responses": { "200": { "$ref": "#\/components\/responses\/ProjectAnalyticsCustomerIntelligenceResponse" }, "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/licenses": { "get": { "tags": [ "Agent Licenses" ], "summary": "Get all licenses for an agent", "description": "Returns a list of licenses for a specific agent.", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique identifier of the agent (formerly known as project).", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "$ref": "#\/components\/responses\/ProjectLicenseListResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] }, "post": { "tags": [ "Agent Licenses" ], "summary": "Create a new license for an agent", "description": "Creates a new license for a specific agent.", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique identifier of the agent (formerly known as project).", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "description": "Create an agent license", "content": { "application\/json": { "schema": { "type": "object", "properties": { "name": { "description": "The name of the license", "type": "string", "example": "My License" } } } } } }, "responses": { "201": { "$ref": "#\/components\/responses\/ProjectLicenseCreatedResponse" }, "422": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/projects\/{projectId}\/licenses\/{licenseId}": { "get": { "tags": [ "Agent Licenses" ], "summary": "Get a license for an agent", "description": "Returns a specific license that belongs to a specific agent.", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique identifier of the agent (formerly known as project).", "required": true, "schema": { "type": "integer" } }, { "name": "licenseId", "in": "path", "description": "The unique identifier of a license.", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "$ref": "#\/components\/responses\/ProjectLicenseShowResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectLicenseNotFoundErrorResponse" }, "422": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] }, "put": { "tags": [ "Agent Licenses" ], "summary": "Update a license for an agent", "description": "Updates the name of a specific license that belongs to a specific agent.", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique identifier of the agent (formerly known as project).", "required": true, "schema": { "type": "integer" } }, { "name": "licenseId", "in": "path", "description": "The unique identifier of a license.", "required": true, "schema": { "type": "integer" } } ], "requestBody": { "description": "Update an agent license", "content": { "application\/json": { "schema": { "type": "object", "properties": { "name": { "description": "The new name of the license", "type": "string", "example": "My new license name" } } } } } }, "responses": { "200": { "$ref": "#\/components\/responses\/ProjectLicenseUpdatedResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectLicenseNotFoundErrorResponse" }, "422": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] }, "delete": { "tags": [ "Agent Licenses" ], "summary": "Delete a license for an agent", "description": "Deletes a specific license that belongs to a specific agent.", "parameters": [ { "name": "projectId", "in": "path", "description": "The unique identifier of the agent (formerly known as project).", "required": true, "schema": { "type": "integer" } }, { "name": "licenseId", "in": "path", "description": "The unique identifier of a license.", "required": true, "schema": { "type": "integer" } } ], "responses": { "200": { "$ref": "#\/components\/responses\/ProjectLicenseDeletedResponse" }, "422": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/ProjectLicenseNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/preview\/{id}": { "get": { "tags": [ "Pages" ], "summary": "Preview file from citation.", "parameters": [ { "name": "id", "in": "path", "required": true, "schema": { "type": "string" } } ], "responses": { "400": { "$ref": "#\/components\/responses\/BadArgumentErrorResponse" }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "404": { "$ref": "#\/components\/responses\/PageNotFoundErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/user": { "get": { "tags": [ "Users" ], "summary": "Show the user's profile.", "description": "Retrieve the profile information of the current user. This endpoint allows you to fetch the details and attributes associated with the user's profile, providing valuable information about the user's account and preferences.", "responses": { "200": { "description": "Retrieve user account info", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/User" } } } } } }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] }, "post": { "tags": [ "Users" ], "summary": "Update the user's profile.", "description": "Update the profile of the current user. This endpoint allows the user to modify and update their profile information and preferences within the application or system.", "requestBody": { "description": "Update user account info", "content": { "multipart\/form-data": { "schema": { "properties": { "profile_photo": { "description": "User profile photo", "format": "binary", "type": "string", "example": "avatar.png" }, "name": { "description": "User name", "type": "string", "maxLength": 255, "example": "John Doe" } } } } } }, "responses": { "200": { "description": "Update user account info", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/User" } } } } } }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } }, "\/api\/v1\/limits\/usage": { "get": { "tags": [ "Limits" ], "summary": "Get user's agents, words and queries limit.", "responses": { "200": { "description": "Retrieve user usage limits", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/Limits" } } } } } }, "401": { "$ref": "#\/components\/responses\/ApiTokenValidationErrorResponse" }, "500": { "$ref": "#\/components\/responses\/InternalServerErrorResponse" } }, "security": [ { "BearerToken": [] } ] } } }, "components": { "schemas": { "ProjectSource": { "type": "object", "properties": { "id": { "description": "The agent source ID", "type": "integer", "example": 1 }, "created_at": { "description": "The agent source creation date", "format": "date-time", "type": "string", "example": "2021-01-01 00:00:00" }, "updated_at": { "description": "The agent source update date", "format": "date-time", "type": "string", "example": "2021-01-01 00:00:00" }, "type": { "description": "The agent source type", "enum": [ "sitemap", "upload" ], "type": "string", "example": "sitemap" }, "settings": { "description": "The agent source settings", "type": "object", "properties": { "executive_js": { "description": "Whether the agent source should execute JavaScript", "default": true, "type": "boolean", "example": true }, "data_refresh_frequency": { "description": "The agent source data refresh frequency", "enum": [ [ "never", "daily", "weekly", "monthly", "advanced" ] ], "default": "never", "type": "string", "example": "never" }, "create_new_pages": { "description": "Add new pages to agent automatically during refresh agent source", "default": true, "type": "boolean", "example": true }, "remove_unexist_pages": { "description": "Remove pages from agent automatically during refresh agent source", "default": true, "type": "boolean", "example": false }, "refresh_existing_pages": { "description": "Refresh existing page during refresh agent source", "enum": [ [ "never", "always", "if_updated" ] ], "default": "never", "type": "string", "example": "never" }, "sitemap_path": { "description": "The agent source sitemap path", "type": "string", "example": "https:\/\/example.com\/sitemap.xml" } } }, "pages": { "description": "The agent source pages", "type": "array", "items": { "$ref": "#\/components\/schemas\/Page" }, "nullable": true } } }, "ProjectSettings": { "type": "object", "properties": { "chatbot_avatar": { "description": "This is the avatar that is shown in the agent response. You can make it a profile picture or your company logo.", "type": "string", "example": "https:\/\/example.com\/agent_avatar.png" }, "chatbot_background_type": { "description": "Here you can choose whether the agent conversations widget will use background image or background color.", "enum": [ [ "image", "color" ] ], "default": "image", "type": "string", "example": "image" }, "chatbot_background": { "description": "This is the background image shown in the agent conversations widget. You can change it to a company logo or background image.", "type": "string", "example": "https:\/\/example.com\/agent_background.png" }, "chatbot_background_color": { "description": "This is the background color of the agent conversations widget. You can set it to any valid color hex.", "default": "#F5F5F5", "type": "string", "example": "#F5F5F5" }, "default_prompt": { "description": "This is the default prompt shown to the user. You can customize this for your company or client.", "type": "string", "example": "How can I help you?" }, "example_questions": { "description": "These are example questions shown to guide users. You can create customized questions to suit your company or client needs.", "type": "array", "items": { "type": "string", "example": "How do I get started?" }, "example": [ "How do I get started?" ] }, "response_source": { "description": "By default, we ask ChatGPT to use only your content in its response (recommended). If you wish ChatGPT to improvise and use its own knowledgebase as well, you can select \"My Content + ChatGPT\"", "enum": [ "default", "own_content", "openai_content" ], "type": "string", "example": "own_content" }, "chatbot_msg_lang": { "description": "By default, the agent messages like 'Ask Me Anything' are in English. You can customize this to your preferred language. Please note: This setting does not control what language ChatGPT responds in. That is controlled by the user's question. So a user asking in Portuguese, will most likely get a response from ChatGPT in Portuguese.", "type": "string", "example": "en" }, "chatbot_color": { "description": "Color of the agent in hex format", "type": "string", "example": "#000000" }, "chatbot_toolbar_color": { "description": "Color of the agent toolbar in hex format", "type": "string", "example": "#000000" }, "persona_instructions": { "description": "Customize your agent behavior by adjusting the system parameter to control its personality traits and role.", "type": "string", "nullable": true, "example": "You are a custom agent assistant called CustomGPT.ai, a friendly lawyer who answers questions based on the given context." }, "citations_answer_source_label_msg": { "description": "This is the message shown to indicate where the response came from. You can customize this message based on your business or language.", "type": "string", "nullable": true, "example": "Where did this answer come from?" }, "citations_sources_label_msg": { "description": "This is the message shown for the Sources label. You can customize this message based on your business or language.", "type": "string", "nullable": true, "example": "Sources" }, "hang_in_there_msg": { "description": "This is the message shown when the agent is thinking and waiting to answer. You can customize this message based on your tone, personality or language.", "type": "string", "nullable": true, "example": "Hang in there! I'm thinking.." }, "chatbot_siesta_msg": { "description": "This is the message shown when the agent has encountered a problem or error. You can customize this message based on your tone, personality or language.", "type": "string", "nullable": true, "example": "Oops! The agent is taking a siesta. We are aware of this and will get it back soon! Please try again later." }, "is_loading_indicator_enabled": { "description": "Show animated loading indicator while waiting for a response from the agent", "default": true, "type": "boolean", "nullable": true, "example": true }, "enable_citations": { "description": "Each agent response shows an option for the user to see the sources\/citations from your content from which the response was generated.", "enum": [ 0, 1, 2, 3 ], "default": 3, "type": "integer", "nullable": true, "example": 3 }, "enable_feedbacks": { "description": "Each agent response shows an thumbs up\/down for the user to left own feedback.", "default": true, "type": "boolean", "nullable": true, "example": true }, "citations_view_type": { "description": "Control how citations are shown. By default, the user can initiate to see the citations. You can choose to have it \"Auto Shown\" or \"Auto Hide\"", "enum": [ "user", "show", "hide" ], "default": "user", "type": "string", "nullable": true, "example": "user" }, "image_citation_display": { "description": "Controls how images are displayed in citations. Default displays like regular citations, first_only inserts the image below the first paragraph where referenced, all inserts the image below all referenced paragraphs.", "enum": [ "default", "first_only" ], "default": "default", "type": "string", "nullable": true, "example": "default" }, "no_answer_message": { "description": "This is the message shown when the agent cannot answer. You can customize it to a message asking the user to contact customer support or leave their email \/ phone.", "default": "I'm sorry, I don't know the answer", "type": "string", "nullable": true, "example": "Sorry, I don't have an answer for that." }, "ending_message": { "description": "You can instruct ChatGPT to end every response with some text like asking \"Please email us for further support\" (Not recommended for most use cases)", "type": "string", "nullable": true, "example": "Please email us for further support" }, "try_asking_questions_msg": { "description": "This is the message shown to the user to encourage them to ask questions. You can customize this message based on your tone, personality or language.", "default": "Try asking these questions...", "type": "string", "maxLength": 255, "nullable": true, "example": "Try asking these questions..." }, "view_more_msg": { "description": "This is the message shown to the user to view more starter questions. You can customize this message based on your tone, personality or language.", "default": "View more", "type": "string", "maxLength": 255, "nullable": true, "example": "View more" }, "view_less_msg": { "description": "This is the message shown to the user to view less starter questions. You can customize this message based on your tone, personality or language.", "default": "View less", "type": "string", "maxLength": 255, "nullable": true, "example": "View less" }, "remove_branding": { "description": "Controls what branding is shown at the bottom of the agent.", "default": false, "type": "boolean", "nullable": true, "example": false }, "private_deployment": { "description": "When Private Agent Deployment is enabled you can add agent’s code snippet to any website, but users will be able to access it only if they login to their CustomGPT.ai account", "default": false, "type": "boolean", "nullable": true, "example": false }, "enable_recaptcha_for_public_chatbots": { "description": "Should we check messages from guests with Recaptcha when your agent is publicly available (i.e. shared or embedded).", "default": false, "type": "boolean", "nullable": true, "example": false }, "chatbot_model": { "description": "This is the model used by the agent. You can choose a different model to suit your needs.", "enum": [ "gpt-4-o", "gpt-4-1", "gpt-4o-mini", "gpt-4-1-mini", "claude-3-sonnet", "claude-3.5-sonnet", "gpt-o4-mini-low", "gpt-o4-mini-medium", "gpt-o4-mini-high" ], "default": "gpt-4-o", "type": "string", "nullable": true, "example": "gpt-4-o" }, "is_selling_enabled": { "description": "Enable selling of agent for monetization", "default": false, "type": "boolean", "nullable": true, "example": false }, "license_slug": { "description": "License slug used for monetization", "type": "boolean", "nullable": true, "readOnly": true }, "selling_url": { "description": "Selling URL used for monetization", "type": "string", "nullable": true, "readOnly": true }, "can_share_conversation": { "description": "Whether conversations can be shared", "default": false, "type": "boolean", "nullable": true, "example": false }, "can_export_conversation": { "description": "Whether conversations can be exported", "default": false, "type": "boolean", "nullable": true, "example": false }, "hide_sources_from_responses": { "description": "Should the agent mention source names?", "default": true, "type": "boolean", "nullable": true, "example": true }, "input_field_addendum": { "description": "You can add URL for your Terms of Service here, and it will be automatically added to your agent's interface.", "default": "", "type": "string", "maxLength": 100, "nullable": true }, "user_avatar_enabled": { "description": "Enable user avatar", "default": false, "type": "boolean", "example": false }, "user_avatar": { "description": "User avatar", "format": "binary", "type": "string", "example": "avatar.png" }, "spotlight_avatar_enabled": { "description": "Enable spotlight avatar", "default": false, "type": "boolean", "example": false }, "spotlight_avatar": { "description": "Spotlight avatar", "format": "binary", "type": "string", "example": "spotlight_avatar.png" }, "spotlight_avatar_shape": { "description": "Spotlight avatar shape", "enum": [ "circle", "rectangle" ], "default": "rectangle", "type": "string", "example": "rectangle" }, "spotlight_avatar_type": { "description": "Spotlight avatar type", "enum": [ "default", "image" ], "default": "default", "type": "string", "example": "default" }, "user_avatar_orientation": { "description": "Avatars orientation", "type": "string", "example": "agent-left-user-right" }, "chatbot_title": { "description": "Chatbot title", "default": "", "type": "string", "maxLength": 30, "nullable": true }, "chatbot_title_color": { "description": "Chatbot title color, HEX color code", "default": "#000000", "type": "string", "nullable": true }, "enable_inline_citations_api": { "description": "Should the citations be shown inline in the response?", "default": false, "type": "boolean", "nullable": true, "example": false }, "conversation_time_window": { "description": "Defines the maximum duration of a conversation. If set to false, users can continue the conversation beyond 24 hours, but the agent will ignore messages older than 24 hours. If set to true, the agent will consider messages older than 24 hours.", "default": false, "type": "boolean", "nullable": true, "example": false }, "conversation_retention_period": { "description": "Period after which we automatically delete all conversations.", "enum": [ "custom", "year", "never" ], "default": "year", "type": "string", "example": "year" }, "conversation_retention_days": { "description": "Custom period in days after which we automatically delete all conversations.", "default": 0, "type": "integer", "example": 180 }, "use_context_aware_starter_question": { "description": "Use context-aware starter question", "default": false, "type": "boolean", "nullable": true, "example": false }, "enable_agent_knowledge_base_awareness": { "description": "Enable agent knowledge base awareness", "default": true, "type": "boolean", "example": true }, "markdown_enabled": { "description": "Enable Markdown support in the agent responses. This allows for rich text formatting in the agent responses, such as bold, italics, lists, and links.", "default": true, "type": "boolean", "example": true } } }, "ProjectAnalyticsTraffic": { "type": "object", "properties": { "sources": { "type": "array", "items": { "type": "object", "properties": { "request_source": { "enum": [ "web", "ama", "iframe", "api", "api-openai", "sdk", "slack", "embed", "livechat", "sge", "ai-assistant", "instant-viewer", "mcp" ], "type": "string", "example": "web" }, "request_source_number": { "type": "integer", "example": 20 } } } } } }, "User": { "type": "object", "properties": { "created_at": { "description": "When was this user created?", "format": "date-time", "type": "string", "example": "2023-04-30 16:43:53" }, "email": { "description": "User email", "format": "email", "type": "string", "example": "user@domain.com" }, "id": { "description": "User ID", "type": "integer", "example": 1 }, "current_team_id": { "description": "User currently active team ID", "type": "integer", "example": 1 }, "name": { "description": "User name", "type": "string", "example": "John Doe" }, "profile_photo_url": { "description": "User profile photo URL", "format": "url", "type": "string", "example": "https:\/\/app.customgpt.ai\/user\/1\/profile_photo_url" }, "updated_at": { "description": "When was this user updated?", "format": "date-time", "type": "string", "example": "2023-04-30 16:43:53" } } }, "Limits": { "type": "object", "properties": { "max_projects_num": { "description": "The maximum number of agents allowed for this team.", "type": "integer", "example": 10 }, "current_projects_num": { "description": "The total number of agents currently belonging to this team.", "type": "integer", "example": 10 }, "max_total_storage_credits": { "description": "The maximum number of storage credits allowed for this team.", "type": "integer", "example": 10 }, "current_total_storage_credits": { "description": "The amount of storage credits currently in use.", "type": "integer", "example": 10 }, "max_queries": { "description": "The maximum number of queries allowed per billing cycle for this team.", "type": "integer", "example": 10 }, "current_queries": { "description": "The number of queries used in the current billing cycle.", "type": "integer", "example": 10 } } }, "Page": { "type": "object", "properties": { "id": { "description": "Page ID", "type": "integer", "example": 1 }, "page_url": { "description": "URL of the document", "type": "string", "example": "https:\/\/example.com" }, "page_url_hash": { "description": "Hash of the URL of the document", "format": "md5", "type": "string", "example": "d41d8cd98f00b204e9800998ecf8427e" }, "project_id": { "description": "Agent ID", "type": "integer", "example": 1 }, "s3_path": { "description": "This is the path where the document is stored in S3.\\nNote: This is omitted in the response if the document is not a file", "type": "string", "nullable": true, "example": "project-1\/page-1\/file.pdf" }, "crawl_status": { "description": "Is the document successfully added", "enum": [ "ok", "queued", "failed", "n\/a", "limited" ], "default": "queued", "type": "string", "example": "queued" }, "index_status": { "description": "Is the document available to agent", "enum": [ "ok", "queued", "failed", "n\/a", "limited" ], "default": "queued", "type": "string", "example": "queued" }, "is_file": { "description": "Whether the document is a file or not", "default": false, "type": "boolean", "example": true }, "is_refreshable": { "description": "Whether the document can be refreshed or not", "default": false, "type": "boolean", "example": true }, "is_file_kept": { "description": "Whether the file is kept after processing or not.\\nNote: This is omitted in the response if the document is not a file", "default": true, "type": "boolean", "example": true }, "filename": { "description": "Filename of the document.\\nNote: This is omitted in the response if the document is not a file", "type": "string", "nullable": true, "example": "file.pdf" }, "filesize": { "description": "Filesize of the document.\\nNote: This is omitted in the response if the document is not a file", "type": "integer", "nullable": true, "example": 100 }, "created_at": { "description": "Date and time when the document was created", "format": "date-time", "type": "string", "example": "2021-01-01 00:00:00" }, "updated_at": { "description": "Date and time when the document was updated", "format": "date-time", "type": "string", "example": "2021-01-01 00:00:00" }, "deleted_at": { "description": "Date and time when the document was deleted", "format": "date-time", "type": "string", "example": "2021-01-01 00:00:00" } } }, "ProjectAnalyticsConversation": { "type": "object", "properties": { "total": { "description": "Total number of conversations", "type": "integer", "example": 10 }, "average_queries_per_conversation": { "description": "Average number of queries per conversations", "type": "integer", "example": 1.2 } } }, "ProjectPlugin": { "type": "object", "properties": { "model_name": { "description": "Model Name", "type": "string", "example": "IndoorPlants" }, "human_name": { "description": "Name For Human", "type": "string", "example": "The Indoor Plants Channel" }, "keywords": { "description": "Keywords For Model", "type": "string", "example": "Indoor plants, Gardening, Trusted information." }, "description": { "description": "Description For Human", "type": "string", "example": "Trusted information about indoor plants and gardening." }, "logo": { "description": "Agent plugin logo", "type": "string", "example": "https:\/\/app.customgpt.ai\/logo.svg" }, "is_active": { "description": "Whether the agent plugin is active or not", "default": false, "type": "boolean", "example": true } } }, "CustomerIntelligence": { "type": "object", "properties": { "prompt_id": { "description": "Unique identifier for the prompt", "type": "integer" }, "conversation_id": { "description": "Unique identifier for the conversation", "type": "integer" }, "project_id": { "description": "Unique identifier for the project", "type": "integer" }, "user_query": { "description": "The user's original query", "type": "string" }, "ai_response": { "description": "The AI's response to the query", "type": "string" }, "created_at": { "description": "Timestamp when the interaction occurred", "type": "string" }, "content_source": { "description": "Detected content source", "type": "string" }, "user_emotion": { "description": "Detected user emotion", "type": "string" }, "user_intent": { "description": "Detected user intent", "type": "string" }, "language": { "description": "Detected language", "type": "string" }, "feedback": { "description": "User feedback on the response", "type": "string" }, "user_location": { "description": "User's location (country code)", "type": "string" }, "chatbot_deployment": { "description": "Chatbot deployment source", "type": "string" }, "browser": { "description": "User's browser information", "type": "string" } } }, "Project": { "type": "object", "properties": { "id": { "description": "Agent ID", "type": "integer", "example": 1 }, "project_name": { "description": "Agent name", "type": "string", "example": "My Agent" }, "sitemap_path": { "description": "Agent sitemap", "type": "string", "example": "https:\/\/www.example.com\/sitemap.xml" }, "is_chat_active": { "description": "Whether the agent is active or not", "default": false, "type": "boolean", "example": true }, "user_id": { "description": "User ID of the agent owner", "type": "integer", "example": 1 }, "team_id": { "description": "Team ID of the agent owner", "type": "integer", "example": 1 }, "created_at": { "description": "Date and time when the agent was created", "default": "2023-05-08 13:06:55", "format": "date-time", "type": "string", "example": "2021-01-01 00:00:00" }, "updated_at": { "description": "Date and time when the agent was last updated", "default": "2023-05-08 13:06:55", "format": "date-time", "type": "string", "example": "2021-01-01 00:00:00" }, "deleted_at": { "description": "Date and time when the agent was deleted", "format": "date-time", "type": "string", "nullable": true, "example": "2021-01-01 00:00:00" }, "type": { "description": "Agent type", "enum": [ "SITEMAP", "URL" ], "default": "SITEMAP", "type": "string", "example": "SITEMAP" }, "is_shared": { "description": "Is the agent public or not", "default": false, "type": "boolean", "example": true }, "shareable_slug": { "description": "Shareable slug that can be used to share the agent", "format": "md5", "type": "string", "nullable": true, "example": "1234567890abcdef1234567890abcdef" }, "shareable_link": { "description": "Shareable link that can be used to share the agent", "format": "url", "type": "string", "nullable": true }, "embed_code": { "description": "Embed code that can be used to embed the agent", "format": "html", "type": "string", "nullable": true }, "live_chat_code": { "description": "Live chat code that can be used to embed the live chat", "format": "html", "type": "string", "nullable": true }, "are_licenses_allowed": { "description": "Whether licenses are allowed or not", "default": false, "type": "boolean", "example": true }, "subdomain_slug": { "description": "Subdomain slug that can be used to share the agent", "format": "md5", "type": "string", "nullable": true } } }, "ProjectLicense": { "type": "object", "properties": { "name": { "description": "License Name", "type": "string", "maxLength": 255, "example": "My License" }, "key": { "description": "License Key", "format": "uuid", "type": "string", "example": "123e4567-e89b-12d3-a456-426614174000" }, "project_id": { "description": "Agent ID this license belongs to", "type": "integer", "example": 7 }, "created_at": { "description": "Date and time when the license was created", "format": "date-time", "type": "string", "example": "2021-01-01 00:00:00" }, "updated_at": { "description": "Date and time when the license was last updated", "format": "date-time", "type": "string", "example": "2021-01-01 00:00:00" } } }, "PageMetadata": { "type": "object", "properties": { "id": { "description": "The unique identifier of the document", "type": "integer", "example": 1 }, "url": { "description": "The URL of the document", "type": "string", "nullable": true, "example": "https:\/\/www.example.com" }, "title": { "description": "The title of the document", "type": "string", "nullable": true, "example": "Example Domain" }, "description": { "description": "The description of the document", "type": "string", "nullable": true, "example": "This domain is for use in illustrative examples in documents. You may use this domain in literature without prior coordination or asking for permission." }, "image": { "description": "The image of the document", "type": "string", "nullable": true, "example": "https:\/\/www.example.com\/image.png" } } }, "ProjectAnalyticsQuery": { "type": "object", "properties": { "total": { "description": "Total number of queries over all conversations", "type": "integer", "example": 10 }, "query_status": { "description": "Number of successful and failed queries over all conversations", "type": "array", "items": { "type": "object", "properties": { "status": { "enum": [ "failed", "success" ], "type": "string" }, "count": { "type": "integer", "example": 2 } } } } } }, "Time": { "type": "object", "properties": { "days": { "description": "Index of days in which sitemap should be refreshed. Starts from 0 (Sunday) to 6 (Saturday).", "type": "array", "items": { "type": "integer", "example": 0 }, "example": [ 0, 1, 4, 6 ] }, "hours": { "description": "List of times in which sitemap should be refreshed. Must be in HH:MM format.", "type": "array", "items": { "type": "string", "example": "23:45" }, "example": [ "00:00", "08:00", "23:45" ] } } }, "PromptHistory": { "type": "object", "properties": { "id": { "description": "The unique identifier of the prompt history.", "type": "integer", "example": 1 }, "user_id": { "description": "The unique identifier of the user.", "type": "integer", "example": 1 }, "user_query": { "description": "The user prompt query.", "type": "string", "example": "What is the meaning of life?" }, "openai_response": { "description": "The OpenAI response to the user prompt query.", "type": "string", "example": "The meaning of life is to be happy." }, "created_at": { "description": "The date and time the prompt history was created.", "format": "date-time", "type": "string", "example": "2021-01-01 00:00:00" }, "updated_at": { "description": "The date and time the prompt history was last updated.", "format": "date-time", "type": "string", "example": "2021-01-01 00:00:00" }, "conversation_id": { "description": "The unique identifier of the conversation.", "type": "integer", "example": 1 }, "citations": { "description": "The citations for the prompt history.", "default": [], "type": "array", "items": { "type": "integer", "example": 1 }, "example": [ 1, 2, 3 ] }, "metadata": { "type": "object", "properties": { "user_ip": { "description": "The IP address of the user.", "type": "string", "example": "127.0.0.1" }, "user_agent": { "description": "The user agent of the user.", "type": "string", "example": "Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko)" }, "external_id": { "description": "The external ID of the prompt history.", "type": "string", "maxLength": 128, "example": "ext_id_1234567890" }, "request_source": { "description": "The source of the request.", "type": "string", "example": "web" } }, "example": { "user_ip": "127.0.0.1", "user_agent": "Mozilla\/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit\/537.36 (KHTML, like Gecko)", "external_id": "ext_id_1234567890", "request_source": "web" } }, "response_feedback": { "type": "object", "properties": { "created_at": { "description": "The timestamp when the feedback was created", "format": "date-time", "type": "string", "example": "2024-08-27T21:07:20.000000Z" }, "updated_at": { "description": "The timestamp when the feedback was last updated", "format": "date-time", "type": "string", "example": "2024-08-27T21:07:20.000000Z" }, "user_id": { "description": "The ID of the user who provided the feedback", "type": "integer", "nullable": true, "example": 1 }, "reaction": { "description": "The reaction provided by the user", "enum": [ [ "neutral", "disliked", "liked" ] ], "type": "string", "example": "liked" } } } } }, "ProjectAnalyticsAnalysis": { "type": "object", "properties": { "queries": { "type": "array", "items": { "type": "object", "properties": { "queries_number": { "type": "integer", "example": 5 }, "created_at_interval": { "type": "string", "example": "Sat" } } } }, "conversations": { "type": "array", "items": { "type": "object", "properties": { "queries_number": { "type": "integer", "example": 5 }, "created_at_interval": { "type": "string", "example": "Sat" } } } }, "queries_per_conversation": { "type": "array", "items": { "type": "object", "properties": { "queries_number": { "type": "integer", "example": 1.5 }, "created_at_interval": { "type": "string", "example": "Sat" } } } } } }, "Conversation": { "type": "object", "properties": { "created_at": { "description": "When was this conversation created?", "format": "date-time", "type": "string", "example": "2023-04-30 16:43:53" }, "updated_at": { "description": "When was this conversation updated?", "format": "date-time", "type": "string", "example": "2023-04-30 16:43:53" }, "deleted_at": { "description": "When was this conversation deleted?", "format": "date-time", "type": "string", "example": "2023-04-30 16:43:53" }, "id": { "description": "Conversation ID", "type": "integer", "example": 1 }, "name": { "description": "Conversation name", "type": "string", "example": "Conversation 1" }, "project_id": { "description": "Agent ID for this conversation", "type": "string", "example": 1 }, "created_by": { "description": "User ID for the user who created this conversation", "type": "string", "example": 1 }, "session_id": { "description": "Session ID for this conversation", "format": "uuid", "type": "string", "example": "f1b9aaf0-5e4e-11eb-ae93-0242ac130002" } } } }, "responses": { "ProjectLicenseShowResponse": { "description": "Show agent license", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "license": { "$ref": "#\/components\/schemas\/ProjectLicense" } } } } } }, "ConversationMessageListResponse": { "description": "List all messages in a conversation", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "conversation": { "$ref": "#\/components\/schemas\/Conversation" }, "messages": { "type": "object", "properties": { "current_page": { "description": "The current page number", "type": "integer", "example": 1 }, "data": { "type": "array", "items": { "$ref": "#\/components\/schemas\/PromptHistory" } }, "first_page_url": { "description": "The first page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "from": { "description": "The first item number of the current page", "type": "integer", "example": 1 }, "last_page": { "description": "The last page number", "type": "integer", "example": 1 }, "last_page_url": { "description": "The last page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "next_page_url": { "description": "The next page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "path": { "description": "The current page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "per_page": { "description": "The number of items per page", "type": "integer", "example": 10 }, "prev_page_url": { "description": "The previous page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "to": { "description": "The last item number of the current page", "type": "integer", "example": 1 }, "total": { "description": "The total number of items", "type": "integer", "example": 1 } } } } } } } } } }, "UpdateProjectSourceResponse": { "description": "Successfully updated agent source.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/ProjectSource" } } } } } }, "ListProjectSettingsResponse": { "description": "Agent settings that belong to a certain agent", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/ProjectSettings" } } } } } }, "ProjectLicenseUpdatedResponse": { "description": "Updated agent license", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "license": { "$ref": "#\/components\/schemas\/ProjectLicense" } } } } } }, "GetConversationMessageResponse": { "description": "Retrieve certain conversation message", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/PromptHistory" } } } } } }, "ConversationMessageNotFoundErrorResponse": { "description": "Conversation message not found", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "error" }, "url": { "description": "The URL of the request", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/projects\/1" }, "data": { "type": "object", "properties": { "code": { "description": "The error status code", "enum": [ 400, 401, 403, 404, 500, 503 ], "type": "integer", "example": 404 }, "message": { "description": "The error message", "enum": [ "Conversation message id is required", "Conversation message with id {messageId} not found" ], "type": "string", "example": "Conversation message with id 1 not found" } } } } } } } }, "SyncSourceErrorResponse": { "description": "Source sync failed", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "error" }, "url": { "description": "The URL of the request", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/projects\/1" }, "data": { "type": "object", "properties": { "code": { "description": "The error status code", "enum": [ 400, 401, 403, 404, 500, 503 ], "type": "integer", "example": 403 }, "message": { "description": "The error message", "enum": [ "Your plan not eligible for instant sync", "Next instant sync will be available in \\{seconds\\} seconds", "Agent source can't be synced" ], "type": "string", "example": "Subscription not eligible for instant sync" } } } } } } } }, "ProjectLicenseCreatedResponse": { "description": "Agent license", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "license": { "$ref": "#\/components\/schemas\/ProjectLicense" }, "licenseKey": { "description": "The license key", "format": "uuid", "type": "string", "example": "123e4567-e89b-12d3-a456-426614174000" } } } } } } } }, "CreateProjectPluginResponse": { "description": "Agent plugin has been created", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/ProjectPlugin" } } } } } }, "UpdateProjectSettingsErrorResponse": { "description": "Update agent settings failed", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "error" }, "url": { "description": "The URL of the request", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/projects\/1" }, "data": { "type": "object", "properties": { "code": { "description": "The error status code", "enum": [ 400, 401, 403, 404, 500, 503 ], "type": "integer", "example": 400 }, "message": { "description": "The error message", "enum": [ "Please upload a valid image file for avatar", "Please upload a valid image file for background", "Language Proficiency is required." ], "type": "string", "example": "Please upload a valid image file for avatar" } } } } } } } }, "UpdateProjectSettingsResponse": { "description": "Agent settings have been updated", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "updated": { "description": "Whether the agent was updated successfully or not", "type": "boolean", "example": true } } } } } } } }, "CreateProjectErrorResponse": { "description": "Agent creation failed", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "error" }, "url": { "description": "The URL of the request", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/projects\/1" }, "data": { "type": "object", "properties": { "code": { "description": "The error status code", "enum": [ 400, 401, 403, 404, 500, 503 ], "type": "integer", "example": 400 }, "message": { "description": "The error message", "enum": [ "Agent name can't be empty", "Sitemap path can't be empty", "You have reached your agent limit" ], "type": "string", "example": "Agent name can't be empty" } } } } } } } }, "UpdatePageMetadataErrorResponse": { "description": "Update page metadata failed", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "error" }, "url": { "description": "The URL of the request", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/projects\/1" }, "data": { "type": "object", "properties": { "code": { "description": "The error status code", "enum": [ 400, 401, 403, 404, 500, 503 ], "type": "integer", "example": 400 }, "message": { "description": "The error message", "type": "string", "example": "Image must be valid url." } } } } } } } }, "FlaskServiceErrorResponse": { "description": "Service unavailable", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "error" }, "url": { "description": "The URL of the request", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/projects\/1" }, "data": { "type": "object", "properties": { "code": { "description": "The error status code", "enum": [ 400, 401, 403, 404, 500, 503 ], "type": "integer", "example": 400 }, "message": { "description": "The error message", "type": "string", "example": "Sitemap URL is empty" } } } } } } } }, "ProjectLicenseNotFoundErrorResponse": { "description": "Agent license not found", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "error" }, "url": { "description": "The URL of the request", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/projects\/1" }, "data": { "type": "object", "properties": { "code": { "description": "The error status code", "enum": [ 400, 401, 403, 404, 500, 503 ], "type": "integer", "example": 404 }, "message": { "description": "The error message", "enum": [ "License ID is required", "Agent license with id {licenseId} not found" ], "type": "string", "example": "Agent license with id 1 not found" } } } } } } } }, "ProjectPluginNotFoundErrorResponse": { "description": "Agent plugin not found", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "error" }, "url": { "description": "The URL of the request", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/projects\/1" }, "data": { "type": "object", "properties": { "code": { "description": "The error status code", "enum": [ 400, 401, 403, 404, 500, 503 ], "type": "integer", "example": 404 }, "message": { "description": "The error message", "enum": [ "Agent plugin id is required", "Agent plugin with id {pluginId} not found", "Plugin for agent with id {projectId} not found" ], "type": "string", "example": "Agent plugin with id 1 not found" } } } } } } } }, "ProjectAnalyticsCustomerIntelligenceResponse": { "description": "Project analytics customer intelligence data", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "current_page": { "description": "The current page number", "type": "integer", "example": 1 }, "data": { "type": "array", "items": { "$ref": "#\/components\/schemas\/CustomerIntelligence" } }, "first_page_url": { "description": "The first page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "from": { "description": "The first item number of the current page", "type": "integer", "example": 1 }, "last_page": { "description": "The last page number", "type": "integer", "example": 1 }, "last_page_url": { "description": "The last page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "next_page_url": { "description": "The next page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "path": { "description": "The current page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "per_page": { "description": "The number of items per page", "type": "integer", "example": 10 }, "prev_page_url": { "description": "The previous page url", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/users?page=1" }, "to": { "description": "The last item number of the current page", "type": "integer", "example": 1 }, "total": { "description": "The total number of items", "type": "integer", "example": 1 } } } } } } } }, "SendMessageResourceExhaustedErrorResponse": { "description": "Resource Exhausted when sending a message to a conversation", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "error" }, "url": { "description": "The URL of the request", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/projects\/1" }, "data": { "type": "object", "properties": { "code": { "description": "The error status code", "enum": [ 400, 401, 403, 404, 500, 503 ], "type": "integer", "example": 429 }, "message": { "description": "The error message", "type": "string", "example": "You have exhausted your current query credits. Please contact customer service (https:\/\/customgpt.freshdesk.com\/support\/home) for further assistance." } } } } } } } }, "ProjectSourceNotFoundErrorResponse": { "description": "Agent source not found", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "error" }, "url": { "description": "The URL of the request", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/projects\/1" }, "data": { "type": "object", "properties": { "code": { "description": "The error status code", "enum": [ 400, 401, 403, 404, 500, 503 ], "type": "integer", "example": 404 }, "message": { "description": "The error message", "enum": [ "Agent source id is required", "Agent source with id {sourceId} not found" ], "type": "string", "example": "Agent source with id 1 not found" } } } } } } } }, "CreatePageMetadataErrorResponse": { "description": "Create page metadata failed", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "error" }, "url": { "description": "The URL of the request", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/projects\/1" }, "data": { "type": "object", "properties": { "code": { "description": "The error status code", "enum": [ 400, 401, 403, 404, 500, 503 ], "type": "integer", "example": 400 }, "message": { "description": "The error message", "type": "string", "example": "Something went wrong." } } } } } } } }, "ApiTokenValidationErrorResponse": { "description": "API Token is either missing or invalid", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "error" }, "url": { "description": "The URL of the request", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/projects\/1" }, "data": { "type": "object", "properties": { "code": { "description": "The error status code", "enum": [ 400, 401, 403, 404, 500, 503 ], "type": "integer", "example": 401 }, "message": { "type": "string", "example": "API Token is either missing or invalid" } } } } } } } }, "ListProjectsResponse": { "description": "Successfully retrieved list of sources that belong to an agent.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "sitemaps": { "type": "array", "items": { "$ref": "#\/components\/schemas\/ProjectSource" } }, "uploads": { "$ref": "#\/components\/schemas\/ProjectSource" } } } } } } } }, "ProjectStatsResponse": { "description": "Agent stats", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "pages_found": { "description": "Number of documents added to the agent", "type": "integer", "example": 100 }, "pages_crawled": { "description": "Number of documents successfully read by the the agent", "type": "integer", "example": 100 }, "pages_indexed": { "description": "Number of documents available in the agent's knowledge", "type": "integer", "example": 100 }, "crawl_credits_used": { "description": "Number of read credits used by the agent", "type": "integer", "example": 100 }, "query_credits_used": { "description": "Number of query credits used by the agent", "type": "integer", "example": 100 }, "total_queries": { "description": "Number of queries used by the agent", "type": "integer", "example": 100 }, "total_words_indexed": { "description": "Number of word processing credits used by the agent", "type": "integer", "example": 100 }, "total_storage_credits_used": { "description": "Number of words stored for the agent", "type": "integer", "example": 100 } } } } } } } }, "CreateConversationResponse": { "description": "Create a new conversation", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/Conversation" } } } } } }, "ProjectLicenseListResponse": { "description": "List of available agent licenses", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "type": "array", "items": { "$ref": "#\/components\/schemas\/ProjectLicense" } } } } } } }, "UpdateProjectResponse": { "description": "Agent has been updated", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/Project" } } } } } }, "UnsupportedArgumentsResponse": { "description": "Unsupported Argument", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "error" }, "url": { "description": "The URL of the request", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/projects\/1" }, "data": { "type": "object", "properties": { "code": { "description": "The error status code", "enum": [ 400, 401, 403, 404, 500, 503 ], "type": "integer", "example": 501 }, "message": { "description": "The error message", "type": "string", "example": "audio is not yet supported. Please remove them from your request and try again." } } } } } } } }, "SendConversationMessageOpenAI": { "description": "OpenAI chat completion response", "content": { "application\/json": { "schema": { "type": "object", "properties": { "id": { "type": "string", "example": "176" }, "object": { "type": "string", "example": "chat.completion" }, "created": { "type": "integer", "example": 1743037634 }, "model": { "type": "string", "nullable": true }, "usage": { "type": "object", "properties": { "prompt_tokens": { "type": "integer", "example": 0 }, "completion_tokens": { "type": "integer", "example": 0 }, "total_tokens": { "type": "integer", "example": 0 }, "completion_tokens_details": { "type": "object", "properties": { "reasoning_tokens": { "type": "integer", "example": 0 }, "accepted_prediction_tokens": { "type": "integer", "example": 0 }, "rejected_prediction_tokens": { "type": "integer", "example": 0 } } } } }, "choices": { "type": "array", "items": { "type": "object", "properties": { "message": { "type": "object", "properties": { "role": { "type": "string", "example": "assistant" }, "content": { "type": "string", "example": "Hello! How can I assist you today?" } } }, "logprobs": { "type": "string", "nullable": true }, "finish_reason": { "type": "string", "example": "stop" }, "index": { "type": "integer", "example": 0 } } } } } } } } }, "UpdateMessageFeedbackResponse": { "description": "Feedback has been updated", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/PromptHistory" } } } } } }, "PageReindexErrorResponse": { "description": "Document couldn't have been updated", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "error" }, "url": { "description": "The URL of the request", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/projects\/1" }, "data": { "type": "object", "properties": { "code": { "description": "The error status code", "enum": [ 400, 401, 403, 404, 500, 503 ], "type": "integer", "example": 400 }, "message": { "description": "The error message", "enum": [ "The Document with the id {pageId} couldn't have been updated" ], "type": "string", "example": "The Document with the id 1 couldn't have been updated" } } } } } } } }, "UpdateProjectPluginResponse": { "description": "Agent plugin have been updated", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/ProjectPlugin" } } } } } }, "SendConversationResponse": { "description": "Send a message to a conversation", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/PromptHistory" } } } } } }, "ProjectNotFoundErrorResponse": { "description": "Agent not found", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "error" }, "url": { "description": "The URL of the request", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/projects\/1" }, "data": { "type": "object", "properties": { "code": { "description": "The error status code", "enum": [ 400, 401, 403, 404, 500, 503 ], "type": "integer", "example": 404 }, "message": { "description": "The error message", "enum": [ "Agent id is required", "Agent with id {projectId} not found" ], "type": "string", "example": "Agent with id 1 not found" } } } } } } } }, "PageNotFoundErrorResponse": { "description": "Page not found", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "error" }, "url": { "description": "The URL of the request", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/projects\/1" }, "data": { "type": "object", "properties": { "code": { "description": "The error status code", "enum": [ 400, 401, 403, 404, 500, 503 ], "type": "integer", "example": 404 }, "message": { "description": "The error message", "enum": [ "Page id is required", "Page with id {pageId} not found" ], "type": "string", "example": "Page with id 1 not found" } } } } } } } }, "ProjectLicenseDeletedResponse": { "description": "Deleted agent license", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "deleted": { "description": "The agent license has been deleted", "type": "boolean", "example": true } } } } } } } }, "ListProjectResponse": { "description": "Retrieve certain agent that belongs to the user", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/Project" } } } } } }, "BadArgumentErrorResponse": { "description": "Bad Argument", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "error" }, "url": { "description": "The URL of the request", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/projects\/1" }, "data": { "type": "object", "properties": { "code": { "description": "The error status code", "enum": [ 400, 401, 403, 404, 500, 503 ], "type": "integer", "example": 400 }, "message": { "description": "The error message", "type": "string", "example": "Agent id must be integer" } } } } } } } }, "ProjectCreatedResponse": { "description": "Agent has been created", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/Project" } } } } } }, "SyncProjectSourceResponse": { "description": "Agent source sync started.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/ProjectSource" } } } } } }, "ListProjectPluginResponse": { "description": "Agent plugin that belongs to a certain agent", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/ProjectPlugin" } } } } } }, "InternalServerErrorResponse": { "description": "Internal Server Error", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "error" }, "url": { "description": "The URL of the request", "type": "string", "example": "https:\/\/app.customgpt.ai\/api\/v1\/projects\/1" }, "data": { "type": "object", "properties": { "code": { "description": "The error status code", "enum": [ 400, 401, 403, 404, 500, 503 ], "type": "integer", "example": 500 }, "message": { "type": "string", "example": "Internal Server Error" } } } } } } } }, "DeleteProjectResponse": { "description": "Agent deleted successfully", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "type": "object", "properties": { "deleted": { "description": "Whether the agent was deleted successfully or not", "type": "boolean", "example": true } } } } } } } }, "CreateProjectSourceResponse": { "description": "Successfully created a new agent source.", "content": { "application\/json": { "schema": { "type": "object", "properties": { "status": { "description": "The status of the response", "enum": [ "error", "success" ], "type": "string", "example": "success" }, "data": { "$ref": "#\/components\/schemas\/ProjectSource" } } } } } } }, "securitySchemes": { "BearerToken": { "type": "http", "scheme": "bearer", "bearerFormat": "JWT" } } }, "tags": [ { "name": "Agents", "description": "API Endpoints for Agents" }, { "name": "Pages", "description": "API Endpoints for Pages" }, { "name": "Users", "description": "API Endpoints for Users" }, { "name": "Agent Settings", "description": "API Endpoints for Agent Settings" }, { "name": "Agent Plugins", "description": "API Endpoints for Agent Plugins" }, { "name": "Conversations", "description": "API Endpoints for Conversations" }, { "name": "Citations", "description": "API Endpoints for Citations" } ], "x-readme": { "explorer-enabled": true, "proxy-enabled": true, "samples-enabled": true } }