Ejento APIs
V1
  • V2
  • V1
  1. Corpus APIs
Ejento APIs
V1
  • V2
  • V1
  • Overview
  • Endpoints
    • Chat APIs
      • Run Chat
      • Create Custom Instructions
      • Add Comment Feedback
      • Add Upvote Feedback
      • Add Downvote Feedback
      • Get Chat Thread
      • Get Thought Process
      • Get Supporting Content
      • Get All Agent Threads
    • 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
        GET
      • Create Corpus
        POST
      • Get Corpus by ID
        GET
      • Edit Corpus
        PUT
      • Delete Corpus
        DELETE
      • Get Corpus Permissions
        GET
      • Create Corpus Permissions
        POST
      • Delete Corpus Permissions
        DELETE
      • Get Corpus Permission By User
        GET
      • Create Document In Corpus
        POST
      • Get All Documents From Corpus
        GET
      • Delete All Documents
        DELETE
      • Check Duplicate Documents
        POST
    • 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. Corpus APIs

Create Corpus

POST
/api/corpus/
Corpus APIs
This endpoint allows authenticated users to create a new corpus in the system.
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST '/api/corpus/' \
--header 'Content-Type: application/json' \
--data-raw '{
    "name": "Testing",
    "description": "This corpus is for testing purposes"
}'
Response Response Example
{
    "id": 484,
    "indexing_mode": {
        "id": 1,
        "mode": "exhaustive"
    },
    "created_by": "admin.ai",
    "created_on": "2024-08-30T15:31:55.369957Z",
    "modified_by": "",
    "modified_on": "2024-08-30T15:31:55.369973Z",
    "name": "Testing",
    "description": "This corpus is for testing purposes",
    "is_public": false,
    "is_deleted": false,
    "owner": 1,
    "org": 1
}

Request

Body Params application/json
name
string 
optional
The name of the corpus.
Example:
Testing
description
string  | null 
optional
A description of the corpus purpose.
Example:
This corpus is for testing purposes
Examples

Responses

🟢201Created
application/json
Corpus created successfully.
Body
id
integer 
optional
Unique identifier for the corpus.
Example:
484
indexing_mode
object 
optional
Indexing mode details.
id
integer 
optional
Unique identifier for the indexing mode.
Example:
1
mode
string 
optional
The mode of indexing.
Example:
exhaustive
created_by
string 
optional
User who created the corpus.
Example:
admin.ai
created_on
string <date-time>
optional
Timestamp when the corpus was created.
Example:
2024-08-30T15:31:55.369957Z
modified_by
string 
optional
User who last modified the corpus.
Example:
modified_on
string <date-time>
optional
Timestamp when the corpus was last modified.
Example:
2024-08-30T15:31:55.369973Z
name
string 
optional
The name of the corpus.
Example:
Testing
description
string  | null 
optional
A description of the corpus purpose.
Example:
This corpus is for testing purposes
is_public
boolean 
optional
Indicates if the corpus is public.
Example:
false
is_deleted
boolean 
optional
Indicates if the corpus is deleted.
Example:
false
owner
integer 
optional
Unique identifier of the user who owns the corpus.
Example:
1
org
integer 
optional
Unique identifier of the organization.
Example:
1
🟠400Bad Request
🟠401Unauthorized
🔴500Server Error
Previous
Get All Corpus
Next
Get Corpus by ID