{"openapi":"3.0.3","info":{"version":"2025-03-25","title":"Sensay API","description":"You can find out more about the Sensay API in the [Sensay API Documentation](https://docs.sensay.io)."},"servers":[{"url":"https://api.sensay.io","description":"Production environment"}],"components":{"securitySchemes":{"AuthorizationBearerToken":{"type":"http","scheme":"bearer","bearerFormat":"opaque","description":"Authorization Bearer Token"},"OrganizationServiceToken":{"type":"apiKey","in":"header","name":"X-ORGANIZATION-SECRET","description":"Organization Service Token"},"UserID":{"type":"apiKey","in":"header","name":"X-USER-ID","description":"User ID"},"UserIDType":{"type":"apiKey","in":"header","name":"X-USER-ID-TYPE","description":"User ID Type"}},"headers":{"X-API-Version":{"description":"API version","schema":{"type":"string","default":"2025-03-25"}}},"schemas":{"LargeLanguageModels":{"type":"object","properties":{"asi1-mini":{"type":"object","properties":{"name":{"type":"string","default":"ASI:One Mini"},"description":{"type":"string","default":"General-purpose model for everyday agentic workflows and Web3 applications."},"deprecated":{"type":"boolean","default":false}},"additionalProperties":false},"claude-3-7-sonnet-latest":{"type":"object","properties":{"name":{"type":"string","default":"Claude 3.7 Sonnet"},"description":{"type":"string","default":"Fast, responsive, and great for everyday tasks and smooth conversations. Handles most queries well with a light, natural tone."},"deprecated":{"type":"boolean","default":false}},"additionalProperties":false},"claude-haiku-4-5":{"type":"object","properties":{"name":{"type":"string","default":"Claude Haiku 4.5"},"description":{"type":"string","default":"Fast and highly efficient model optimized for quick responses, high-volume tasks, and cost-effective operations with reliable performance."},"deprecated":{"type":"boolean","default":false}},"additionalProperties":false},"claude-sonnet-4-5":{"type":"object","properties":{"name":{"type":"string","default":"Claude Sonnet 4.5"},"description":{"type":"string","default":"Advanced reasoning model with enhanced capabilities for complex problem-solving, coding, and analytical tasks."},"deprecated":{"type":"boolean","default":false}},"additionalProperties":false},"deepseek-chat":{"type":"object","properties":{"name":{"type":"string","default":"DeepSeek v3"},"description":{"type":"string","default":"Fast and to the point, great for short, clear answers. Not as detailed in complex topics."},"deprecated":{"type":"boolean","default":false}},"additionalProperties":false},"gemini-2.5-flash":{"type":"object","properties":{"name":{"type":"string","default":"Google Gemini 2.5 Flash"},"description":{"type":"string","default":"Fast and efficient model with strong multimodal capabilities. Excellent for text, image, and code understanding with quick response times."},"deprecated":{"type":"boolean","default":false}},"additionalProperties":false},"gemini-2.5-pro":{"type":"object","properties":{"name":{"type":"string","default":"Google Gemini 2.5 Pro"},"description":{"type":"string","default":"Advanced multimodal model with superior reasoning capabilities. Excels at complex analysis, research tasks, and handling large contexts with high accuracy."},"deprecated":{"type":"boolean","default":false}},"additionalProperties":false},"gemini-3-pro-preview":{"type":"object","properties":{"name":{"type":"string","default":"Google Gemini 3 Pro Preview"},"description":{"type":"string","default":"Preview version of the next-generation Gemini model with enhanced capabilities for advanced reasoning, multimodal understanding, and complex task handling."},"deprecated":{"type":"boolean","default":false}},"additionalProperties":false},"gpt-4o":{"type":"object","properties":{"name":{"type":"string","default":"GPT-4o"},"description":{"type":"string","default":"A well-balanced model with strong reasoning and problem-solving abilities. Great for structured responses."},"deprecated":{"type":"boolean","default":false}},"additionalProperties":false},"gpt-4o-mini":{"type":"object","properties":{"name":{"type":"string","default":"GPT-4o Mini"},"description":{"type":"string","default":"Smaller, faster, and more affordable version of GPT-4o for everyday tasks and high-volume use cases."},"deprecated":{"type":"boolean","default":false}},"additionalProperties":false},"gpt-5":{"type":"object","properties":{"name":{"type":"string","default":"GPT-5"},"description":{"type":"string","default":"The best GPT model for coding and agentic tasks across domains."},"deprecated":{"type":"boolean","default":false}},"additionalProperties":false},"gpt-5.1":{"type":"object","properties":{"name":{"type":"string","default":"GPT-5.1"},"description":{"type":"string","default":"Enhanced version of GPT-5 with improved performance and capabilities for advanced coding and agentic workflows."},"deprecated":{"type":"boolean","default":false}},"additionalProperties":false},"gpt-5-mini":{"type":"object","properties":{"name":{"type":"string","default":"GPT-5 Mini"},"description":{"type":"string","default":"A faster, more cost-efficient version of GPT-5 for well-defined tasks and precise prompts."},"deprecated":{"type":"boolean","default":false}},"additionalProperties":false},"gpt-5-nano":{"type":"object","properties":{"name":{"type":"string","default":"GPT-5 Nano"},"description":{"type":"string","default":"Fastest, most cost-efficient version of GPT-5. It's great for summarization and classification tasks."},"deprecated":{"type":"boolean","default":false}},"additionalProperties":false},"grok-3-latest":{"type":"object","properties":{"name":{"type":"string","default":"Grok 3"},"description":{"type":"string","default":"Advanced model for creative and engaging conversations. Offers improved reasoning while maintaining a dynamic and fun personality."},"deprecated":{"type":"boolean","default":false}},"additionalProperties":false},"grok-4-latest":{"type":"object","properties":{"name":{"type":"string","default":"Grok 4"},"description":{"type":"string","default":"Latest generation Grok model with enhanced reasoning capabilities and improved accuracy for both creative and analytical tasks."},"deprecated":{"type":"boolean","default":false}},"additionalProperties":false},"o3-mini":{"type":"object","properties":{"name":{"type":"string","default":"O3 Mini"},"description":{"type":"string","default":"Handles large amounts of context well, good for general use, but not as advanced in complex reasoning."},"deprecated":{"type":"boolean","default":false}},"additionalProperties":false},"targon-gpt-oss-120b":{"type":"object","properties":{"name":{"type":"string","default":"Targon GPT OSS 120B"},"description":{"type":"string","default":"Large open-source model with strong reasoning and versatile generation. Well-suited for complex tasks and broad domain applications."},"deprecated":{"type":"boolean","default":true}},"additionalProperties":false},"mistral-large":{"type":"object","properties":{"name":{"type":"string","default":"Mistral Large"},"description":{"type":"string","default":"Advanced reasoning model with strong performance across diverse tasks. Excellent for complex analysis, coding, and multilingual applications."},"deprecated":{"type":"boolean","default":false}},"additionalProperties":false}},"required":["asi1-mini","claude-3-7-sonnet-latest","claude-haiku-4-5","claude-sonnet-4-5","deepseek-chat","gemini-2.5-flash","gemini-2.5-pro","gemini-3-pro-preview","gpt-4o","gpt-4o-mini","gpt-5","gpt-5.1","gpt-5-mini","gpt-5-nano","grok-3-latest","grok-4-latest","o3-mini","targon-gpt-oss-120b","mistral-large"],"additionalProperties":false,"description":"Available Large Language Models (LLMs). Each key represents a model ID."},"replicaUUID_parameter":{"type":"string","format":"uuid","description":"The replica unique identifier (UUID)","example":"03db5651-cb61-4bdf-9ef0-89561f7c9c53"},"knowledgeBaseID_parameter":{"type":"number","description":"The unique identifier of the knowledge base entry","example":12345},"KnowledgeBaseLanguage":{"type":"string","enum":["ab","aa","af","ak","sq","am","ar","an","hy","as","av","ae","ay","az","ba","bm","eu","be","bn","bh","bi","bs","br","bg","my","ca","ch","ce","ny","zh","cu","cv","kw","co","cr","hr","cs","da","dv","nl","dz","en","eo","et","ee","fo","fj","fi","fr","ff","gl","ka","de","el","kl","gn","gu","ht","ha","he","hz","hi","ho","hu","is","io","ig","id","ia","ie","iu","ik","ga","it","ja","jv","kn","kr","ks","kk","km","ki","rw","ky","kv","kg","ko","ku","kj","la","lb","lg","li","ln","lo","lt","lu","lv","gv","mk","mg","ms","ml","mt","mi","mr","mh","mn","na","nv","nd","ne","ng","nb","nn","no","ii","nr","oc","oj","om","or","os","pa","pi","fa","pl","ps","pt","qu","rm","rn","ro","ru","sa","sc","sd","se","sm","sg","sr","gd","sn","si","sk","sl","so","st","es","su","sw","ss","sv","ta","te","tg","th","ti","bo","tk","tl","tn","to","tr","ts","tt","tw","ty","ug","uk","ur","uz","ve","vi","vo","wa","cy","wo","xh","yi","yo","za","zu"],"description":"The language of the knowledge base entry content. Uses ISO 639-1 language codes for language-specific processing and retrieval.","example":"en"}},"parameters":{}},"paths":{"/v1/api-keys/invites/{code}/redeem":{"post":{"tags":["API Keys"],"summary":"Redeem an API key invitation","description":"\n  If you have an invitation code, you can redeem it to create an Organization and an API key associated with it.\n  ","parameters":[{"schema":{"type":"string","description":"The code of the invite you want to redeem."},"required":true,"description":"The code of the invite you want to redeem.","name":"code","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"},{"schema":{"type":"string","enum":["gzip"],"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data."},"required":false,"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data.","name":"Content-Encoding","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"organizationName":{"type":"string","description":"The name of the organization you want to create."},"name":{"type":"string","description":"The name of the point of contact for the API subscription."},"email":{"type":"string","format":"email","description":"The email of the point of contact for the API subscription."}},"required":["organizationName","name","email"],"additionalProperties":false}}}},"responses":{"200":{"description":"Details about the created Organization and API Key.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","enum":[true]},"apiKey":{"type":"string","description":"The API key you will need to use to authenticate your requests. The key cannot be retrieved again after it is created: keep it safe."},"organizationID":{"type":"string","description":"The ID of the organization you have just created. You will need this ID to communicate with our team. Keep it safe."},"validUntil":{"type":"string","nullable":true,"description":"The date until which the API subscroption is valid."}},"required":["success","apiKey","organizationID","validUntil"],"additionalProperties":false,"example":{"success":true,"apiKey":"1234567890","organizationID":"1234567890","validUntil":"2021-01-01"}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas/{replicaUUID}/chat/history":{"get":{"tags":["Chat history"],"summary":"Get chat history","description":"List chat history items of a Replica belonging to the logged in user.","security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"List the chat history of the replica by the currently logged in user","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"type":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string","description":"The content of the message","example":"Hello"},"created_at":{"type":"string","format":"date-time","description":"The date and time the message was created","example":"2024-09-24T09:09:55.66709+00:00"},"id":{"type":"number","description":"The ID of the message","example":1},"is_private":{"type":"boolean","description":"Whether the replica is private","example":false},"role":{"type":"string","enum":["user","assistant"],"description":"The role of the message","example":"user"},"source":{"type":"string","enum":["discord","telegram","embed","web","telegram_autopilot"],"description":"From which platform is message was sent from","example":"web"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","description":"The ID of the source","example":123},"score":{"type":"number","description":"Relevance score of the source","example":0.9},"status":{"type":"string","enum":["scored","unscored"],"description":"If the source has ever been scored or not","example":"scored"},"created_at":{"type":"string","format":"date-time","description":"When the source was created","example":"2024-03-15T14:30:00.000Z"},"name":{"type":"string","description":"The name of the source","example":"Q: Next, what’s your nationality?"},"content":{"type":"string","description":"The actual content retrieved from the source","example":"Next, what’s your nationality? Mars"}},"required":["id","score","status","created_at","name","content"]},"description":"The sources of information used to create the response via RAG (Retrieval-Augmented Generation)"},"user_uuid":{"type":"string","description":"The UUID of the user","example":"03db5651-cb61-4bdf-9ef0-89561f7c9c53"},"original_message_id":{"type":"string","nullable":true,"description":"The ID of the message from the LLM. Present when role is assistant. Will be removed in the future.","example":"msg-GbsIAyNcNZCMAaDET3zXhInw","deprecated":true}},"required":["content","created_at","id","is_private","role","source","sources","user_uuid","original_message_id"]}}},"required":["success","type"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"The replica specified could not be found or you do not have access to it"},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}},"post":{"tags":["Chat history"],"summary":"Create a chat history entry","description":"Save chat history items of a Replica belonging to the logged in user.","security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"},{"schema":{"type":"string","enum":["gzip"],"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data."},"required":false,"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data.","name":"Content-Encoding","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"description":"Content of the message","example":"How did you handle the immense pressure during the Civil War?"},"source":{"type":"string","enum":["discord","telegram","embed","web","telegram_autopilot"],"description":"The place where the conversation is happening, which informs where the message should be saved in the chat history."},"discord_data":{"type":"object","properties":{"channel_id":{"type":"string","description":"Channel ID"},"channel_name":{"type":"string","description":"Channel name"},"author_id":{"type":"string","description":"Author ID"},"author_name":{"type":"string","description":"Author name"},"message_id":{"type":"string","description":"Message ID"},"created_at":{"type":"string","description":"Message creation timestamp"},"server_id":{"type":"string","description":"Server ID"},"server_name":{"type":"string","description":"Server name"}},"required":["channel_id","channel_name","author_id","author_name","message_id"],"additionalProperties":false}},"required":["content"],"additionalProperties":false}}}},"responses":{"200":{"description":"Saves the chat history of the replica by the currently logged in user.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"}},"required":["success"]}}}},"404":{"description":"The replica specified could not be found or you do not have access to it"}}}},"/v1/replicas/{replicaUUID}/chat/history/telegram":{"get":{"tags":["Telegram integration"],"summary":"Get Telegram chat history","description":"List telegram chat history items of a Replica belonging to the logged in user.","security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"}],"responses":{"200":{"description":"List the chat history of the replica by the currently logged in user","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"type":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string","description":"The content of the message","example":"Hello"},"created_at":{"type":"string","format":"date-time","description":"The date and time the message was created","example":"2024-09-24T09:09:55.66709+00:00"},"id":{"type":"number","description":"The ID of the message","example":1},"is_private":{"type":"boolean","description":"Whether the replica is private","example":false},"role":{"type":"string","enum":["user","assistant"],"description":"The role of the message","example":"user"},"source":{"type":"string","enum":["discord","telegram","embed","web","telegram_autopilot"],"description":"From which platform is message was sent from","example":"web"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","description":"The ID of the source","example":123},"score":{"type":"number","description":"Relevance score of the source","example":0.9},"status":{"type":"string","enum":["scored","unscored"],"description":"If the source has ever been scored or not","example":"scored"},"created_at":{"type":"string","format":"date-time","description":"When the source was created","example":"2024-03-15T14:30:00.000Z"},"name":{"type":"string","description":"The name of the source","example":"Q: Next, what’s your nationality?"},"content":{"type":"string","description":"The actual content retrieved from the source","example":"Next, what’s your nationality? Mars"}},"required":["id","score","status","created_at","name","content"]},"description":"The sources of information used to create the response via RAG (Retrieval-Augmented Generation)"},"user_uuid":{"type":"string","description":"The UUID of the user","example":"03db5651-cb61-4bdf-9ef0-89561f7c9c53"},"original_message_id":{"type":"string","nullable":true,"description":"The ID of the message from the LLM. Present when role is assistant. Will be removed in the future.","example":"msg-GbsIAyNcNZCMAaDET3zXhInw","deprecated":true}},"required":["content","created_at","id","is_private","role","source","sources","user_uuid","original_message_id"]}}},"required":["success","type"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"The replica specified could not be found or you do not have access to it"},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}},"post":{"tags":["Telegram integration"],"summary":"Create a Telegram chat history entry","description":"Save chat history items of a Replica belonging to the logged in user.","security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"},{"schema":{"type":"string","enum":["gzip"],"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data."},"required":false,"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data.","name":"Content-Encoding","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"description":"Content of the message","example":"How did you handle the immense pressure during the Civil War?"},"telegram_data":{"type":"object","properties":{"chat_type":{"type":"string","description":"Type of the chat, can be either `private`, `group`, `supergroup` or `channel`."},"chat_id":{"type":"number","description":"Unique identifier for this chat."},"chat_name":{"type":"string","description":"Name of the chat (group name, channel title, or user display name for private chats)."},"user_id":{"type":"number","description":"Sender of the message's userID; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats."},"username":{"type":"string","description":"Sender of the message's username; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats."},"message_id":{"type":"number","description":"Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat)."},"message_thread_id":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Unique identifier of a message thread or a forum topic to which the message belongs; for supergroups only."}},"required":["chat_type","chat_id","message_id"],"additionalProperties":false}},"required":["content","telegram_data"],"additionalProperties":false}}}},"responses":{"200":{"description":"Saves the chat history of the replica by the currently logged in user.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"}},"required":["success"]}}}},"404":{"description":"The replica specified could not be found or you do not have access to it"}}}},"/v1/replicas/{replicaUUID}/chat/history/discord":{"get":{"tags":["Discord integration"],"summary":"Get Discord chat history","description":"List discord chat history items of a Replica belonging to the logged in user.","security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"}],"responses":{"200":{"description":"List the chat history of the replica by the currently logged in user","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"type":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string","description":"The content of the message","example":"Hello"},"created_at":{"type":"string","format":"date-time","description":"The date and time the message was created","example":"2024-09-24T09:09:55.66709+00:00"},"id":{"type":"number","description":"The ID of the message","example":1},"is_private":{"type":"boolean","description":"Whether the replica is private","example":false},"role":{"type":"string","enum":["user","assistant"],"description":"The role of the message","example":"user"},"source":{"type":"string","enum":["discord","telegram","embed","web","telegram_autopilot"],"description":"From which platform is message was sent from","example":"web"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","description":"The ID of the source","example":123},"score":{"type":"number","description":"Relevance score of the source","example":0.9},"status":{"type":"string","enum":["scored","unscored"],"description":"If the source has ever been scored or not","example":"scored"},"created_at":{"type":"string","format":"date-time","description":"When the source was created","example":"2024-03-15T14:30:00.000Z"},"name":{"type":"string","description":"The name of the source","example":"Q: Next, what’s your nationality?"},"content":{"type":"string","description":"The actual content retrieved from the source","example":"Next, what’s your nationality? Mars"}},"required":["id","score","status","created_at","name","content"]},"description":"The sources of information used to create the response via RAG (Retrieval-Augmented Generation)"},"user_uuid":{"type":"string","description":"The UUID of the user","example":"03db5651-cb61-4bdf-9ef0-89561f7c9c53"},"original_message_id":{"type":"string","nullable":true,"description":"The ID of the message from the LLM. Present when role is assistant. Will be removed in the future.","example":"msg-GbsIAyNcNZCMAaDET3zXhInw","deprecated":true}},"required":["content","created_at","id","is_private","role","source","sources","user_uuid","original_message_id"]}}},"required":["success","type"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"The replica specified could not be found or you do not have access to it"},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas/{replicaUUID}/chat/history/web":{"get":{"tags":["Chat history"],"summary":"Get Web chat history","description":"List web chat history items of a Replica belonging to the logged in user.","security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"}],"responses":{"200":{"description":"List the chat history of the replica by the currently logged in user","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"type":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string","description":"The content of the message","example":"Hello"},"created_at":{"type":"string","format":"date-time","description":"The date and time the message was created","example":"2024-09-24T09:09:55.66709+00:00"},"id":{"type":"number","description":"The ID of the message","example":1},"is_private":{"type":"boolean","description":"Whether the replica is private","example":false},"role":{"type":"string","enum":["user","assistant"],"description":"The role of the message","example":"user"},"source":{"type":"string","enum":["discord","telegram","embed","web","telegram_autopilot"],"description":"From which platform is message was sent from","example":"web"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","description":"The ID of the source","example":123},"score":{"type":"number","description":"Relevance score of the source","example":0.9},"status":{"type":"string","enum":["scored","unscored"],"description":"If the source has ever been scored or not","example":"scored"},"created_at":{"type":"string","format":"date-time","description":"When the source was created","example":"2024-03-15T14:30:00.000Z"},"name":{"type":"string","description":"The name of the source","example":"Q: Next, what’s your nationality?"},"content":{"type":"string","description":"The actual content retrieved from the source","example":"Next, what’s your nationality? Mars"}},"required":["id","score","status","created_at","name","content"]},"description":"The sources of information used to create the response via RAG (Retrieval-Augmented Generation)"},"user_uuid":{"type":"string","description":"The UUID of the user","example":"03db5651-cb61-4bdf-9ef0-89561f7c9c53"},"original_message_id":{"type":"string","nullable":true,"description":"The ID of the message from the LLM. Present when role is assistant. Will be removed in the future.","example":"msg-GbsIAyNcNZCMAaDET3zXhInw","deprecated":true}},"required":["content","created_at","id","is_private","role","source","sources","user_uuid","original_message_id"]}}},"required":["success","type"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"The replica specified could not be found or you do not have access to it"},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas/{replicaUUID}/chat/history/embed":{"get":{"tags":["Chat-widget integration"],"summary":"Get Embed chat history","description":"List embed chat history items of a Replica belonging to the logged in user.","security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"}],"responses":{"200":{"description":"List the chat history of the replica by the currently logged in user","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"type":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string","description":"The content of the message","example":"Hello"},"created_at":{"type":"string","format":"date-time","description":"The date and time the message was created","example":"2024-09-24T09:09:55.66709+00:00"},"id":{"type":"number","description":"The ID of the message","example":1},"is_private":{"type":"boolean","description":"Whether the replica is private","example":false},"role":{"type":"string","enum":["user","assistant"],"description":"The role of the message","example":"user"},"source":{"type":"string","enum":["discord","telegram","embed","web","telegram_autopilot"],"description":"From which platform is message was sent from","example":"web"},"sources":{"type":"array","items":{"type":"object","properties":{"id":{"type":"number","description":"The ID of the source","example":123},"score":{"type":"number","description":"Relevance score of the source","example":0.9},"status":{"type":"string","enum":["scored","unscored"],"description":"If the source has ever been scored or not","example":"scored"},"created_at":{"type":"string","format":"date-time","description":"When the source was created","example":"2024-03-15T14:30:00.000Z"},"name":{"type":"string","description":"The name of the source","example":"Q: Next, what’s your nationality?"},"content":{"type":"string","description":"The actual content retrieved from the source","example":"Next, what’s your nationality? Mars"}},"required":["id","score","status","created_at","name","content"]},"description":"The sources of information used to create the response via RAG (Retrieval-Augmented Generation)"},"user_uuid":{"type":"string","description":"The UUID of the user","example":"03db5651-cb61-4bdf-9ef0-89561f7c9c53"},"original_message_id":{"type":"string","nullable":true,"description":"The ID of the message from the LLM. Present when role is assistant. Will be removed in the future.","example":"msg-GbsIAyNcNZCMAaDET3zXhInw","deprecated":true}},"required":["content","created_at","id","is_private","role","source","sources","user_uuid","original_message_id"]}}},"required":["success","type"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"The replica specified could not be found or you do not have access to it"},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas/{replicaUUID}/chat/completions":{"post":{"tags":["Chat completions"],"summary":"Generate a completion","description":"\n  Ask for a completion and stores the prompt in the chat history.\n\n  Replica chat supports two response formats: streamed and JSON. To switch between these formats, use the 'Accept' header, specifying either 'text/event-stream' for streaming or 'application/json' for JSON.\n  The streamed response honours the [Stream Protocol](https://sdk.vercel.ai/docs/ai-sdk-ui/stream-protocol), allowing the use of a number of SDKs, including [Vercel AI SDK](https://sdk.vercel.ai/docs/introduction).\n\n  The streamed variant is not specified in the OpenAPI Schema because it is not an OpenAPI endpoint.\n  ","security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"},{"schema":{"type":"string","enum":["gzip"],"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data."},"required":false,"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data.","name":"Content-Encoding","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":100000,"description":"The prompt to generate completions for, encoded as a string.","example":"How did you handle the immense pressure during the Civil War?"},"skip_chat_history":{"type":"boolean","default":false,"description":"When set to true, historical messages are not used in the context, and the message is not appended to the conversation history, thus it is excluded from all future chat context."},"source":{"type":"string","enum":["discord","telegram","embed","web","telegram_autopilot"],"description":"The place where the conversation is happening, which informs where the message should be saved in the chat history."},"discord_data":{"type":"object","properties":{"channel_id":{"type":"string","description":"Channel ID"},"channel_name":{"type":"string","description":"Channel name"},"author_id":{"type":"string","description":"Author ID"},"author_name":{"type":"string","description":"Author name"},"message_id":{"type":"string","description":"Message ID"},"created_at":{"type":"string","description":"Message creation timestamp"},"server_id":{"type":"string","description":"Server ID"},"server_name":{"type":"string","description":"Server name"}},"required":["channel_id","channel_name","author_id","author_name","message_id"],"additionalProperties":false},"usageLimits":{"type":"object","properties":{"conversations":{"type":"object","properties":{"monthlyQuota":{"type":"number","description":"The number of conversations allowed for this account in the current calendar month."}},"required":["monthlyQuota"]}},"description":"Usage policies and quotas to enforce for this completion request"}},"required":["content"],"additionalProperties":false}}}},"responses":{"200":{"description":"List of chat messages had with a replica by the current user, including the completion","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"content":{"type":"string"}},"required":["success","content"],"example":{"success":true,"content":"I handled the immense pressure during the Civil War by..."}}},"text/event-stream":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"content":{"type":"string"}},"required":["success","content"],"example":{"success":true,"content":"I handled the immense pressure during the Civil War by..."}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"429":{"description":"The monthly conversation quota specified in the request has been exceeded.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"The monthly conversation quota specified in the request has been exceeded. To fix this, increase the monthlyQuota value in your request's monthlyQuota parameter or wait until the next month when the conversation usage counter resets.","error_code":"CONVERSATION_QUOTA_EXCEEDED","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"description":"Returned when the current month's conversation usage exceeds the monthlyQuota specified in the request's usageLimits.conversations parameter. To resolve, either increase the monthlyQuota value in your request or wait until the next month when conversation usage counter resets."}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas/{replicaUUID}/chat/completions/telegram":{"post":{"tags":["Telegram integration"],"summary":"Generate a Telegram completion","description":"\n    Ask for a completion and stores the prompt in the chat history.\n\n    Replica chat supports two response formats: streamed and JSON. To switch between these formats, use the 'Accept' header, specifying either 'text/event-stream' for streaming or 'application/json' for JSON.\n    The streamed response honours the [Stream Protocol](https://sdk.vercel.ai/docs/ai-sdk-ui/stream-protocol), allowing the use of a number of SDKs, including [Vercel AI SDK](https://sdk.vercel.ai/docs/introduction).\n\n    The streamed variant is not specified in the OpenAPI Schema because it is not an OpenAPI endpoint.\n    ","security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"},{"schema":{"type":"string","enum":["gzip"],"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data."},"required":false,"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data.","name":"Content-Encoding","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"content":{"type":"string","minLength":1,"maxLength":100000,"description":"The prompt to generate completions for, encoded as a string.","example":"How did you handle the immense pressure during the Civil War?"},"skip_chat_history":{"type":"boolean","default":false,"description":"When set to true, historical messages are not used in the context, and the message is not appended to the conversation history, thus it is excluded from all future chat context."},"imageURL":{"type":"string","pattern":"https?:\\/\\/[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]+\\b([-a-zA-Z0-9()@:%_+.~#?&\\/=]*)","description":"The URL of the image to be used as context for the completion.","example":"https://images.invalid/photo.jpeg","x-beta":true},"telegram_data":{"type":"object","properties":{"chat_type":{"type":"string","description":"Type of the chat, can be either `private`, `group`, `supergroup` or `channel`."},"chat_id":{"type":"number","description":"Unique identifier for this chat."},"chat_name":{"type":"string","description":"Name of the chat (group name, channel title, or user display name for private chats)."},"user_id":{"type":"number","description":"Sender of the message's userID; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats."},"username":{"type":"string","description":"Sender of the message's username; may be empty for messages sent to channels. For backward compatibility, if the message was sent on behalf of a chat, the field contains a fake sender user in non-channel chats."},"message_id":{"type":"number","description":"Unique message identifier inside this chat. In specific instances (e.g., message containing a video sent to a big chat)."},"message_thread_id":{"type":"number","minimum":0,"exclusiveMinimum":true,"description":"Unique identifier of a message thread or a forum topic to which the message belongs; for supergroups only."}},"required":["chat_type","chat_id","message_id"],"additionalProperties":false}},"required":["content","telegram_data"],"additionalProperties":false}}}},"responses":{"200":{"description":"List of chat messages had with a replica by the current user, including the completion","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"content":{"type":"string"}},"required":["success","content"],"example":{"success":true,"content":"I handled the immense pressure during the Civil War by..."}}},"text/event-stream":{"schema":{"type":"object","properties":{"success":{"type":"boolean"},"content":{"type":"string"}},"required":["success","content"],"example":{"success":true,"content":"I handled the immense pressure during the Civil War by..."}}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/experimental/replicas/{replicaUUID}/chat/completions":{"post":{"tags":["Experimental","Chat completions"],"summary":"Generate a completion (OpenAI-compatible, non-streaming)","description":"\n  > warn\n  > Limited [OpenAI Chat Completions API](https://platform.openai.com/docs/api-reference/chat/create) compatibility.\n  > Supports basic chat completion with standard message roles and JSON responses.\n  > Not supported: OpenAI-style streaming, tool calls, stop sequences, logprobs, and most request parameters.\n\n  Creates a chat completion response from a list of messages comprising a conversation.\n  ","security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]}],"x-beta":true,"parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"},{"schema":{"type":"string","enum":["gzip"],"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data."},"required":false,"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data.","name":"Content-Encoding","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["assistant","developer","system","tool","user"],"description":"The role of the message author. Can be \"assistant\", \"developer\", \"system\", \"tool\", or \"user\".","example":"user"},"content":{"type":"string","minLength":1,"maxLength":100000,"description":"The content of the message.","example":"How did you handle the immense pressure during the Civil War?"},"name":{"type":"string","description":"An optional name for the participant. Provides the model information to differentiate between participants of the same role.","example":"example_user"}},"required":["role","content"]},"description":"A list of messages that make up the conversation context. Only the last message is used for completion.","example":[{"role":"system","content":"You are a helpful assistant."},{"role":"user","content":"How did you handle the immense pressure during the Civil War?"}]},"store":{"type":"boolean","default":true,"description":"When set to false, historical messages are not used in the context, and the message is not appended to the conversation history.","example":true},"source":{"type":"string","enum":["discord","embed","web"],"default":"web","description":"The place where the conversation is happening, which informs where the message should be saved in the chat history if `store` is true.","example":"web"},"discord_data":{"type":"object","properties":{"channel_id":{"type":"string","description":"Channel ID"},"channel_name":{"type":"string","description":"Channel name"},"author_id":{"type":"string","description":"Author ID"},"author_name":{"type":"string","description":"Author name"},"message_id":{"type":"string","description":"Message ID"},"created_at":{"type":"string","description":"Message creation timestamp"},"server_id":{"type":"string","description":"Server ID"},"server_name":{"type":"string","description":"Server name"}},"required":["channel_id","channel_name","author_id","author_name","message_id"],"additionalProperties":false}},"required":["messages"]}}}},"responses":{"200":{"description":"Chat completion response in OpenAI compatible format","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"A unique identifier for the chat completion.","example":"chatcmpl-abc123"},"created":{"type":"integer","description":"The Unix timestamp (in seconds) of when the chat completion was created.","example":1677858242},"object":{"type":"string","enum":["chat.completion"],"description":"The object type, which is always \"chat.completion\"","example":"chat.completion"},"model":{"type":"string","description":"The model used for the chat completion.","example":"o1"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","description":"The index of the choice in the array.","example":0},"message":{"type":"object","properties":{"role":{"type":"string","enum":["assistant"],"description":"The role of the message author, which is always \"assistant\" for completions.","example":"assistant"},"content":{"type":"string","description":"The content of the message.","example":"During the Civil War, I faced tremendous pressure..."},"tool_calls":{"type":"array","items":{"nullable":true},"description":"The tool calls generated by the model, such as function calls."}},"required":["role","content"],"description":"The message generated by the model."},"logprobs":{"nullable":true,"description":"Log probabilities for token generation if requested."},"finish_reason":{"type":"string","enum":["stop","length","tool_calls","content_filter","function_call"],"description":"The reason the model stopped generating tokens.","example":"stop"}},"required":["index","message","finish_reason"]},"description":"An array of chat completion choices."},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","description":"Number of tokens in the prompt.","example":56},"completion_tokens":{"type":"integer","description":"Number of tokens in the generated completion.","example":31},"total_tokens":{"type":"integer","description":"Total number of tokens used (prompt + completion).","example":87}},"required":["prompt_tokens","completion_tokens","total_tokens"],"description":"Usage statistics for the completion request."}},"required":["id","created","object","model","choices","usage"],"description":"The response format for chat completions."}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/users/me":{"get":{"tags":["Users"],"security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]}],"summary":"Get the current user","description":"Returns information about the current user.","parameters":[{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"User information","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"The email address","example":"user@example.com"},"id":{"type":"string","minLength":1,"description":"The ID of the user","example":"johndoe"},"linkedAccounts":{"type":"array","items":{"type":"object","properties":{"accountID":{"type":"string","description":"The account ID"},"accountType":{"type":"string","enum":["discord","telegram","embed"],"description":"The account type","example":"discord"}},"required":["accountID","accountType"],"additionalProperties":false},"description":"The linked accounts of the user"},"name":{"type":"string","description":"The name of the user","example":"John Doe"},"success":{"type":"boolean","enum":[true],"description":"Indicates the request was successful","example":true}},"required":["id","success"],"additionalProperties":false}}}}}},"delete":{"tags":["Users"],"security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]}],"summary":"Delete the current user","description":"This endpoint permanently deletes the currently authenticated user account, including all associated data. After deletion, the account cannot be recovered.","parameters":[{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"204":{"description":"User deleted successfully"},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}},"put":{"tags":["Users"],"security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]}],"summary":"Update the current user","description":"Update the currently logged in user.","parameters":[{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"},{"schema":{"type":"string","enum":["gzip"],"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data."},"required":false,"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data.","name":"Content-Encoding","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"The email address","example":"user@example.com"},"id":{"type":"string","minLength":1,"description":"The ID of the user","example":"johndoe"},"linkedAccounts":{"type":"array","items":{"type":"object","properties":{"accountID":{"type":"string","description":"The account ID"},"accountType":{"type":"string","enum":["discord","telegram","embed"],"description":"The account type","example":"discord"}},"required":["accountID","accountType"],"additionalProperties":false},"description":"The linked accounts of the user"},"name":{"type":"string","maxLength":50,"pattern":"^[a-zA-Z0-9\\s().,'\\-/]*$","description":"The name of the user (max 50 chars, letters/numbers/spaces and ( ) . , ' - /)","example":"John Doe"}},"required":["id"],"additionalProperties":false}}}},"responses":{"200":{"description":"The updated User entity","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"The email address","example":"user@example.com"},"id":{"type":"string","minLength":1,"description":"The ID of the user","example":"johndoe"},"linkedAccounts":{"type":"array","items":{"type":"object","properties":{"accountID":{"type":"string","description":"The account ID"},"accountType":{"type":"string","enum":["discord","telegram","embed"],"description":"The account type","example":"discord"}},"required":["accountID","accountType"],"additionalProperties":false},"description":"The linked accounts of the user"},"name":{"type":"string","description":"The name of the user","example":"John Doe"},"success":{"type":"boolean","enum":[true],"description":"Indicates the request was successful","example":true}},"required":["id","success"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"409":{"description":"Linked account or email already exists or is invalid","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/users":{"post":{"tags":["Users"],"security":[{"OrganizationServiceToken":[]}],"summary":"Create a user","description":"Creates a new user.","parameters":[{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"},{"schema":{"type":"string","enum":["gzip"],"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data."},"required":false,"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data.","name":"Content-Encoding","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"The email address","example":"user@example.com"},"id":{"type":"string","description":"The ID of the user"},"linkedAccounts":{"type":"array","items":{"type":"object","properties":{"accountID":{"type":"string","description":"The account ID"},"accountType":{"type":"string","enum":["discord","telegram","embed"],"description":"The account type","example":"discord"}},"required":["accountID","accountType"],"additionalProperties":false},"description":"The linked accounts of the user"},"name":{"type":"string","maxLength":50,"pattern":"^[a-zA-Z0-9\\s().,'\\-/]*$","description":"The name of the user (max 50 chars, letters/numbers/spaces and ( ) . , ' - /)","example":"John Doe"}},"additionalProperties":false}}}},"responses":{"200":{"description":"The created User entity","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"The email address","example":"user@example.com"},"id":{"type":"string","minLength":1,"description":"The ID of the user","example":"johndoe"},"linkedAccounts":{"type":"array","items":{"type":"object","properties":{"accountID":{"type":"string","description":"The account ID"},"accountType":{"type":"string","enum":["discord","telegram","embed"],"description":"The account type","example":"discord"}},"required":["accountID","accountType"],"additionalProperties":false},"description":"The linked accounts of the user"},"name":{"type":"string","description":"The name of the user","example":"John Doe"},"success":{"type":"boolean","enum":[true],"description":"Indicates the request was successful","example":true}},"required":["id","success"],"additionalProperties":false}}}},"409":{"description":"User, email, or linked account already exists","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}}}}},"/v1/users/{userID}":{"get":{"tags":["Users"],"security":[{"OrganizationServiceToken":[]}],"summary":"Get a user by ID","description":"Returns information about the user with the specified ID.","parameters":[{"schema":{"type":"string","minLength":1,"description":"User ID","example":"03db5651-cb61-4bdf-9ef0-89561f7c9c53"},"required":true,"description":"User ID","name":"userID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"User entity","content":{"application/json":{"schema":{"type":"object","properties":{"email":{"type":"string","format":"email","description":"The email address","example":"user@example.com"},"id":{"type":"string","minLength":1,"description":"The ID of the user","example":"johndoe"},"linkedAccounts":{"type":"array","items":{"type":"object","properties":{"accountID":{"type":"string","description":"The account ID"},"accountType":{"type":"string","enum":["discord","telegram","embed"],"description":"The account type","example":"discord"}},"required":["accountID","accountType"],"additionalProperties":false},"description":"The linked accounts of the user"},"name":{"type":"string","description":"The name of the user","example":"John Doe"},"success":{"type":"boolean","enum":[true],"description":"Indicates the request was successful","example":true}},"required":["id","success"],"additionalProperties":false}}}},"404":{"description":"User not found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}}}}},"/v1/users/me/usage":{"get":{"tags":["Usage"],"security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]}],"summary":"Get usage metrics","description":"Returns usage metrics including total conversations and knowledge base entries across all replicas owned by the authenticated user.","parameters":[{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"Usage metrics","content":{"application/json":{"schema":{"type":"object","properties":{"conversations":{"type":"object","properties":{"currentMonthTotal":{"type":"integer","minimum":0,"description":"Total conversations for the current calendar month"},"currentMonthByReplica":{"type":"object","additionalProperties":{"type":"integer","minimum":0,"description":"Count for this replica"},"description":"Current calendar month conversations breakdown by replica","example":{"14e42ac9-369e-432c-97ab-7e7250a779b7":5,"5ee26dc3-49d2-43a8-a45b-25a1c78382cd":12,"9c0cf332-387e-4067-96e5-007c1f03e0d4":3}}},"required":["currentMonthTotal","currentMonthByReplica"],"description":"Conversation usage metrics"},"knowledgeBaseEntries":{"type":"object","properties":{"total":{"type":"integer","minimum":0,"description":"Total knowledge base entries across all replicas","example":67},"byReplica":{"type":"object","additionalProperties":{"type":"integer","minimum":0,"description":"Count for this replica"},"description":"Knowledge base entries breakdown by replica","example":{"14e42ac9-369e-432c-97ab-7e7250a779b7":25,"5ee26dc3-49d2-43a8-a45b-25a1c78382cd":32,"9c0cf332-387e-4067-96e5-007c1f03e0d4":10}}},"required":["total","byReplica"],"description":"Knowledge base entries usage metrics"},"success":{"type":"boolean","enum":[true],"description":"Indicates the request was successful","example":true}},"required":["conversations","knowledgeBaseEntries","success"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas/{replicaUUID}/integrations/telegram":{"post":{"tags":["Telegram integration"],"security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"summary":"Create a replica Telegram integration","description":"Integrates a replica to Telegram. The default Sensay Telegram integration will run a bot for you until you delete the integration.","parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"},{"schema":{"type":"string","enum":["gzip"],"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data."},"required":false,"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data.","name":"Content-Encoding","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"telegram_token":{"type":"string","description":"Telegram Bot ID"},"mention":{"type":"string","description":"Telegram Bot Name"}},"required":["telegram_token","mention"],"additionalProperties":false}}}},"responses":{"200":{"description":"Telegram integration created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"id":{"type":"number"}},"required":["success","id"]}}}},"202":{"description":"Telegram integration created successfully, but failed to notify the external integration server. If you are using the default Sensay Telegram Integration, we will retry starting the bot asynchronously.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"id":{"type":"number"},"message":{"type":"string","description":"The reason why the operation is accepted instead of returning an immediate success.","example":"Telegram integration created successfully, but failed to notify the external integration server. If you are using the default Sensay Telegram Integration, we will retry starting the bot asynchronously."}},"required":["success","id","message"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}},"delete":{"tags":["Telegram integration"],"security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"summary":"Delete a replica Telegram integration","description":"Removes a replica Telegram integration.","parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"Telegram integration deleted successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"}},"required":["success"]}}}},"202":{"description":"Telegram integration deleted successfully, but failed to notify the external integration server. If you are using the default Sensay Telegram Integration, we will retry stopping the bot asynchronously.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"message":{"type":"string","description":"The reason why the operation is accepted instead of returning an immediate success.","example":"Telegram integration deleted successfully, but failed to notify the external integration server. If you are using the default Sensay Telegram Integration, we will retry stopping the bot asynchronously."}},"required":["success","message"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas/{replicaUUID}/integrations/discord":{"post":{"tags":["Discord integration"],"security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"summary":"Create a replica Discord integration","description":"Integrates a replica to Discord. The default Sensay Discord integration will run a bot for you until you delete the integration.","parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"},{"schema":{"type":"string","enum":["gzip"],"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data."},"required":false,"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data.","name":"Content-Encoding","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"discordToken":{"type":"string","minLength":50,"maxLength":80,"description":"A Discord Token is a unique token that can be attained from the Discord Developer Portal. It is used to connect the discord integration to the replica.","example":"MTI5NDMSaMDKWjk3Mjk1OTgyNw.GCxRSO.rpnw8-GreFn4Fst5dufQ2y1On_XgzbvTDnsQ"}},"required":["discordToken"],"additionalProperties":false}}}},"responses":{"200":{"description":"Discord integration created successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"}},"required":["success"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas":{"get":{"tags":["Replicas"],"security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"summary":"List replicas","description":"List replicas with pagination with optional filtering. Only Replicas that are public or belong to the authenticated user are returned.","parameters":[{"schema":{"type":"string","description":"Filters by the owner UUID of the Replicas"},"required":false,"description":"Filters by the owner UUID of the Replicas","name":"owner_uuid","in":"query"},{"schema":{"type":"string","description":"The replica owner ID."},"required":false,"description":"The replica owner ID.","name":"ownerID","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":1,"description":"Pagination: The page index to return"},"required":false,"description":"Pagination: The page index to return","name":"pageIndex","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"default":24,"description":"Pagination: The number of items per page"},"required":false,"description":"Pagination: The number of items per page","name":"pageSize","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Pagination: The page number to return (deprecated, use pageIndex instead)","deprecated":true},"required":false,"description":"Pagination: The page number to return (deprecated, use pageIndex instead)","name":"page","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Pagination: The page index to return (deprecated, use pageIndex instead)","deprecated":true},"required":false,"description":"Pagination: The page index to return (deprecated, use pageIndex instead)","name":"page_index","in":"query"},{"schema":{"type":"integer","minimum":0,"exclusiveMinimum":true,"description":"Pagination: The number of items per page (deprecated, use pageSize instead)","deprecated":true},"required":false,"description":"Pagination: The number of items per page (deprecated, use pageSize instead)","name":"page_size","in":"query"},{"schema":{"type":"string","description":"Filters by the replica's slug"},"required":false,"description":"Filters by the replica's slug","name":"slug","in":"query"},{"schema":{"type":"string","description":"Search: by name of Replica, sorted in ascending order"},"required":false,"description":"Search: by name of Replica, sorted in ascending order","name":"search","in":"query"},{"schema":{"type":"array","items":{"type":"string","enum":["AI","Academic","Arts","Blockchain","Business","Celebrity","Charity","Developer","Educator","Europe","Fashion","Finance","Food","Health & Fitness","History","Italian","Kids","Language","Law","Leadership","Lifestyle","Literature","Love","Military","Modelling","Motivation","Movies","Music","North America","Philosophy","Politics","Religion","Science","Self-Help","Sensay","Sports","Technology","Web","Wisdom","blockchain","engage2earn","female","investment","male","meme","miniapp","telegram","web3"]},"description":"Filters by tags associated to Replicas"},"required":false,"description":"Filters by tags associated to Replicas","name":"tags","in":"query"},{"schema":{"type":"string","enum":["name","popularity"],"default":"name","description":"Sorts by name or popularity of Replicas in ascending order"},"required":false,"description":"Sorts by name or popularity of Replicas in ascending order","name":"sort","in":"query"},{"schema":{"type":"string","enum":["telegram","discord"],"description":"Filters by integration"},"required":false,"description":"Filters by integration","name":"integration","in":"query"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"List of Replicas","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"type":{"type":"string"},"items":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","maxLength":50,"description":"The name of the replica.","example":"John Smith"},"purpose":{"type":"string","maxLength":1000,"description":"The purpose of the replica. This field is not used for training the replica.","example":"Acts as my AI twin for answering questions about my creative work."},"shortDescription":{"type":"string","maxLength":50,"description":"A short description of your replica. This field is not used for training the replica.","example":"Accountant from Brooklyn who loves sports."},"greeting":{"type":"string","maxLength":600,"description":"The first thing your replica will say when you start a conversation with them.","example":"What would you like to know?"},"type":{"type":"string","enum":["individual","character","brand"],"default":"character","description":"The replica type.\n`individual`: A replica of yourself.\n`character`: A replica of a character: can be anything you want.\n`brand`: A replica of a business persona or organization.\n"},"ownerID":{"type":"string","description":"The replica owner ID.","example":"a-user-id"},"private":{"type":"boolean","default":false,"description":"Visibility of the replica. When set to `true`, only the owner and users on the allowlist will be able to find the replica and chat with it."},"whitelistEmails":{"type":"array","items":{"type":"string","format":"email"},"default":[],"description":"Emails of users who can use the replica when the replica is private.","example":["user@domain.example"]},"slug":{"type":"string","maxLength":50,"description":"The slug of the replica. Slugs can be used by API consumers to determine the URLs where replicas can be found.","example":"example-replica"},"tags":{"type":"array","items":{"type":"string"},"default":[],"description":"The tags associated with the replica. Tags help categorize replicas and make them easier to find.","example":["male","italian"]},"profileImage":{"type":"string","pattern":"https?:\\/\\/[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]+\\b([-a-zA-Z0-9()@:%_+.~#?&\\/=]*)","default":"https://studio.sensay.io/assets/default-replica-profile.webp","description":"The URL of the profile image of the replica. The image will be downloaded, optimized and stored on our servers, so the URL in the response will be different. Supported formats: image/jpeg, image/jpg, image/pjpeg, image/png, image/bmp, image/x-windows-bmp, image/x-bmp, image/x-bitmap, image/x-ms-bmp, image/webp, image/avif","example":"https://images.invalid/photo.jpeg"},"suggestedQuestions":{"type":"array","items":{"type":"string"},"default":[],"description":"Suggested questions when starting a conversation.","example":["What is the meaning of life?"]},"llm":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["asi1-mini","claude-3-7-sonnet-latest","claude-haiku-4-5","claude-sonnet-4-5","deepseek-chat","gemini-2.5-flash","gemini-2.5-pro","gemini-3-pro-preview","gpt-4o","gpt-4o-mini","gpt-5","gpt-5.1","gpt-5-mini","gpt-5-nano","grok-3-latest","grok-4-latest","o3-mini","mistral-large"],"title":"model","description":"The LLM model of the replica.","example":"gpt-4o"},{"type":"string","enum":["targon-gpt-oss-120b"],"title":"targon-gpt-oss-120b","description":"Large open-source model with strong reasoning and versatile generation. Well-suited for complex tasks and broad domain applications.","deprecated":true}],"default":"claude-haiku-4-5","description":"The LLM model of the replica.","example":"claude-haiku-4-5"},"memoryMode":{"type":"string","enum":["prompt-caching","rag-search"],"default":"rag-search","description":"Deprecated. The system will automatically choose the best approach.","deprecated":true},"systemMessage":{"type":"string","maxLength":30000,"description":"Who is your replica? How do you want it to talk, respond and act.","example":"Concise, knowledgeable, empathetic and cheerful."},"tools":{"type":"array","items":{"type":"string","enum":["getTokenInfo","getUdaoTokenInfo","getSensayTokenInfo","getTokenInfoMEAI","answerToLife","toolhouse","brightUnionGetQuoteTool","brightUnionGetCoverablesTool"]},"default":[],"description":"The replica's tools. Tools enable agents to interact with the world. `getTokenInfo`: Allows replica to get token information\n","example":["getTokenInfo"]},"embeddingModel":{"type":"string","enum":["multilingual-e5-large","qwen3-embedding-8b"],"default":"multilingual-e5-large","description":"The embedding model used for semantic search and knowledge base operations.","example":"multilingual-e5-large"}}},"voicePreviewText":{"type":"string","maxLength":400,"description":"Text that can be used to generate a voice preview.","example":"Hi, I'm your Sensay replica! How can I assist you today?"},"isEveryConversationAccessibleBySupport":{"type":"boolean","description":"Whether the replica conversations are accessible to customer support","example":true},"uuid":{"type":"string","format":"uuid","description":"The replica UUID","example":"4830597b-f3be-42b4-9587-fa15299ccd63"},"distilledKnowledge":{"type":"string","description":"The distilled knowledge of the replica","example":"This is the distilled knowledge of the replica."},"profile_image":{"type":"string","nullable":true,"description":"The URL of the profile image of the replica. Please use `profileImage` instead.","deprecated":true},"short_description":{"type":"string","nullable":true,"description":"The description of the replica. Please use `shortDescription` instead.","deprecated":true},"introduction":{"type":"string","nullable":true,"description":"The introduction of the replica. Please use `greeting` instead.","deprecated":true},"created_at":{"type":"string","nullable":true,"format":"date-time","description":"The date and time the replica was created."},"owner_uuid":{"type":"string","nullable":true,"format":"uuid","description":"The UUID of the owner of the replica. Please migrate to the new User ID system and use `ownerID` instead.","deprecated":true},"voice_enabled":{"type":"boolean","description":"Whether the replica has voice support.","x-beta":true},"video_enabled":{"type":"boolean","description":"Whether the replica has video support.","x-beta":true},"chat_history_count":{"type":"integer","nullable":true,"description":"The total number of chat history items related to this replica, for all users of the organization."},"system_message":{"type":"string","description":"The replica's tone, personality and behaviour, Please use `llm.systemMessage` instead.","deprecated":true},"discord_integration":{"type":"object","nullable":true,"properties":{"token":{"type":"string","nullable":true},"service_name":{"type":"string","nullable":true},"is_active":{"type":"boolean","nullable":true}},"required":["token","service_name","is_active"],"description":"The Discord integration of the replica.","x-beta":true},"telegram_integration":{"type":"object","nullable":true,"properties":{"token":{"type":"string","nullable":true},"service_name":{"type":"string","nullable":true}},"required":["token","service_name"],"description":"The Telegram integration of the replica.","x-beta":true}},"required":["name","shortDescription","greeting","ownerID","slug","llm","uuid","profile_image","short_description","introduction","created_at","owner_uuid","voice_enabled","video_enabled","chat_history_count","system_message","discord_integration","telegram_integration"],"additionalProperties":false},"description":"Array of replica items for the current page. Will be an empty array if no items exist.","example":[{"uuid":"123e4567-e89b-12d3-a456-426614174000","name":"Example Replica","purpose":"Replica purpose","slug":"copy","profile_image":"https://deprecated.invalid/image.png","profileImage":"https://domain.example/image.webp","short_description":"An example replica","shortDescription":"An example replica","introduction":"deprecated","greeting":"What would you like to know?","tags":["male","italian"],"created_at":"2023-10-01T12:00:00Z","owner_uuid":"123e4567-e89b-12d3-a456-426614174001","ownerID":"a-user-id","type":"character","private":false,"whitelistEmails":["example@domain.example"],"suggestedQuestions":["What is the meaning of life?"],"llm":{"model":"gpt-4o","systemMessage":"Concise, knowledgeable, empathetic and cheerful.","tools":["answerToLife"]},"voice_enabled":true,"video_enabled":true,"chat_history_count":5,"system_message":"Descriptive, energetic, friendly","telegram_integration":{"token":"7701101112:DASeKD32EQLL32113-ngfVUMkyzg","service_name":"test_telegram_bot"},"discord_integration":{"token":"MTk4NjIyNDgzNDcxOTI1MjQ4.Cl2FMQ.ZnCjm1XVW7vRze4b7Cq4se7kKWs","service_name":"test_discord_bot","is_active":true}}]},"total":{"type":"integer","description":"The total number of replica items available across all pages","example":100}},"required":["success","type","items","total"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}},"post":{"tags":["Replicas"],"security":[{"OrganizationServiceToken":[]}],"summary":"Create a replica","description":"Creates a new replica.","parameters":[{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"},{"schema":{"type":"string","enum":["gzip"],"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data."},"required":false,"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data.","name":"Content-Encoding","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":50,"description":"The name of the replica.","example":"John Smith"},"purpose":{"type":"string","maxLength":1000,"description":"The purpose of the replica. This field is not used for training the replica.","example":"Acts as my AI twin for answering questions about my creative work."},"shortDescription":{"type":"string","maxLength":50,"description":"A short description of your replica. This field is not used for training the replica.","example":"Accountant from Brooklyn who loves sports."},"greeting":{"type":"string","maxLength":600,"description":"The first thing your replica will say when you start a conversation with them.","example":"What would you like to know?"},"type":{"type":"string","enum":["individual","character","brand"],"default":"character","description":"The replica type.\n`individual`: A replica of yourself.\n`character`: A replica of a character: can be anything you want.\n`brand`: A replica of a business persona or organization.\n"},"ownerID":{"type":"string","description":"The replica owner ID.","example":"a-user-id"},"private":{"type":"boolean","default":false,"description":"Visibility of the replica. When set to `true`, only the owner and users on the allowlist will be able to find the replica and chat with it."},"whitelistEmails":{"type":"array","items":{"type":"string","format":"email"},"default":[],"description":"Emails of users who can use the replica when the replica is private.","example":["user@domain.example"]},"slug":{"type":"string","maxLength":50,"description":"The slug of the replica. Slugs can be used by API consumers to determine the URLs where replicas can be found.","example":"example-replica"},"tags":{"type":"array","items":{"type":"string"},"default":[],"description":"The tags associated with the replica. Tags help categorize replicas and make them easier to find.","example":["male","italian"]},"profileImage":{"type":"string","pattern":"https?:\\/\\/[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]+\\b([-a-zA-Z0-9()@:%_+.~#?&\\/=]*)","default":"https://studio.sensay.io/assets/default-replica-profile.webp","description":"The URL of the profile image of the replica. The image will be downloaded, optimized and stored on our servers, so the URL in the response will be different. Supported formats: image/jpeg, image/jpg, image/pjpeg, image/png, image/bmp, image/x-windows-bmp, image/x-bmp, image/x-bitmap, image/x-ms-bmp, image/webp, image/avif","example":"https://images.invalid/photo.jpeg"},"suggestedQuestions":{"type":"array","items":{"type":"string"},"default":[],"description":"Suggested questions when starting a conversation.","example":["What is the meaning of life?"]},"llm":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["asi1-mini","claude-3-7-sonnet-latest","claude-haiku-4-5","claude-sonnet-4-5","deepseek-chat","gemini-2.5-flash","gemini-2.5-pro","gemini-3-pro-preview","gpt-4o","gpt-4o-mini","gpt-5","gpt-5.1","gpt-5-mini","gpt-5-nano","grok-3-latest","grok-4-latest","o3-mini","mistral-large"],"title":"model","description":"The LLM model of the replica.","example":"gpt-4o"},{"type":"string","enum":["targon-gpt-oss-120b"],"title":"targon-gpt-oss-120b","description":"Large open-source model with strong reasoning and versatile generation. Well-suited for complex tasks and broad domain applications.","deprecated":true}],"default":"claude-haiku-4-5","description":"The LLM model of the replica.","example":"claude-haiku-4-5"},"memoryMode":{"type":"string","enum":["prompt-caching","rag-search"],"default":"rag-search","description":"Deprecated. The system will automatically choose the best approach.","deprecated":true},"systemMessage":{"type":"string","maxLength":30000,"description":"Who is your replica? How do you want it to talk, respond and act.","example":"Concise, knowledgeable, empathetic and cheerful."},"tools":{"type":"array","items":{"type":"string","enum":["getTokenInfo","getUdaoTokenInfo","getSensayTokenInfo","getTokenInfoMEAI","answerToLife","toolhouse","brightUnionGetQuoteTool","brightUnionGetCoverablesTool"]},"default":[],"description":"The replica's tools. Tools enable agents to interact with the world. `getTokenInfo`: Allows replica to get token information\n","example":["getTokenInfo"]},"embeddingModel":{"type":"string","enum":["multilingual-e5-large","qwen3-embedding-8b"],"default":"multilingual-e5-large","description":"The embedding model used for semantic search and knowledge base operations.","example":"multilingual-e5-large"}}},"voicePreviewText":{"type":"string","maxLength":400,"description":"Text that can be used to generate a voice preview.","example":"Hi, I'm your Sensay replica! How can I assist you today?"},"isEveryConversationAccessibleBySupport":{"type":"boolean","description":"Whether the replica conversations are accessible to customer support","example":true}},"required":["name","shortDescription","greeting","ownerID","slug","llm"],"additionalProperties":false}}}},"responses":{"201":{"description":"The created replica","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the replica was created successfully","example":true},"uuid":{"type":"string","format":"uuid","description":"The replica UUID","example":"654c2874-0b43-4d84-85fc-62ba866da1cb"}},"required":["success","uuid"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"429":{"description":"Too Many Requests","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas/{replicaUUID}":{"get":{"tags":["Replicas"],"security":[{"OrganizationServiceToken":[]}],"summary":"Get a replica","description":"Get an existing replica.","parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"The requested replica","content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":50,"description":"The name of the replica.","example":"John Smith"},"purpose":{"type":"string","maxLength":1000,"description":"The purpose of the replica. This field is not used for training the replica.","example":"Acts as my AI twin for answering questions about my creative work."},"shortDescription":{"type":"string","maxLength":50,"description":"A short description of your replica. This field is not used for training the replica.","example":"Accountant from Brooklyn who loves sports."},"greeting":{"type":"string","maxLength":600,"description":"The first thing your replica will say when you start a conversation with them.","example":"What would you like to know?"},"type":{"type":"string","enum":["individual","character","brand"],"default":"character","description":"The replica type.\n`individual`: A replica of yourself.\n`character`: A replica of a character: can be anything you want.\n`brand`: A replica of a business persona or organization.\n"},"ownerID":{"type":"string","description":"The replica owner ID.","example":"a-user-id"},"private":{"type":"boolean","default":false,"description":"Visibility of the replica. When set to `true`, only the owner and users on the allowlist will be able to find the replica and chat with it."},"whitelistEmails":{"type":"array","items":{"type":"string","format":"email"},"default":[],"description":"Emails of users who can use the replica when the replica is private.","example":["user@domain.example"]},"slug":{"type":"string","maxLength":50,"description":"The slug of the replica. Slugs can be used by API consumers to determine the URLs where replicas can be found.","example":"example-replica"},"tags":{"type":"array","items":{"type":"string"},"default":[],"description":"The tags associated with the replica. Tags help categorize replicas and make them easier to find.","example":["male","italian"]},"profileImage":{"type":"string","pattern":"https?:\\/\\/[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]+\\b([-a-zA-Z0-9()@:%_+.~#?&\\/=]*)","default":"https://studio.sensay.io/assets/default-replica-profile.webp","description":"The URL of the profile image of the replica. The image will be downloaded, optimized and stored on our servers, so the URL in the response will be different. Supported formats: image/jpeg, image/jpg, image/pjpeg, image/png, image/bmp, image/x-windows-bmp, image/x-bmp, image/x-bitmap, image/x-ms-bmp, image/webp, image/avif","example":"https://images.invalid/photo.jpeg"},"suggestedQuestions":{"type":"array","items":{"type":"string"},"default":[],"description":"Suggested questions when starting a conversation.","example":["What is the meaning of life?"]},"llm":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["asi1-mini","claude-3-7-sonnet-latest","claude-haiku-4-5","claude-sonnet-4-5","deepseek-chat","gemini-2.5-flash","gemini-2.5-pro","gemini-3-pro-preview","gpt-4o","gpt-4o-mini","gpt-5","gpt-5.1","gpt-5-mini","gpt-5-nano","grok-3-latest","grok-4-latest","o3-mini","mistral-large"],"title":"model","description":"The LLM model of the replica.","example":"gpt-4o"},{"type":"string","enum":["targon-gpt-oss-120b"],"title":"targon-gpt-oss-120b","description":"Large open-source model with strong reasoning and versatile generation. Well-suited for complex tasks and broad domain applications.","deprecated":true}],"default":"claude-haiku-4-5","description":"The LLM model of the replica.","example":"claude-haiku-4-5"},"memoryMode":{"type":"string","enum":["prompt-caching","rag-search"],"default":"rag-search","description":"Deprecated. The system will automatically choose the best approach.","deprecated":true},"systemMessage":{"type":"string","maxLength":30000,"description":"Who is your replica? How do you want it to talk, respond and act.","example":"Concise, knowledgeable, empathetic and cheerful."},"tools":{"type":"array","items":{"type":"string","enum":["getTokenInfo","getUdaoTokenInfo","getSensayTokenInfo","getTokenInfoMEAI","answerToLife","toolhouse","brightUnionGetQuoteTool","brightUnionGetCoverablesTool"]},"default":[],"description":"The replica's tools. Tools enable agents to interact with the world. `getTokenInfo`: Allows replica to get token information\n","example":["getTokenInfo"]},"embeddingModel":{"type":"string","enum":["multilingual-e5-large","qwen3-embedding-8b"],"default":"multilingual-e5-large","description":"The embedding model used for semantic search and knowledge base operations.","example":"multilingual-e5-large"}}},"voicePreviewText":{"type":"string","maxLength":400,"description":"Text that can be used to generate a voice preview.","example":"Hi, I'm your Sensay replica! How can I assist you today?"},"isEveryConversationAccessibleBySupport":{"type":"boolean","description":"Whether the replica conversations are accessible to customer support","example":true},"uuid":{"type":"string","format":"uuid","description":"The replica UUID","example":"4830597b-f3be-42b4-9587-fa15299ccd63"},"distilledKnowledge":{"type":"string","description":"The distilled knowledge of the replica","example":"This is the distilled knowledge of the replica."},"success":{"type":"boolean","enum":[true],"description":"Indicates the request was successful","example":true}},"required":["name","shortDescription","greeting","ownerID","slug","llm","uuid","success"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}},"delete":{"tags":["Replicas"],"security":[{"OrganizationServiceToken":[]}],"summary":"Delete a replica","description":"Deletes a replica by UUID.","parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"Replica has been deleted","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the replica was deleted successfully","example":true}},"required":["success"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}},"put":{"tags":["Replicas"],"security":[{"OrganizationServiceToken":[]}],"summary":"Updates a replica","description":"Updates an existing replica.","parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"},{"schema":{"type":"string","enum":["gzip"],"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data."},"required":false,"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data.","name":"Content-Encoding","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"name":{"type":"string","maxLength":50,"description":"The name of the replica.","example":"John Smith"},"purpose":{"type":"string","maxLength":1000,"description":"The purpose of the replica. This field is not used for training the replica.","example":"Acts as my AI twin for answering questions about my creative work."},"shortDescription":{"type":"string","maxLength":50,"description":"A short description of your replica. This field is not used for training the replica.","example":"Accountant from Brooklyn who loves sports."},"greeting":{"type":"string","maxLength":600,"description":"The first thing your replica will say when you start a conversation with them.","example":"What would you like to know?"},"type":{"type":"string","enum":["individual","character","brand"],"default":"character","description":"The replica type.\n`individual`: A replica of yourself.\n`character`: A replica of a character: can be anything you want.\n`brand`: A replica of a business persona or organization.\n"},"ownerID":{"type":"string","description":"The replica owner ID.","example":"a-user-id"},"private":{"type":"boolean","default":false,"description":"Visibility of the replica. When set to `true`, only the owner and users on the allowlist will be able to find the replica and chat with it."},"whitelistEmails":{"type":"array","items":{"type":"string","format":"email"},"default":[],"description":"Emails of users who can use the replica when the replica is private.","example":["user@domain.example"]},"slug":{"type":"string","maxLength":50,"description":"The slug of the replica. Slugs can be used by API consumers to determine the URLs where replicas can be found.","example":"example-replica"},"tags":{"type":"array","items":{"type":"string"},"default":[],"description":"The tags associated with the replica. Tags help categorize replicas and make them easier to find.","example":["male","italian"]},"profileImage":{"type":"string","pattern":"https?:\\/\\/[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]+\\b([-a-zA-Z0-9()@:%_+.~#?&\\/=]*)","default":"https://studio.sensay.io/assets/default-replica-profile.webp","description":"The URL of the profile image of the replica. The image will be downloaded, optimized and stored on our servers, so the URL in the response will be different. Supported formats: image/jpeg, image/jpg, image/pjpeg, image/png, image/bmp, image/x-windows-bmp, image/x-bmp, image/x-bitmap, image/x-ms-bmp, image/webp, image/avif","example":"https://images.invalid/photo.jpeg"},"suggestedQuestions":{"type":"array","items":{"type":"string"},"default":[],"description":"Suggested questions when starting a conversation.","example":["What is the meaning of life?"]},"voicePreviewText":{"type":"string","maxLength":400,"description":"Text that can be used to generate a voice preview.","example":"Hi, I'm your Sensay replica! How can I assist you today?"},"isEveryConversationAccessibleBySupport":{"type":"boolean","description":"Whether the replica conversations are accessible to customer support","example":true},"llm":{"type":"object","properties":{"model":{"anyOf":[{"type":"string","enum":["asi1-mini","claude-3-7-sonnet-latest","claude-haiku-4-5","claude-sonnet-4-5","deepseek-chat","gemini-2.5-flash","gemini-2.5-pro","gemini-3-pro-preview","gpt-4o","gpt-4o-mini","gpt-5","gpt-5.1","gpt-5-mini","gpt-5-nano","grok-3-latest","grok-4-latest","o3-mini","mistral-large"],"title":"model","description":"The LLM model of the replica.","example":"gpt-4o"},{"type":"string","enum":["targon-gpt-oss-120b"],"title":"targon-gpt-oss-120b","description":"Large open-source model with strong reasoning and versatile generation. Well-suited for complex tasks and broad domain applications.","deprecated":true}],"default":"claude-haiku-4-5","description":"The LLM model of the replica.","example":"claude-haiku-4-5"},"memoryMode":{"type":"string","enum":["prompt-caching","rag-search"],"default":"rag-search","description":"Deprecated. The system will automatically choose the best approach.","deprecated":true},"systemMessage":{"type":"string","maxLength":30000,"description":"Who is your replica? How do you want it to talk, respond and act.","example":"Concise, knowledgeable, empathetic and cheerful."},"tools":{"type":"array","items":{"type":"string","enum":["getTokenInfo","getUdaoTokenInfo","getSensayTokenInfo","getTokenInfoMEAI","answerToLife","toolhouse","brightUnionGetQuoteTool","brightUnionGetCoverablesTool"]},"default":[],"description":"The replica's tools. Tools enable agents to interact with the world. `getTokenInfo`: Allows replica to get token information\n","example":["getTokenInfo"]},"embeddingModel":{"type":"string","enum":["multilingual-e5-large","qwen3-embedding-8b"],"description":"The embedding model used for semantic search and knowledge base operations. Cannot be changed once set.","example":"multilingual-e5-large"}},"additionalProperties":false}},"required":["name","shortDescription","greeting","ownerID","slug","llm"],"additionalProperties":false}}}},"responses":{"200":{"description":"The request outcome","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the replica was created successfully","example":true}},"required":["success"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"409":{"description":"Conflict","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas/{replicaUUID}/chats":{"get":{"tags":["Chats"],"security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"summary":"List replica's chats","description":"List of replica's chats with pagination and sorting. Chats are groups of user+replica+platform conversations.","parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"integer","nullable":true,"minimum":0,"maximum":100,"default":24,"description":"The number of items per page.","example":24},"required":false,"description":"The number of items per page.","name":"pageSize","in":"query"},{"schema":{"type":"number","minimum":1,"default":1,"description":"The page number.","example":1},"required":false,"description":"The page number.","name":"page","in":"query"},{"schema":{"type":"string","enum":["replicaReplies","firstMessageAt","lastReplicaReplyAt"],"default":"replicaReplies","description":"Sort criteria.","example":"replicaReplies"},"required":false,"description":"Sort criteria.","name":"sortBy","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"The order of the sort.","example":"desc"},"required":false,"description":"The order of the sort.","name":"sortOrder","in":"query"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"List of chats","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","default":true},"items":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"The chat UUID.","example":"8e9309af-baa4-4a85-8c59-c3a2a0c2ad0f"},"source":{"type":"string","enum":["discord","telegram","embed","web","telegram_autopilot"],"description":"The source of the chat.","example":"telegram"},"messageCount":{"type":"integer","description":"Total messages in this chat.","example":42},"replicaReplyCount":{"type":"integer","description":"The total number of assistant replies in this chat.","example":21},"firstMessageAt":{"type":"string","format":"date-time","description":"The timestamp of the first message in the chat.","example":"2025-05-27T15:02:44.499744+00:00"},"lastMessageAt":{"type":"string","format":"date-time","description":"The timestamp of the last message in the chat.","example":"2025-05-27T18:45:12.123456+00:00"},"lastReplicaReplyAt":{"type":"string","format":"date-time","description":"The timestamp of the last assistant reply in the chat.","example":"2025-05-27T18:30:22.654321+00:00"},"chatName":{"type":"string","description":"The name of the chat. This can be the name of the user or the name of the group.","example":"John Doe"},"chatImageURL":{"type":"string","description":"The image URL of the chat. This can be the profile image of the user or the group.","example":"https://example.com/image.png"},"chatType":{"type":"string","enum":["individual","group"],"description":"The type of chat.","example":"individual"}},"required":["uuid","source","messageCount","replicaReplyCount","firstMessageAt","lastMessageAt","chatType"]}},"total":{"type":"number","description":"The total number of chats for this replica.","example":1001}},"required":["items","total"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas/{replicaUUID}/chats/{chatUUID}":{"get":{"tags":["Chats"],"security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"summary":"Get chat details","description":"Retrieve details of a specific chat by UUID.","parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The chat UUID.","example":"8e9309af-baa4-4a85-8c59-c3a2a0c2ad0f"},"required":true,"description":"The chat UUID.","name":"chatUUID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"Chat details","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","default":true},"chat":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"The chat UUID.","example":"8e9309af-baa4-4a85-8c59-c3a2a0c2ad0f"},"source":{"type":"string","enum":["discord","telegram","embed","web","telegram_autopilot"],"description":"The source of the chat.","example":"telegram"},"messageCount":{"type":"integer","description":"Total messages in this chat.","example":42},"replicaReplyCount":{"type":"integer","description":"The total number of assistant replies in this chat.","example":21},"firstMessageAt":{"type":"string","format":"date-time","description":"The timestamp of the first message in the chat.","example":"2025-05-27T15:02:44.499744+00:00"},"lastMessageAt":{"type":"string","format":"date-time","description":"The timestamp of the last message in the chat.","example":"2025-05-27T18:45:12.123456+00:00"},"lastReplicaReplyAt":{"type":"string","format":"date-time","description":"The timestamp of the last assistant reply in the chat.","example":"2025-05-27T18:30:22.654321+00:00"},"chatName":{"type":"string","description":"The name of the chat. This can be the name of the user or the name of the group.","example":"John Doe"},"chatImageURL":{"type":"string","description":"The image URL of the chat. This can be the profile image of the user or the group.","example":"https://example.com/image.png"},"chatType":{"type":"string","enum":["individual","group"],"description":"The type of chat.","example":"individual"}},"required":["uuid","source","messageCount","replicaReplyCount","firstMessageAt","lastMessageAt","chatType"]}},"required":["chat"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas/{replicaUUID}/chats/{chatUUID}/conversations":{"get":{"tags":["Chats"],"security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"summary":"List conversations in a specific chat","description":"List of conversations within a specific chat with pagination and sorting.","parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The chat UUID.","example":"8e9309af-baa4-4a85-8c59-c3a2a0c2ad0f"},"required":true,"description":"The chat UUID.","name":"chatUUID","in":"path"},{"schema":{"type":"number","nullable":true,"minimum":0,"maximum":100,"default":24,"description":"The number of items per page.","example":24},"required":false,"description":"The number of items per page.","name":"pageSize","in":"query"},{"schema":{"type":"number","minimum":1,"default":1,"description":"The page number.","example":2},"required":false,"description":"The page number.","name":"page","in":"query"},{"schema":{"type":"string","enum":["replicaReplies","firstMessageAt","lastReplicaReplyAt"],"default":"lastReplicaReplyAt","description":"Sort criteria.","example":"lastReplicaReplyAt"},"required":false,"description":"Sort criteria.","name":"sortBy","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"The order of the sort.","example":"asc"},"required":false,"description":"The order of the sort.","name":"sortOrder","in":"query"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"List of conversations for the chat","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"The conversation UUID.","example":"8e9309af-baa4-4a85-8c59-c3a2a0c2ad0f"},"chatUUID":{"type":"string","format":"uuid","description":"The chat UUID to which this conversation belongs.","example":"550e8400-e29b-41d4-a716-446655440001"},"source":{"type":"string","enum":["discord","telegram","embed","web","telegram_autopilot"],"description":"The source of the conversation.","example":"telegram"},"messageCount":{"type":"number","description":"The total number of messages in the conversation.","example":42},"replicaReplyCount":{"type":"number","description":"The total number of assistant replies in the conversation.","example":42},"firstMessageAt":{"type":"string","format":"date-time","description":"The timestamp of the first message in the conversation.","example":"2025-05-27T15:02:44.499744+00:00"},"lastMessageAt":{"type":"string","format":"date-time","description":"The timestamp of the last message in the conversation.","example":"2025-05-27T15:02:44.499744+00:00"},"lastReplicaReplyAt":{"type":"string","format":"date-time","description":"The timestamp of the last assistant reply in the conversation.","example":"2025-05-27T15:02:44.499744+00:00"},"conversationName":{"type":"string","description":"The name of the conversation. This can be the name of the user or the name of the group.","example":"John Doe"},"conversationImageURL":{"type":"string","description":"The image URL of the conversation. This can be the profile image of the user or the group.","example":"https://example.com/image.png"},"summary":{"type":"string","description":"A summary of the conversation.","example":"Discussion about blockchain technology and its applications in fintech."},"commonQuestions":{"type":"array","items":{"type":"string"},"description":"Common questions asked in this conversation.","example":["What is blockchain?","How does DeFi work?","What are smart contracts?"]},"commonTopics":{"type":"array","items":{"type":"string"},"description":"Common topics discussed in this conversation.","example":["blockchain","cryptocurrency","smart contracts","fintech"]},"conversationType":{"type":"string","enum":["individual","group"],"description":"The type of conversation.","example":"individual"}},"required":["uuid","chatUUID","source","messageCount","replicaReplyCount","conversationType"]}},"total":{"type":"number","description":"The total number of conversations for this replica.","example":1001},"success":{"type":"boolean","enum":[true],"description":"Indicates the request was successful","example":true}},"required":["items","total","success"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas/{replicaUUID}/chats/{chatUUID}/conversations/{conversationUUID}":{"get":{"tags":["Chats"],"security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"summary":"Get a chat conversation details","description":"Retrieve details for a specific conversation within a chat.","parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The chat UUID.","example":"8e9309af-baa4-4a85-8c59-c3a2a0c2ad0f"},"required":true,"description":"The chat UUID.","name":"chatUUID","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The conversation UUID.","example":"8e9309af-baa4-4a85-8c59-c3a2a0c2ad0f"},"required":true,"description":"The conversation UUID.","name":"conversationUUID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"Conversation details","content":{"application/json":{"schema":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"The conversation UUID.","example":"8e9309af-baa4-4a85-8c59-c3a2a0c2ad0f"},"chatUUID":{"type":"string","format":"uuid","description":"The chat UUID to which this conversation belongs.","example":"550e8400-e29b-41d4-a716-446655440001"},"source":{"type":"string","enum":["discord","telegram","embed","web","telegram_autopilot"],"description":"The source of the conversation.","example":"telegram"},"messageCount":{"type":"number","description":"The total number of messages in the conversation.","example":42},"replicaReplyCount":{"type":"number","description":"The total number of assistant replies in the conversation.","example":42},"firstMessageAt":{"type":"string","format":"date-time","description":"The timestamp of the first message in the conversation.","example":"2025-05-27T15:02:44.499744+00:00"},"lastMessageAt":{"type":"string","format":"date-time","description":"The timestamp of the last message in the conversation.","example":"2025-05-27T15:02:44.499744+00:00"},"lastReplicaReplyAt":{"type":"string","format":"date-time","description":"The timestamp of the last assistant reply in the conversation.","example":"2025-05-27T15:02:44.499744+00:00"},"conversationName":{"type":"string","description":"The name of the conversation. This can be the name of the user or the name of the group.","example":"John Doe"},"conversationImageURL":{"type":"string","description":"The image URL of the conversation. This can be the profile image of the user or the group.","example":"https://example.com/image.png"},"summary":{"type":"string","description":"A summary of the conversation.","example":"Discussion about blockchain technology and its applications in fintech."},"commonQuestions":{"type":"array","items":{"type":"string"},"description":"Common questions asked in this conversation.","example":["What is blockchain?","How does DeFi work?","What are smart contracts?"]},"commonTopics":{"type":"array","items":{"type":"string"},"description":"Common topics discussed in this conversation.","example":["blockchain","cryptocurrency","smart contracts","fintech"]},"conversationType":{"type":"string","enum":["individual","group"],"description":"The type of conversation.","example":"individual"},"success":{"type":"boolean","enum":[true],"description":"Indicates the request was successful","example":true}},"required":["uuid","chatUUID","source","messageCount","replicaReplyCount","conversationType","success"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas/{replicaUUID}/chats/{chatUUID}/conversations/{conversationUUID}/messages":{"get":{"tags":["Chats","Conversations"],"security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"summary":"List messages in a chat conversation","description":"Retrieves messages in a specific conversation within a chat with cursor-based pagination. Messages are sorted chronologically from oldest to newest.\n\nUse the `beforeUUID` parameter to get older messages and the `afterUUID` parameter to get newer messages. Please note:\n - When `beforeUUID` is specified, the most recent messages before `beforeUUID` are returned.\n - When `beforeUUID` and `afterUUID` are both specified, the most recent messages before `beforeUUID` are returned.\n - When `afterUUID` is specified on its own, the least recent messages after `afterUUID` are returned.","parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The chat UUID.","example":"8e9309af-baa4-4a85-8c59-c3a2a0c2ad0f"},"required":true,"description":"The chat UUID.","name":"chatUUID","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The conversation UUID.","example":"8e9309af-baa4-4a85-8c59-c3a2a0c2ad0f"},"required":true,"description":"The conversation UUID.","name":"conversationUUID","in":"path"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"The number of messages to fetch.","example":10},"required":false,"description":"The number of messages to fetch.","name":"limit","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Only show messages after given message UUID. Excludes given message UUID.","example":"40d353f3-1241-449e-9fa6-c798d62c9cb1"},"required":false,"description":"Only show messages after given message UUID. Excludes given message UUID.","name":"afterUUID","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Only show messages before given message UUID. Excludes given message UUID.","example":"ec46b4db-3f0d-4392-b0f5-9fe327922e8a"},"required":false,"description":"Only show messages before given message UUID. Excludes given message UUID.","name":"beforeUUID","in":"query"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"List of messages in the chat conversation","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"items":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"The UUID of the message.","example":"03db5651-cb61-4bdf-9ef0-89561f7c9c53"},"createdAt":{"type":"string","format":"date-time","description":"The date and time the message was created.","example":"2024-09-24T09:09:55.66709+00:00"},"content":{"type":"string","description":"The content of the message.","example":"Hello world!"},"role":{"type":"string","enum":["user","assistant"],"description":"The role of the message sender.","example":"user"},"senderName":{"type":"string","description":"The name of the message sender, if available.","example":"John Doe"},"senderProfileImageURL":{"type":"string","description":"The avatar URL of the message sender, if available.","example":"https://example.com/avatar.png"},"source":{"type":"string","enum":["discord","telegram","embed","web","telegram_autopilot"],"description":"The source of the message.","example":"web"},"replicaUUID":{"$ref":"#/components/schemas/replicaUUID_parameter"}},"required":["uuid","createdAt","content","role","source","replicaUUID"]}}},"required":["success","items"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas/{replicaUUID}/chats/{chatUUID}/messages":{"get":{"tags":["Conversations","Chats"],"security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"summary":"List messages in a chat conversation","description":"Retrieves messages in a specific conversation within a chat with cursor-based pagination. Messages are sorted chronologically from oldest to newest.\n\nUse the `beforeUUID` parameter to get older messages and the `afterUUID` parameter to get newer messages. Please note:\n - When `beforeUUID` is specified, the most recent messages before `beforeUUID` are returned.\n - When `beforeUUID` and `afterUUID` are both specified, the most recent messages before `beforeUUID` are returned.\n - When `afterUUID` is specified on its own, the least recent messages after `afterUUID` are returned.","parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The chat UUID.","example":"8e9309af-baa4-4a85-8c59-c3a2a0c2ad0f"},"required":true,"description":"The chat UUID.","name":"chatUUID","in":"path"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"The number of messages to fetch.","example":10},"required":false,"description":"The number of messages to fetch.","name":"limit","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Only show messages after given message UUID. Excludes given message UUID.","example":"40d353f3-1241-449e-9fa6-c798d62c9cb1"},"required":false,"description":"Only show messages after given message UUID. Excludes given message UUID.","name":"afterUUID","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Only show messages before given message UUID. Excludes given message UUID.","example":"ec46b4db-3f0d-4392-b0f5-9fe327922e8a"},"required":false,"description":"Only show messages before given message UUID. Excludes given message UUID.","name":"beforeUUID","in":"query"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"List of messages in the conversation","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"items":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"The UUID of the message.","example":"03db5651-cb61-4bdf-9ef0-89561f7c9c53"},"createdAt":{"type":"string","format":"date-time","description":"The date and time the message was created.","example":"2024-09-24T09:09:55.66709+00:00"},"content":{"type":"string","description":"The content of the message.","example":"Hello world!"},"role":{"type":"string","enum":["user","assistant"],"description":"The role of the message sender.","example":"user"},"senderName":{"type":"string","description":"The name of the message sender, if available.","example":"John Doe"},"senderProfileImageURL":{"type":"string","description":"The avatar URL of the message sender, if available.","example":"https://example.com/avatar.png"},"source":{"type":"string","enum":["discord","telegram","embed","web","telegram_autopilot"],"description":"The source of the message.","example":"web"},"replicaUUID":{"$ref":"#/components/schemas/replicaUUID_parameter"}},"required":["uuid","createdAt","content","role","source","replicaUUID"]}}},"required":["success","items"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas/{replicaUUID}/conversations/{conversationUUID}":{"get":{"tags":["Conversations"],"security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"summary":"Get conversation details","description":"Retrieve details for a specific conversation within a replica.","deprecated":true,"parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The conversation UUID.","example":"4e162bcb-2a32-4b35-89bf-7cf729a73687"},"required":true,"description":"The conversation UUID.","name":"conversationUUID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"Conversation details","content":{"application/json":{"schema":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"The conversation UUID.","example":"8e9309af-baa4-4a85-8c59-c3a2a0c2ad0f"},"chatUUID":{"type":"string","format":"uuid","description":"The chat UUID to which this conversation belongs.","example":"550e8400-e29b-41d4-a716-446655440001"},"source":{"type":"string","enum":["discord","telegram","embed","web","telegram_autopilot"],"description":"The source of the conversation.","example":"telegram"},"messageCount":{"type":"number","description":"The total number of messages in the conversation.","example":42},"replicaReplyCount":{"type":"number","description":"The total number of assistant replies in the conversation.","example":42},"firstMessageAt":{"type":"string","format":"date-time","description":"The timestamp of the first message in the conversation.","example":"2025-05-27T15:02:44.499744+00:00"},"lastMessageAt":{"type":"string","format":"date-time","description":"The timestamp of the last message in the conversation.","example":"2025-05-27T15:02:44.499744+00:00"},"lastReplicaReplyAt":{"type":"string","format":"date-time","description":"The timestamp of the last assistant reply in the conversation.","example":"2025-05-27T15:02:44.499744+00:00"},"conversationName":{"type":"string","description":"The name of the conversation. This can be the name of the user or the name of the group.","example":"John Doe"},"conversationImageURL":{"type":"string","description":"The image URL of the conversation. This can be the profile image of the user or the group.","example":"https://example.com/image.png"},"summary":{"type":"string","description":"A summary of the conversation.","example":"Discussion about blockchain technology and its applications in fintech."},"commonQuestions":{"type":"array","items":{"type":"string"},"description":"Common questions asked in this conversation.","example":["What is blockchain?","How does DeFi work?","What are smart contracts?"]},"commonTopics":{"type":"array","items":{"type":"string"},"description":"Common topics discussed in this conversation.","example":["blockchain","cryptocurrency","smart contracts","fintech"]},"conversationType":{"type":"string","enum":["individual","group"],"description":"The type of conversation.","example":"individual"},"success":{"type":"boolean","enum":[true],"description":"Indicates the request was successful","example":true}},"required":["uuid","chatUUID","source","messageCount","replicaReplyCount","conversationType","success"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}},"patch":{"tags":["Conversations"],"security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"summary":"Update conversation details","description":"Update the summary, common questions, and common topics of a specific conversation within a replica.","deprecated":true,"parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The conversation UUID.","example":"4e162bcb-2a32-4b35-89bf-7cf729a73687"},"required":true,"description":"The conversation UUID.","name":"conversationUUID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"},{"schema":{"type":"string","enum":["gzip"],"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data."},"required":false,"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data.","name":"Content-Encoding","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"summary":{"type":"string","nullable":true,"maxLength":700,"description":"The summary of the conversation.","example":"A productive discussion about project planning and next steps."},"commonQuestions":{"type":"array","items":{"type":"string"},"description":"Common questions asked in this conversation.","example":["What is blockchain?","How does DeFi work?","What are smart contracts?"]},"commonTopics":{"type":"array","items":{"type":"string"},"description":"Common topics discussed in this conversation.","example":["blockchain","cryptocurrency","smart contracts","fintech"]}}}}}},"responses":{"200":{"description":"Conversation updated successfully","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"}},"required":["success"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas/{replicaUUID}/conversations":{"get":{"tags":["Conversations"],"security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"summary":"List replica's conversations","description":"List of replica's conversations with pagination and sorting.","deprecated":true,"parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"number","nullable":true,"minimum":0,"maximum":100,"default":24,"description":"The number of items per page.","example":24},"required":false,"description":"The number of items per page.","name":"pageSize","in":"query"},{"schema":{"type":"number","minimum":1,"default":1,"description":"The page number.","example":2},"required":false,"description":"The page number.","name":"page","in":"query"},{"schema":{"type":"string","enum":["replicaReplies","firstMessageAt","lastReplicaReplyAt"],"default":"lastReplicaReplyAt","description":"Sort criteria.","example":"lastReplicaReplyAt"},"required":false,"description":"Sort criteria.","name":"sortBy","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"The order of the sort.","example":"asc"},"required":false,"description":"The order of the sort.","name":"sortOrder","in":"query"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"List of conversations","content":{"application/json":{"schema":{"type":"object","properties":{"items":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"The conversation UUID.","example":"8e9309af-baa4-4a85-8c59-c3a2a0c2ad0f"},"chatUUID":{"type":"string","format":"uuid","description":"The chat UUID to which this conversation belongs.","example":"550e8400-e29b-41d4-a716-446655440001"},"source":{"type":"string","enum":["discord","telegram","embed","web","telegram_autopilot"],"description":"The source of the conversation.","example":"telegram"},"messageCount":{"type":"number","description":"The total number of messages in the conversation.","example":42},"replicaReplyCount":{"type":"number","description":"The total number of assistant replies in the conversation.","example":42},"firstMessageAt":{"type":"string","format":"date-time","description":"The timestamp of the first message in the conversation.","example":"2025-05-27T15:02:44.499744+00:00"},"lastMessageAt":{"type":"string","format":"date-time","description":"The timestamp of the last message in the conversation.","example":"2025-05-27T15:02:44.499744+00:00"},"lastReplicaReplyAt":{"type":"string","format":"date-time","description":"The timestamp of the last assistant reply in the conversation.","example":"2025-05-27T15:02:44.499744+00:00"},"conversationName":{"type":"string","description":"The name of the conversation. This can be the name of the user or the name of the group.","example":"John Doe"},"conversationImageURL":{"type":"string","description":"The image URL of the conversation. This can be the profile image of the user or the group.","example":"https://example.com/image.png"},"summary":{"type":"string","description":"A summary of the conversation.","example":"Discussion about blockchain technology and its applications in fintech."},"commonQuestions":{"type":"array","items":{"type":"string"},"description":"Common questions asked in this conversation.","example":["What is blockchain?","How does DeFi work?","What are smart contracts?"]},"commonTopics":{"type":"array","items":{"type":"string"},"description":"Common topics discussed in this conversation.","example":["blockchain","cryptocurrency","smart contracts","fintech"]},"conversationType":{"type":"string","enum":["individual","group"],"description":"The type of conversation.","example":"individual"}},"required":["uuid","chatUUID","source","messageCount","replicaReplyCount","conversationType"]}},"total":{"type":"number","description":"The total number of conversations for this replica.","example":1001},"success":{"type":"boolean","enum":[true],"description":"Indicates the request was successful","example":true}},"required":["items","total","success"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas/{replicaUUID}/conversations/{conversationUUID}/mentions":{"get":{"tags":["Conversations"],"security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"summary":"List mentions in a conversation","description":"Retrieves mentions of a replica in a specific conversation, together with context surrounding the mention. This endpoint supports cursor-based pagination. Returns most recent mentions first.","deprecated":true,"parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The conversation unique identifier (UUID)","example":"4e162bcb-2a32-4b35-89bf-7cf729a73687"},"required":true,"description":"The conversation unique identifier (UUID)","name":"conversationUUID","in":"path"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"The number of items to fetch. A group of messages is counted as 1 item and a placeholder is counted as 1 item.","example":10},"required":false,"description":"The number of items to fetch. A group of messages is counted as 1 item and a placeholder is counted as 1 item.","name":"limit","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Only returns results after the given message UUID. Excludes given message UUID.","example":"40d353f3-1241-449e-9fa6-c798d62c9cb1"},"required":false,"description":"Only returns results after the given message UUID. Excludes given message UUID.","name":"afterUUID","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Only returns results before the given message UUID. Excludes given message UUID.","example":"ec46b4db-3f0d-4392-b0f5-9fe327922e8a"},"required":false,"description":"Only returns results before the given message UUID. Excludes given message UUID.","name":"beforeUUID","in":"query"},{"schema":{"type":"number","nullable":true,"default":3,"description":"The minimum number of messages to include in the placeholder. Placeholders with less than this number of messages will be expanded into messages.","example":3},"required":false,"description":"The minimum number of messages to include in the placeholder. Placeholders with less than this number of messages will be expanded into messages.","name":"minimumMessagesInPlaceholder","in":"query"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"List of messages/placeholders","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"items":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["mention"]},"messages":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"The UUID of the message.","example":"03db5651-cb61-4bdf-9ef0-89561f7c9c53"},"createdAt":{"type":"string","format":"date-time","description":"The date and time the message was created.","example":"2024-09-24T09:09:55.66709+00:00"},"content":{"type":"string","description":"The content of the message.","example":"Hello world!"},"role":{"type":"string","enum":["user","assistant"],"description":"The role of the message sender.","example":"user"},"senderName":{"type":"string","description":"The name of the message sender, if available.","example":"John Doe"},"senderProfileImageURL":{"type":"string","description":"The avatar URL of the message sender, if available.","example":"https://example.com/avatar.png"},"source":{"type":"string","enum":["discord","telegram","embed","web","telegram_autopilot"],"description":"The source of the message.","example":"web"},"replicaUUID":{"$ref":"#/components/schemas/replicaUUID_parameter"}},"required":["uuid","createdAt","content","role","source","replicaUUID"],"title":"Message","description":"A message in a conversation."}}},"required":["type","messages"],"title":"Messages","description":"A group of messages around a mention."},{"type":"object","properties":{"type":{"type":"string","enum":["placeholder"]},"count":{"type":"number","description":"The number of messages collapsed into this placeholder","example":20}},"required":["type","count"],"title":"Placeholder","description":"A placeholder, indicating that there are messages that can be loaded in its place."}]}},"hasMore":{"type":"boolean","description":"Whether there are more items available beyond the current page","example":true}},"required":["success","items","hasMore"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas/{replicaUUID}/conversations/{conversationUUID}/messages":{"get":{"tags":["Conversations"],"security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"summary":"List messages in a conversation","description":"Retrieves messages in a specific conversation with cursor-based pagination. Messages are sorted chronologically from oldest to newest.\n\nUse the `beforeUUID` parameter to get older messages and the `afterUUID` parameter to get newer messages. Please note:\n - When `beforeUUID` is specified, the most recent messages before `beforeUUID` are returned.\n - When `beforeUUID` and `afterUUID` are both specified, the most recent messages before `beforeUUID` are returned.\n - When `afterUUID` is specified on its own, the least recent messages after `afterUUID` are returned.","deprecated":true,"parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","format":"uuid","description":"The conversation UUID.","example":"4e162bcb-2a32-4b35-89bf-7cf729a73687"},"required":true,"description":"The conversation UUID.","name":"conversationUUID","in":"path"},{"schema":{"type":"number","minimum":1,"maximum":100,"default":20,"description":"The number of messages to fetch.","example":10},"required":false,"description":"The number of messages to fetch.","name":"limit","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Only show messages after given message UUID. Excludes given message UUID.","example":"40d353f3-1241-449e-9fa6-c798d62c9cb1"},"required":false,"description":"Only show messages after given message UUID. Excludes given message UUID.","name":"afterUUID","in":"query"},{"schema":{"type":"string","format":"uuid","description":"Only show messages before given message UUID. Excludes given message UUID.","example":"ec46b4db-3f0d-4392-b0f5-9fe327922e8a"},"required":false,"description":"Only show messages before given message UUID. Excludes given message UUID.","name":"beforeUUID","in":"query"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"List of messages in the conversation","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"items":{"type":"array","items":{"type":"object","properties":{"uuid":{"type":"string","format":"uuid","description":"The UUID of the message.","example":"03db5651-cb61-4bdf-9ef0-89561f7c9c53"},"createdAt":{"type":"string","format":"date-time","description":"The date and time the message was created.","example":"2024-09-24T09:09:55.66709+00:00"},"content":{"type":"string","description":"The content of the message.","example":"Hello world!"},"role":{"type":"string","enum":["user","assistant"],"description":"The role of the message sender.","example":"user"},"senderName":{"type":"string","description":"The name of the message sender, if available.","example":"John Doe"},"senderProfileImageURL":{"type":"string","description":"The avatar URL of the message sender, if available.","example":"https://example.com/avatar.png"},"source":{"type":"string","enum":["discord","telegram","embed","web","telegram_autopilot"],"description":"The source of the message.","example":"web"},"replicaUUID":{"$ref":"#/components/schemas/replicaUUID_parameter"}},"required":["uuid","createdAt","content","role","source","replicaUUID"]}}},"required":["success","items"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas/{replicaUUID}/analytics/conversations/historical":{"get":{"tags":["Analytics"],"security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"summary":"Get replica historical conversation analytics","description":"Returns cumulative conversation count for the last 30 days, up to and including today.","parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"Historical conversation analytics data","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"items":{"type":"array","items":{"type":"object","properties":{"date":{"type":"string","format":"date","description":"The date in YYYY-MM-DD format.","example":"2025-05-15"},"cumulativeConversations":{"type":"integer","minimum":0,"description":"The cumulative number of conversations up to this date.","example":127}},"required":["date","cumulativeConversations"]},"description":"List of daily cumulative conversation counts for the last 30 days. The cutoff for counting conversations towards a specific day is UTC midnight.","example":[{"date":"2025-05-01","cumulativeConversations":100},{"date":"2025-05-02","cumulativeConversations":103},{"date":"2025-05-03","cumulativeConversations":108}]}},"required":["success","items"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas/{replicaUUID}/analytics/conversations/sources":{"get":{"tags":["Analytics"],"security":[{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]},{"OrganizationServiceToken":[]}],"summary":"Get replica source analytics","description":"Returns interaction counts by source for the replica.","parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"Source analytics data","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"items":{"type":"array","items":{"type":"object","properties":{"source":{"type":"string","enum":["discord","telegram","embed","web","telegram_autopilot"],"description":"The source of the conversations.","example":"telegram"},"conversations":{"type":"integer","minimum":0,"description":"The total number of conversations from this source.","example":245}},"required":["source","conversations"]},"description":"List of conversation counts by source for the replica, as of today.","example":[{"source":"telegram","conversations":245},{"source":"discord","conversations":123},{"source":"web","conversations":89}]}},"required":["success","items"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas/{replicaUUID}/knowledge-base":{"post":{"tags":["Knowledge base"],"security":[{"OrganizationServiceToken":[]},{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]}],"summary":"Create a knowledge base entry","description":"Creates a new knowledge base entry for a replica based on text, file, URL, or Youtube Videos. For YouTube playlists, the system will automatically create separate entries for each video in the playlist.","parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"},{"schema":{"type":"string","enum":["gzip"],"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data."},"required":false,"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data.","name":"Content-Encoding","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"title":{"type":"string","description":"Title for this knowledge base entry. Helps identify the content in listings.","example":"Company information"},"url":{"type":"string","pattern":"https?:\\/\\/[-a-zA-Z0-9@:%._+~#=]{1,256}\\.[a-zA-Z0-9()]+\\b([-a-zA-Z0-9()@:%_+.~#?&\\/=]*)","description":"A public URL to an HTML page to ingest into the knowledge base.\nThe URL must be publicly accessible without authentication. Google domains(e.g. www.google.com, docs.google.com) are not allowed.\nOnly the rendered text on the web page is used for training, embedded media (image, video, audio) is not used. For training using video files, please provide YouTube links in one of the following formats: \nhttps://www.youtube.com/watch?v=VIDEO_ID\nhttps://www.youtube.com/shorts/SHORT_VIDEO_ID\nhttps://www.youtube.com/playlist?list=PLAYLIST_ID","example":"https://example.com"},"autoRefresh":{"type":"boolean","default":false,"description":"Whether to allow automatic content updates from the URL, handled by the system."},"text":{"type":"string","minLength":1,"description":"The text content you want your replica to learn","example":"Our company was founded in 2020. We specialize in AI-powered customer service solutions."},"filename":{"type":"string","description":"The name of the file that you intend to upload. Supported file types:\n- Documents: .doc, .docx, .rtf, .pdf, .pdfa\n- Spreadsheets and Tabular Data: .csv, .tsv, .xls, .xlsx, .xlsm, .xlsb, .ods, .dta, .sas7bdat, .xpt\n- Presentations: .ppt, .pptx\n- Text Files: .txt, .md, .htm, .html, .css, .js, .xml\n- Data Text Files: .json, .yml, .yaml\n- E-books: .epub\n- Images: .png, .jpg, .jpeg, .webp, .heic, .heif, .tiff, .bmp\n- Audio Files: .mp3, .wav, .aac, .ogg, .flac\n- Video Files: .mp4, .mpeg, .mov, .avi, .mpg, .webm, .mkv (Maximum duration: 90 minutes)","example":"example.txt"},"usageLimits":{"type":"object","properties":{"knowledgeBaseEntries":{"type":"object","properties":{"totalUserQuota":{"type":"number","description":"The total number of knowledge base entries that this replica owner can have."}},"required":["totalUserQuota"]}},"description":"Usage policies and quotas to enforce for this knowledge base entry creation request."}},"additionalProperties":false}}}},"responses":{"207":{"description":"The created knowledge base entry","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the knowledge base entry was created successfully","example":true},"results":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["file","text","website","youtube"],"description":"The type of knowledge base entry","example":"file"},"enqueued":{"type":"boolean","enum":[true],"description":"Indicates that the knowledge base entry creation has been enqueued for processing"},"knowledgeBaseID":{"type":"number","description":"The unique identifier for the newly created knowledge base entry.","example":12345},"signedURL":{"type":"string","description":"The temporary URL where you should upload your file using a PUT request","example":"https://xotqxvmmnunwfsaemqfy.supabase.co/storage/v1/object/upload/sign/replica_files/..."}},"required":["type","enqueued","knowledgeBaseID"]},{"type":"object","properties":{"type":{"type":"string","enum":["file","text","website","youtube"],"description":"The type of knowledge base entry","example":"file"},"enqueued":{"type":"boolean","enum":[false],"description":"Indicates that the knowledge base entry creation has not been enqueued due to an error"},"error":{"type":"string","description":"Error message if the knowledge base entry creation failed"}},"required":["type","enqueued","error"]}]},"description":"Array of results for each knowledge base entry created","example":[]}},"required":["success","results"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"409":{"description":"URL already exists in the knowledge base","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"429":{"description":"Usage limit exceeded","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"Replica owner knowledge base entry custom quota exceeded. Current usage: 10/10. To fix this, either increase the totalUserQuota value in your request's usageLimits parameter or remove some existing Knowledge Base entries.","error_code":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}},"get":{"tags":["Knowledge base"],"summary":"List all knowledge base entries","description":"Returns a list of all knowledge base entries belonging to a replica. This endpoint allows you to view all your training data in one place, with optional filtering by status or type. You can use this to monitor the overall state of a replica's knowledge base, check which entries are still processing, and identify any that might have encountered errors. The response includes detailed information about each entry including its content, status, and metadata.","parameters":[{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"array","nullable":true,"items":{"type":"string","enum":["NEW","FILE_UPLOADED","RAW_TEXT","PROCESSED_TEXT","VECTOR_CREATED","READY","UNPROCESSABLE"]},"description":"Filter knowledge base entries by comma separated list of their processing statuses. Use this to find entries in specific states like `NEW` or `READY`.","example":["VECTOR_CREATED","READY"]},"required":false,"description":"Filter knowledge base entries by comma separated list of their processing statuses. Use this to find entries in specific states like `NEW` or `READY`.","name":"status","in":"query"},{"schema":{"type":"array","nullable":true,"items":{"type":"string","enum":["file","text","website","youtube"]},"description":"Filter knowledge base entries by their content type. Use this to find specific types of training data like text or file uploads.","example":["website","youtube"]},"required":false,"description":"Filter knowledge base entries by their content type. Use this to find specific types of training data like text or file uploads.","name":"type","in":"query"},{"schema":{"type":"string","minLength":3,"description":"Filter knowledge base entries by their title, filename, or URL.","example":"Company Policies"},"required":false,"description":"Filter knowledge base entries by their title, filename, or URL.","name":"search","in":"query"},{"schema":{"type":"string","enum":["true","false"],"description":"Filter knowledge base entries that have encountered errors during processing."},"required":false,"description":"Filter knowledge base entries that have encountered errors during processing.","name":"hasError","in":"query"},{"schema":{"type":"integer","minimum":1,"default":1,"description":"Page number for pagination. Use this to navigate through large result sets.","example":2},"required":false,"description":"Page number for pagination. Use this to navigate through large result sets.","name":"page","in":"query"},{"schema":{"type":"integer","nullable":true,"minimum":0,"maximum":100,"default":24,"description":"Maximum number of entries to return per page (up to 100). Use this to control result set size. A value of zero can be used to check the total number of items without returning any items.","example":24},"required":false,"description":"Maximum number of entries to return per page (up to 100). Use this to control result set size. A value of zero can be used to check the total number of items without returning any items.","name":"pageSize","in":"query"},{"schema":{"type":"string","enum":["createdAt"],"default":"createdAt","description":"Sort criteria.","example":"createdAt"},"required":false,"description":"Sort criteria.","name":"sortBy","in":"query"},{"schema":{"type":"string","enum":["asc","desc"],"default":"desc","description":"The order of the sort.","example":"asc"},"required":false,"description":"The order of the sort.","name":"sortOrder","in":"query"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"List of knowledge base entries returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the list operation was successful","example":true},"items":{"type":"array","items":{"type":"object","properties":{"id":{"type":"integer","description":"The unique identifier for this knowledge base entry.","example":12345},"replicaUUID":{"type":"string","format":"uuid","description":"The unique identifier of the replica associated to this knowledge base entry.","example":"03db5651-cb61-4bdf-9ef0-89561f7c9c53"},"type":{"type":"string","enum":["file","text","website","youtube"],"description":"The type of knowledge base entry, indicating how the content was added and how it should be processed."},"url":{"type":"string","description":"The URL provided during entry creation, if applicable.","example":"http://example.com"},"status":{"type":"string","enum":["NEW","FILE_UPLOADED","RAW_TEXT","PROCESSED_TEXT","VECTOR_CREATED","READY","UNPROCESSABLE"],"description":"The current stage in the processing pipeline. Use this to track progress and identify any issues with processing."},"createdAt":{"type":"string","format":"date-time","description":"The ISO 8601 timestamp indicating when this knowledge base entry was created.","example":"2025-04-15T08:11:00.093761+00:00"},"updatedAt":{"type":"string","format":"date-time","description":"The ISO 8601 timestamp indicating when this knowledge base entry was last updated. Useful for tracking the completion time of processing.","example":"2025-04-15T08:15:05.299349+00:00"},"title":{"type":"string","description":"Title for the knowledge base entry, to help identify the knowledge base entry in listings. This field is not used in processing or internal logic.","example":"Company information"},"generatedTitle":{"type":"string","description":"Auto-generated title for the knowledge base entry based on the content.","example":"Company information and business hours"},"summary":{"type":"string","description":"A concise 1-2 sentence summary of rawText, generated by the system.","example":"Basic company details including founding date, business focus, and operating hours."},"language":{"$ref":"#/components/schemas/KnowledgeBaseLanguage"},"website":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"URL of the website related to the knowledge base entry.","example":"https://example.com"},"links":{"type":"array","items":{"type":"string"},"description":"Links related to the knowledge base entry."},"title":{"type":"string","description":"Title of the website.","example":"Example Website Title"},"text":{"type":"string","description":"Text content of the website.","example":"This is the main text content extracted from the website."},"description":{"type":"string","description":"A brief description of the website content based on extracted html.","example":"This website provides information about our company and services."},"autoRefresh":{"type":"boolean","default":false,"description":"Whether to allow automatic content updates from the URL, handled by the system."},"screenshotURL":{"type":"string","description":"Screenshot URL of the knowledge base entry."}},"required":["url"],"additionalProperties":false},"youtube":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"URL of the YouTube video related to the knowledge base entry","example":"https://www.youtube.com/watch?v=VIDEO_ID"},"title":{"type":"string","description":"Title of the YouTube video"},"description":{"type":"string","description":"Description of the YouTube video"},"thumbnailURL":{"type":"string","format":"uri","description":"URL of the YouTube video thumbnail","example":"https://i.ytimg.com/vi/VIDEO_ID/hqdefault.jpg"},"summary":{"type":"string","description":"A concise 1-2 sentence summary of rawText.","example":"Basic company details including founding date, business focus, and operating hours."},"transcription":{"type":"string","description":"Full transcript of the YouTube video.","example":"This is the complete transcript of the video content..."},"visualTranscription":{"type":"string","description":"Visual transcription of the YouTube video","example":"Visual elements and scenes described in text format"},"playlistID":{"type":"string","description":"ID of the YouTube playlist associated with this knowledge base entry","example":"PL1234567890"}},"required":["url"],"additionalProperties":false,"description":"YouTube content related to the knowledge base entry","example":{"url":"https://www.youtube.com/watch?v=VIDEO_ID","title":"Example YouTube Video Title","description":"This is a description of the YouTube video content.","thumbnailURL":"https://i.ytimg.com/vi/VIDEO_ID/hqdefault.jpg","summary":"A concise summary of the key points covered in the video.","transcription":"This is the complete transcript of the video content...","visualTranscription":"Visual elements and scenes described in text format"}},"file":{"type":"object","properties":{"name":{"type":"string","description":"Name of the file associated with the knowledge base entry","example":"company_handbook.pdf"},"size":{"type":"number","nullable":true,"description":"Size of the file in bytes","example":204800},"mimeType":{"type":"string","nullable":true,"enum":["application/epub+zip","application/json","application/msword","application/pdf","application/rtf","application/vnd.ms-excel","application/vnd.ms-excel.sheet.binary.macroenabled.12","application/vnd.ms-excel.sheet.macroEnabled.12","application/vnd.ms-powerpoint","application/vnd.oasis.opendocument.spreadsheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/x-sas-data","application/x-sas-xport","application/x-stata","application/x-stata-dta","application/yaml","audio/aac","audio/flac","audio/mp3","audio/mpeg","audio/ogg","audio/wav","image/bmp","image/heic","image/heif","image/jpeg","image/png","image/tif","image/tiff","image/webp","text/css","text/csv","text/html","text/javascript","text/markdown","text/plain","text/tab-separated-values","text/xml","video/avi","video/mov","video/mp4","video/mpeg","video/mpg","video/quicktime","video/webm","video/x-matroska","video/x-msvideo"],"description":"MIME type of the file","example":"application/epub+zip"},"screenshotURL":{"type":"string","description":"Screenshot URL of the knowledge base entry."},"downloadURL":{"type":"string","format":"uri","description":"Temporary signed URL for downloading the file","example":"https://example.com/download/company_handbook.pdf?signed=..."}},"required":["name"],"additionalProperties":false},"error":{"type":"object","properties":{"fingerprint":{"type":"string","description":"A unique identifier of the error, useful for reporting","example":"12345"},"message":{"type":"string","description":"Error message associated with this knowledge base entry","example":"Failed to process the entry due to invalid format."}},"additionalProperties":false}},"required":["id","type","status","createdAt","updatedAt"],"additionalProperties":false},"description":"Array of knowledge base entries matching your query parameters","example":[{"id":12345,"replicaUUID":"03db5651-cb61-4bdf-9ef0-89561f7c9c53","type":"text","status":"READY","createdAt":"2025-04-15T08:11:00.093761+00:00","updatedAt":"2025-04-15T08:11:05.299349+00:00","title":"Company information","summary":"Basic company details and policies"}]},"total":{"type":"integer","description":"The total number of knowledge base entries.","example":100}},"required":["success","items","total"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/replicas/{replicaUUID}/knowledge-base/{knowledgeBaseID}":{"patch":{"tags":["Knowledge base"],"security":[{"OrganizationServiceToken":[]},{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]}],"summary":"Update knowledge base entry","description":"Updates a knowledge base entry with training content. This is the second step in the training process after creating an entry. You can provide \"rawText\" which is the content you want your replica to learn from (such as product information, company policies, or specialized knowledge). The system will automatically process this text and make it available for your replica to use when answering questions. The entry status will change to PROCESSING and then to READY once fully processed.","parameters":[{"schema":{"allOf":[{"$ref":"#/components/schemas/knowledgeBaseID_parameter"},{"nullable":true}]},"required":true,"description":"The unique identifier of the knowledge base entry","name":"knowledgeBaseID","in":"path"},{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"},{"schema":{"type":"string","enum":["gzip"],"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data."},"required":false,"description":"Content encoding for request body compression. Optional - when used, client is responsible for gzipping and sending binary data.","name":"Content-Encoding","in":"header"}],"requestBody":{"content":{"application/json":{"schema":{"type":"object","properties":{"rawText":{"type":"string","minLength":1,"description":"The initial text content you want your replica to learn. This is the information you provide that will be processed and optimized for the knowledge base.","example":"Our company was founded in 2020. We specialize in AI-powered customer service solutions."},"generatedFacts":{"type":"array","items":{"type":"string"},"description":"Generated facts related to the knowledge base entry.","example":["The company was founded in 2020.","We specialize in AI-powered customer service solutions."]},"rawTextChunks":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string"},"chunkIndex":{"type":"integer"},"chunkTokens":{"type":"integer"},"chunkChars":{"type":"integer"}}},"description":"Segments of textual content that have been extracted from the original sources and split into smaller, manageable pieces.","example":[{"content":"First part of the document content.","chunkIndex":0,"chunkTokens":7,"chunkChars":35},{"content":"Second part of the document content.","chunkIndex":1,"chunkTokens":7,"chunkChars":36}]},"title":{"type":"string","description":"Title for this knowledge base entry. Helps identify the content in listings.","example":"Company information"},"generatedTitle":{"type":"string","description":"Auto-generated title for the knowledge base entry based on the content.","example":"Company information and Business Hours"},"summary":{"type":"string","description":"A concise 1-2 sentence summary of rawText.","example":"Basic company details including founding date, business focus, and operating hours."},"language":{"$ref":"#/components/schemas/KnowledgeBaseLanguage"},"website":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"URL of the website related to the knowledge base entry.","example":"https://example.com"},"links":{"type":"array","items":{"type":"string"},"description":"Links related to the knowledge base entry."},"title":{"type":"string","description":"Title of the website.","example":"Example Website Title"},"text":{"type":"string","description":"Text content of the website.","example":"This is the main text content extracted from the website."},"description":{"type":"string","description":"A brief description of the website content based on extracted html.","example":"This website provides information about our company and services."},"autoRefresh":{"type":"boolean","default":false,"description":"Whether to allow automatic content updates from the URL, handled by the system."},"screenshotURL":{"type":"string","description":"Screenshot URL of the knowledge base entry."},"screenshot":{"type":"string","description":"Screenshot in Base64 format of the knowledge base entry"}},"additionalProperties":false},"youtube":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"URL of the YouTube video related to the knowledge base entry","example":"https://www.youtube.com/watch?v=VIDEO_ID"},"title":{"type":"string","description":"Title of the YouTube video"},"description":{"type":"string","description":"Description of the YouTube video"},"thumbnailURL":{"type":"string","format":"uri","description":"URL of the YouTube video thumbnail","example":"https://i.ytimg.com/vi/VIDEO_ID/hqdefault.jpg"},"summary":{"type":"string","description":"A concise 1-2 sentence summary of rawText.","example":"Basic company details including founding date, business focus, and operating hours."},"transcription":{"type":"string","description":"Full transcript of the YouTube video.","example":"This is the complete transcript of the video content..."},"visualTranscription":{"type":"string","description":"Visual transcription of the YouTube video","example":"Visual elements and scenes described in text format"}},"additionalProperties":false},"file":{"type":"object","properties":{"name":{"type":"string","description":"Name of the file associated with the knowledge base entry","example":"company_handbook.pdf"},"size":{"type":"number","nullable":true,"description":"Size of the file in bytes","example":204800},"mimeType":{"type":"string","nullable":true,"enum":["application/epub+zip","application/json","application/msword","application/pdf","application/rtf","application/vnd.ms-excel","application/vnd.ms-excel.sheet.binary.macroenabled.12","application/vnd.ms-excel.sheet.macroEnabled.12","application/vnd.ms-powerpoint","application/vnd.oasis.opendocument.spreadsheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/x-sas-data","application/x-sas-xport","application/x-stata","application/x-stata-dta","application/yaml","audio/aac","audio/flac","audio/mp3","audio/mpeg","audio/ogg","audio/wav","image/bmp","image/heic","image/heif","image/jpeg","image/png","image/tif","image/tiff","image/webp","text/css","text/csv","text/html","text/javascript","text/markdown","text/plain","text/tab-separated-values","text/xml","video/avi","video/mov","video/mp4","video/mpeg","video/mpg","video/quicktime","video/webm","video/x-matroska","video/x-msvideo"],"description":"MIME type of the file","example":"application/epub+zip"},"screenshot":{"type":"string","description":"Screenshot in Base64 format of the knowledge base entry"}},"additionalProperties":false},"error":{"type":"object","properties":{"fingerprint":{"type":"string","description":"A unique identifier of the error, useful for reporting","example":"12345"},"message":{"type":"string","description":"Error message associated with this knowledge base entry","example":"Failed to process the entry due to invalid format."}},"required":["message"],"additionalProperties":false,"description":"Error information related to the knowledge base entry","example":{"fingerprint":"12345","message":"Failed to process the entry due to invalid format."}}},"additionalProperties":false}}}},"responses":{"200":{"description":"Knowledge base entry updated successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the knowledge base update was successful"}},"required":["success"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}},"delete":{"tags":["Knowledge base"],"security":[{"OrganizationServiceToken":[]},{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]}],"summary":"Delete knowledge base entry by ID","description":"Permanently removes a specific knowledge base entry and its associated vector database entry. Use this endpoint when you need to remove outdated or incorrect training data from your replica's knowledge base. This operation cannot be undone, and the entry will no longer be available for retrieval during conversations with your replica. In most cases, the deletion is completed immediately. However, in some scenarios, part of the deletion process may be delayed. This means that while the request has been accepted and the deletion process has started, some associated data may remain temporarily available and will be removed within 24 hours.","parameters":[{"schema":{"allOf":[{"$ref":"#/components/schemas/knowledgeBaseID_parameter"},{"nullable":true}]},"required":true,"description":"The unique identifier of the knowledge base entry","name":"knowledgeBaseID","in":"path"},{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"The knowledge base entry was deleted successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"}},"required":["success"]}}}},"202":{"description":"The deletion process has been initiated. Full removal of all associated data may take up to 24 hours to complete.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"message":{"type":"string","description":"The reason why the operation is accepted instead of returning an immediate success.","example":"The deletion process has been initiated. Full removal of all associated data may take up to 24 hours to complete."}},"required":["success","message"]}}}},"404":{"description":"Knowledge base entry not found.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}}}},"get":{"tags":["Knowledge base"],"security":[{"OrganizationServiceToken":[]},{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]}],"summary":"Get knowledge base entry by ID","description":"Retrieves detailed information about a specific knowledge base entry using its ID. This endpoint returns the complete entry data including its type, status, content, and metadata. You can use this to check the processing status of your training content, view the raw and processed text, and see when it was created and last updated. This is useful for monitoring the progress of your training data as it moves through the processing pipeline.","parameters":[{"schema":{"allOf":[{"$ref":"#/components/schemas/knowledgeBaseID_parameter"},{"nullable":true}]},"required":true,"description":"The unique identifier of the knowledge base entry","name":"knowledgeBaseID","in":"path"},{"schema":{"$ref":"#/components/schemas/replicaUUID_parameter"},"required":true,"description":"The replica unique identifier (UUID)","name":"replicaUUID","in":"path"},{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"The requested knowledge base entry.","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"integer","description":"The unique identifier for this knowledge base entry.","example":12345},"replicaUUID":{"type":"string","format":"uuid","description":"The unique identifier of the replica associated to this knowledge base entry.","example":"03db5651-cb61-4bdf-9ef0-89561f7c9c53"},"type":{"type":"string","enum":["file","text","website","youtube"],"description":"The type of knowledge base entry, indicating how the content was added and how it should be processed."},"url":{"type":"string","description":"The URL provided during entry creation, if applicable.","example":"http://example.com"},"status":{"type":"string","enum":["NEW","FILE_UPLOADED","RAW_TEXT","PROCESSED_TEXT","VECTOR_CREATED","READY","UNPROCESSABLE"],"description":"The current stage in the processing pipeline. Use this to track progress and identify any issues with processing."},"createdAt":{"type":"string","format":"date-time","description":"The ISO 8601 timestamp indicating when this knowledge base entry was created.","example":"2025-04-15T08:11:00.093761+00:00"},"updatedAt":{"type":"string","format":"date-time","description":"The ISO 8601 timestamp indicating when this knowledge base entry was last updated. Useful for tracking the completion time of processing.","example":"2025-04-15T08:15:05.299349+00:00"},"title":{"type":"string","description":"Title for the knowledge base entry, to help identify the knowledge base entry in listings. This field is not used in processing or internal logic.","example":"Company information"},"generatedTitle":{"type":"string","description":"Auto-generated title for the knowledge base entry based on the content.","example":"Company information and business hours"},"summary":{"type":"string","description":"A concise 1-2 sentence summary of rawText, generated by the system.","example":"Basic company details including founding date, business focus, and operating hours."},"language":{"$ref":"#/components/schemas/KnowledgeBaseLanguage"},"website":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"URL of the website related to the knowledge base entry.","example":"https://example.com"},"links":{"type":"array","items":{"type":"string"},"description":"Links related to the knowledge base entry."},"title":{"type":"string","description":"Title of the website.","example":"Example Website Title"},"text":{"type":"string","description":"Text content of the website.","example":"This is the main text content extracted from the website."},"description":{"type":"string","description":"A brief description of the website content based on extracted html.","example":"This website provides information about our company and services."},"autoRefresh":{"type":"boolean","default":false,"description":"Whether to allow automatic content updates from the URL, handled by the system."},"screenshotURL":{"type":"string","description":"Screenshot URL of the knowledge base entry."}},"required":["url"],"additionalProperties":false},"youtube":{"type":"object","properties":{"url":{"type":"string","format":"uri","description":"URL of the YouTube video related to the knowledge base entry","example":"https://www.youtube.com/watch?v=VIDEO_ID"},"title":{"type":"string","description":"Title of the YouTube video"},"description":{"type":"string","description":"Description of the YouTube video"},"thumbnailURL":{"type":"string","format":"uri","description":"URL of the YouTube video thumbnail","example":"https://i.ytimg.com/vi/VIDEO_ID/hqdefault.jpg"},"summary":{"type":"string","description":"A concise 1-2 sentence summary of rawText.","example":"Basic company details including founding date, business focus, and operating hours."},"transcription":{"type":"string","description":"Full transcript of the YouTube video.","example":"This is the complete transcript of the video content..."},"visualTranscription":{"type":"string","description":"Visual transcription of the YouTube video","example":"Visual elements and scenes described in text format"},"playlistID":{"type":"string","description":"ID of the YouTube playlist associated with this knowledge base entry","example":"PL1234567890"}},"required":["url"],"additionalProperties":false,"description":"YouTube content related to the knowledge base entry","example":{"url":"https://www.youtube.com/watch?v=VIDEO_ID","title":"Example YouTube Video Title","description":"This is a description of the YouTube video content.","thumbnailURL":"https://i.ytimg.com/vi/VIDEO_ID/hqdefault.jpg","summary":"A concise summary of the key points covered in the video.","transcription":"This is the complete transcript of the video content...","visualTranscription":"Visual elements and scenes described in text format"}},"file":{"type":"object","properties":{"name":{"type":"string","description":"Name of the file associated with the knowledge base entry","example":"company_handbook.pdf"},"size":{"type":"number","nullable":true,"description":"Size of the file in bytes","example":204800},"mimeType":{"type":"string","nullable":true,"enum":["application/epub+zip","application/json","application/msword","application/pdf","application/rtf","application/vnd.ms-excel","application/vnd.ms-excel.sheet.binary.macroenabled.12","application/vnd.ms-excel.sheet.macroEnabled.12","application/vnd.ms-powerpoint","application/vnd.oasis.opendocument.spreadsheet","application/vnd.openxmlformats-officedocument.presentationml.presentation","application/vnd.openxmlformats-officedocument.spreadsheetml.sheet","application/vnd.openxmlformats-officedocument.wordprocessingml.document","application/x-sas-data","application/x-sas-xport","application/x-stata","application/x-stata-dta","application/yaml","audio/aac","audio/flac","audio/mp3","audio/mpeg","audio/ogg","audio/wav","image/bmp","image/heic","image/heif","image/jpeg","image/png","image/tif","image/tiff","image/webp","text/css","text/csv","text/html","text/javascript","text/markdown","text/plain","text/tab-separated-values","text/xml","video/avi","video/mov","video/mp4","video/mpeg","video/mpg","video/quicktime","video/webm","video/x-matroska","video/x-msvideo"],"description":"MIME type of the file","example":"application/epub+zip"},"screenshotURL":{"type":"string","description":"Screenshot URL of the knowledge base entry."},"downloadURL":{"type":"string","format":"uri","description":"Temporary signed URL for downloading the file","example":"https://example.com/download/company_handbook.pdf?signed=..."}},"required":["name"],"additionalProperties":false},"error":{"type":"object","properties":{"fingerprint":{"type":"string","description":"A unique identifier of the error, useful for reporting","example":"12345"},"message":{"type":"string","description":"Error message associated with this knowledge base entry","example":"Failed to process the entry due to invalid format."}},"additionalProperties":false},"rawText":{"type":"string","description":"The original, unmodified text content that was submitted for training. May be truncated for large entries.","example":"Our company was founded in 2020. We specialize in AI-powered customer service solutions. Our business hours are Monday to Friday, 9 AM to 5 PM Eastern Time."},"generatedFacts":{"type":"array","items":{"type":"string"},"description":"Generated facts related to the knowledge base entry.","example":["The company was founded in 2020.","We specialize in AI-powered customer service solutions."]},"rawTextChunks":{"type":"array","items":{"type":"object","properties":{"content":{"type":"string"},"chunkIndex":{"type":"integer"},"chunkTokens":{"type":"integer"},"chunkChars":{"type":"integer"}}},"description":"Segments of textual content that have been extracted from the original sources and split into smaller, manageable pieces.","example":[{"content":"First part of the document content.","chunkIndex":0,"chunkTokens":7,"chunkChars":35},{"content":"Second part of the document content.","chunkIndex":1,"chunkTokens":7,"chunkChars":36}]},"success":{"type":"boolean","description":"Indicates if the request was successful"}},"required":["id","type","status","createdAt","updatedAt","success"],"additionalProperties":false}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}},"/v1/knowledge-base/file-types":{"get":{"tags":["Knowledge base"],"security":[{"OrganizationServiceToken":[]},{"OrganizationServiceToken":[],"UserID":[],"UserIDType":[]}],"summary":"Get supported file types","description":"Returns a list of all supported file types and MIME types for knowledge base entries. This endpoint provides information about which file formats can be uploaded to the knowledge base, organized by media type (documents, images, audio, video, etc.). Each file type includes the supported MIME types, file extensions, and support level (production or preview). This information can be used by client applications to validate file uploads and provide appropriate user interface elements.","parameters":[{"schema":{"type":"string","default":"2025-03-25","example":"2025-03-25"},"required":false,"name":"X-API-Version","in":"header"}],"responses":{"200":{"description":"Supported file types returned successfully.","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates if the request was successful","example":true},"mediaGroups":{"type":"array","items":{"type":"object","properties":{"label":{"type":"string","description":"Human-readable label for this media group","example":"PDF Documents"},"mediaType":{"type":"string","enum":["document","data","image","audio","video","ebook"],"description":"Type of media this group represents","example":"document"},"limitation":{"type":"string","description":"Optional limitation or constraint for this media group","example":"Maximum duration: 90 minutes"},"fileTypes":{"type":"array","items":{"type":"object","properties":{"mimeTypes":{"type":"array","items":{"type":"string"},"description":"Supported MIME types for this file type","example":["application/pdf"]},"extensions":{"type":"array","items":{"type":"string"},"description":"Supported file extensions for this file type","example":[".pdf",".pdfa"]},"supportLevel":{"type":"string","enum":["production","preview","disabled"],"description":"Support level for this file type","example":"production"}},"required":["mimeTypes","extensions","supportLevel"]},"description":"List of supported file types in this media group"}},"required":["label","mediaType","fileTypes"]},"description":"List of supported media groups with their file types"}},"required":["success","mediaGroups"]}}}},"400":{"description":"Bad Request","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"401":{"description":"Unauthorized","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"404":{"description":"Not Found","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"415":{"description":"Unsupported Media Type","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"error_code":{"type":"string","description":"A machine-readable error code indicating the specific error condition. Used for programmatic error handling","example":"KNOWLEDGE_BASE_CUSTOM_QUOTA_EXCEEDED"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"}}}}},"500":{"description":"Internal Server Error","content":{"application/json":{"schema":{"type":"object","properties":{"success":{"type":"boolean","description":"Indicates the status of the request"},"error":{"type":"string","description":"A text representation of the error"},"fingerprint":{"type":"string","description":"A unique identifier of the event, useful for reporting","example":"14fceadd84e74ec499afe9b0f7952d6b"},"request_id":{"type":"string","description":"A unique identifier of the request, useful for reporting","example":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab"},"inner_exception":{"type":"object","properties":{"name":{"type":"string"},"message":{"type":"string"},"cause":{"type":"string"},"stack":{"type":"string"}},"required":["name","message"],"description":"The inner exception","example":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}},"required":["success","error","request_id"],"example":{"success":false,"error":"A text representation of the error","fingerprint":"14fceadd84e74ec499afe9b0f7952d6b","request_id":"xyz1::reg1:reg1::ab3c4-1234567890123-0123456789ab","inner_exception":{"name":"Server overheated","message":"The server overheated due to an unexpected situation","cause":"Request too complicated","stack":"Error: Server overheated due to an unexpected situation\n    at Object.eval (eval at <anonymous>..."}}}}}}}}}}}