Ejento APIs
V1
  • V2
  • V1
  1. Chat APIs
Ejento APIs
V1
  • V2
  • V1
  • Overview
  • Endpoints
    • Chat APIs
      • Run Chat
        POST
      • Create Custom Instructions
        POST
      • Add Comment Feedback
        POST
      • Add Upvote Feedback
        POST
      • Add Downvote Feedback
        POST
      • Get Chat Thread
        GET
      • Get Thought Process
        GET
      • Get Supporting Content
        GET
      • Get All Agent Threads
        GET
    • Agent APIs
      • Get Recent Agents
      • Add to Recent Agents
      • Delete Recent Agent
      • Get Starred Agents
      • Delete Starred Agents
      • Get Agents by Team or User Team
      • Create a Review for an Agent
      • Get Agent Reviews
      • Update an Agent Review
      • Delete an Agent Review
      • Create Agent Chat
      • Get Agent Ratings
      • Toggle Rating
      • Create Agent Alias
      • Get All Agent Alias
      • Update Agent Alias
      • Get Agent Access Level
      • Update Agent Access Level
      • Get All Agents by Project
      • Get Agent Types
      • Update Agent Type
      • Get User Agent or User Agent Permission
    • Project APIs
      • Create New Project
      • Get All Projects
      • Get Project Details by ID
      • Edit Project By ID
      • Delete Project By ID
      • Add Recent Project
      • Get Recent Projects
      • Fetch Project Details
      • Add User to Project
      • Remove User from Project
      • Get User Projects For Team
    • Document APIs
      • Get Document By ID
      • Edit Document By ID
      • Delete Document By ID
    • Corpus APIs
      • Get All Corpus
      • Create Corpus
      • Get Corpus by ID
      • Edit Corpus
      • Delete Corpus
      • Get Corpus Permissions
      • Create Corpus Permissions
      • Delete Corpus Permissions
      • Get Corpus Permission By User
      • Create Document In Corpus
      • Get All Documents From Corpus
      • Delete All Documents
      • Check Duplicate Documents
    • Evaluation APIs
      • Create Evaluation Test
      • Get All Evaluation Tests for an Agent
      • Update Evaluation Test
      • Get One Evaluation Test
      • Update Evaluation Status
      • Get Evaluation Dataset for an Agent
      • Get All Evaluation Datasets for an Agent
      • Create Evaluation Dataset
      • Update Evaluation Dataset
      • Delete Evaluation Dataset
      • Get Agent Queries
      • Get Dataset Queries
    • SharePoint APIs
      • Get SharePoint items by full path
      • Get a SharePoint item by its ID
      • Create a new SharePoint item
      • Edit SharePoint item
      • Delete a SharePoint item
    • User APIs
      • Get All Users
      • Get User By ID
      • Edit User By ID
      • Delete User by ID
      • Create User Permission
      • Get User Permission by ID
      • Edit User Permission by ID
      • Delete User Permission by ID
      • Batch Delete Users
    • Analytics APIs
      • Get Tokens by Date
      • Get Tokens by Segment
      • Get User Tokens
      • Get Agent Tokens
      • Get Team Tokens
      • Get Query Count by Date
      • Get Query Count by Segment
      • Get Total Count
      • Get Daily Chat Engagement
      • Get Weekly Chat Engagement
      • Get Monthly Chat Engagement
      • Get User Engagement
      • Get Daily Chatlog Tokens
      • Get Weekly Chatlog Tokens
      • Get Monthly Chatlog Tokens
      • Get Agent Engagement
      • Get Engagement by Team
      • Get Engagement by User
      • Get Recently Active Agents
      • Get Recent Users
    • Notification APIs
      • Send Notification To User
      • Read Notification By ID
  1. Chat APIs

Run Chat

POST
/chat
Chat APIs
Run a chat session with the Ejento AI agent
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/chat' \
--header 'Content-Type: application/json' \
--data-raw '{
    "history": [
        {
            "user": "What are your professional strengths and weaknesses?",
            "bot": "I am an AI assistant specializing in reviewing documents for GDPR compliance."
        }
    ],
    "category": 491,
    "user_id": 46,
    "created_by": "user@example.com",
    "chat_thread_id": 823,
    "overrides": {
        "semantic_ranker": true,
        "semantic_captions": false,
        "top": 3,
        "suggest_followup_questions": true,
        "sources": false,
        "cache_skip": false,
        "mode_override": ""
    },
    "query_source": "web",
    "model": "gpt4-o"
}'
Response Response Example
{
    "data_points": "",
    "answer": "As an AI assistant specializing in GDPR compliance, my professional strengths include...",
    "sources": "",
    "followup_questions": [
        "What strategies do you use to improve your weaknesses?"
    ],
    "thoughts": "Searched for: What are your professional strengths and weaknesses?",
    "indexes": [],
    "query": "What are your professional strengths and weaknesses?",
    "total_tokens": 602,
    "prompt_tokens": 329,
    "completion_tokens": 273,
    "cache_hit": false,
    "history": [
        {
            "user": "tell me about yourself",
            "bot": "I am an AI assistant specializing in reviewing documents for GDPR compliance."
        }
    ],
    "prompt_prefix": "You are an AI assistant specializing in reviewing documents for GDPR compliance.",
    "instructions": [
        ""
    ],
    "references": [],
    "chat_thread_name": "AI Assistant Specializing",
    "chatlog_id": 9539
}

Request

Body Params application/json
history
array [object {2}] 
required
Contains the history of the chat conversation. Each object in the array represents a turn in the conversation.
user
string 
optional
Example:
What are your professional strengths and weaknesses?
bot
string 
optional
Example:
I am an AI assistant specializing in reviewing documents for GDPR compliance.
category
integer 
required
Represents the unique identifier of the agent.
Example:
491
user_id
integer 
required
Unique identifier for the user making the request.
Example:
46
created_by
string 
required
Email address of the user creating the request.
Example:
user@example.com
chat_thread_id
integer 
required
Identifier for the chat thread.
Example:
823
overrides
object 
required
Custom settings to override default AI behavior.
semantic_ranker
boolean 
optional
Enables semantic configurations while indexing.
Example:
true
semantic_captions
boolean 
optional
Determines if semantic captions should be used.
Example:
false
top
integer 
optional
Number of top responses to consider. Currently not in use, can be omitted.
Example:
3
suggest_followup_questions
boolean 
optional
Indicates if follow-up questions should be suggested.
Example:
true
sources
boolean 
optional
Indicates if data should be retrieved from the knowledge base.
Example:
false
cache_skip
boolean 
optional
Skips cached responses. Currently, caching is not used.
Example:
false
mode_override
string 
optional
Overrides the agent type mode (e.g., QnA). Used in Tutor agent type, can be omitted if not applicable.
Example:
query_source
string 
required
Indicates the source of the user query.
Example:
web
model
string 
required
Specifies the model to be used for the response.
Example:
gpt4-o
Examples

Responses

🟢200OK
application/json
Chat response
Body
data_points
string 
optional
Data points retrieved during the conversation.
Example:
answer
string 
optional
The AI-generated response to the user's query.
Example:
As an AI assistant specializing in GDPR compliance, my professional strengths include...
sources
string 
optional
Sources of information used in generating the response.
Example:
followup_questions
array[string]
optional
Suggested follow-up questions.
thoughts
string 
optional
The AI's internal thought process or reasoning.
Example:
Searched for: What are your professional strengths and weaknesses?
indexes
array[string]
optional
Indexes used during the chat.
Example:
[]
query
string 
optional
The user's query.
Example:
What are your professional strengths and weaknesses?
total_tokens
integer 
optional
Total tokens used in the request.
Example:
602
prompt_tokens
integer 
optional
Tokens used for the prompt.
Example:
329
completion_tokens
integer 
optional
Tokens used for the completion.
Example:
273
cache_hit
boolean 
optional
Indicates if the response was retrieved from the cache.
Example:
false
history
array [object {2}] 
optional
The chat history up to the current request.
user
string 
optional
Example:
tell me about yourself
bot
string 
optional
Example:
I am an AI assistant specializing in reviewing documents for GDPR compliance.
prompt_prefix
string 
optional
The prefix used in the prompt to guide the AI's response.
Example:
You are an AI assistant specializing in reviewing documents for GDPR compliance.
instructions
array[string]
optional
Additional instructions provided to the AI.
Example:
[""]
references
array[string]
optional
References used in generating the response.
Example:
[]
chat_thread_name
string 
optional
Name of the chat thread.
Example:
AI Assistant Specializing
chatlog_id
integer 
optional
Identifier for the chat log.
Example:
9539
🟠400Bad Request
🟠401Unauthorized
🔴500Server Error
Previous
Overview
Next
Create Custom Instructions