Ejento APIs
V2 Legacy
  • Stable
  • V2
  • V2 Legacy
  1. Corpus
Ejento APIs
V2 Legacy
  • Stable
  • V2
  • V2 Legacy
  • Overview
  • Endpoints
    • Agent
      • Create Agent By Agent Builder
      • Create Agent By Configure
      • Get All Agents
      • Get Agent By Team
      • Get Agent By User Team
      • Agent Filtered
      • Get Agent
      • Edit Agent
      • Get Recent Agents
      • Create Recent Agent
      • Delete Recent Agent
      • Get Starred Agents
      • Create Starred Agent
      • Delete Starred Agent
    • Agent Corpus Connection
      • Create Agent Corpus Connection
      • Get Agent Corpus Connection
      • Edit Agent Corpus Connection
      • Delete Agent Corpus Connection
      • Get All Agent Corpus Connections
      • Delete All Agent Corpus Connections
    • Agent Response
      • Create Agent Response
      • Get All Agent Responses
      • Get Agent Responses By User
      • Get Agent Responses By Project
      • Get Agent Responses By Chat Thread
      • Get Agent Response
      • Delete Agent Response
      • Create Agent Response Comment
      • Get Agent Response Comment
      • Get Agent Response Dashboard
      • Create Agent Response Feedback
      • Create Agent Response Log
      • Pin Agent Response
      • Unpin Agent Response
      • Get Pinned Agent Responses
    • Agent Reviews
      • Create Review
      • Get All Reviews
      • Get Reviews by Agent
      • Delete Review
    • Agent Rating
      • Get All Agent Ratings
      • Get Agent Rating
      • Update Agent Rating
    • Agent Alias
      • Get All Agent Aliases
      • Create Agent Alias
      • Update Agent Alias
      • Delete Agent Alias
    • Agent Access
      • Get Agent Access
      • Update Agent Access
    • Agent Type
      • Get All Agent Types
      • Get Agent Type
      • Update Agent Type
    • Agent User
      • Add Users to Agent
      • Get Users Of Agent
      • Delete User from Agent
      • Get User Agent Permission
      • Get All Agents with Users
    • Agent Tags
      • Get All Distinct Agent Tags
      • Annotate an Agent with Tags
    • Agent Vote
      • Create Agent Vote
      • Get Agent Vote
    • Agent Comment
      • Create Comment on an Agent
      • Get Comments for an Agent
      • Edit Agent Comment
    • Chat Thread
      • Create Chat Thread
      • Get All Chat Threads Of An Agent
      • Get All Chat Threads With Admin Panel Filters And Pagination
      • Get Reduced Chatlogs by Thread ID for Admin Panel
      • Get Chat Thread
      • Edit Chat Thread
      • Delete Chat Thread
      • Add ChatThread-Corpus Connection
      • Get ChatThread-Corpus Connection
      • Delete ChatThread-Corpus Connection
    • Project
      • Create Project
      • Get All Projects
      • Project Filtered
      • Get All Agents Of Project
      • Get All Projects By Team
      • Get Project
      • Edit Project
      • Delete Project
      • Fetch Project Details
      • Add Recent Project
      • Get Recent Projects
    • User Project
      • Add Users To Project
      • Get All Projects By User Teams
      • Get Projects By User and Team
      • Delete Users from Project
    • Document
      • Get Document
      • Edit Document
      • Add Or Remove Tags On Document
      • Document Polling
      • Trigger a refresh(reindex) of a Document
    • Corpus
      • Create Corpus
        POST
      • Get All Corpus
        GET
      • Get Corpus
        GET
      • Edit Corpus
        PUT
      • Delete Corpus
        DELETE
      • Create Document In Corpus
        POST
      • Get All Documents From Corpus
        GET
      • Delete Document(s) from Corpus
        DELETE
      • Check Duplicate Documents
        POST
      • Get All Agents By Corpus
        GET
      • Get Corpus Permissions
        GET
      • Get Corpus Permission By User
        GET
      • Annotate Corpus
        POST
      • Trigger a refresh(reindex) of a Corpus
        POST
    • Notification
      • Create Notification
      • Retrieve All Notifications
      • Read Notifications By User ID
      • Retrieve Notification
      • Read Notification
      • Delete Notification
    • Feature Flag
      • Get All Feature Flags
      • Get DALL-E Feature Flag
      • Get Share Agent Feature Flag
      • Get Agent Alias Feature Flag
      • Get SharePoint Index Feature Flag
      • Get Chat Agent Creation Feature Flag
      • Get OAuth Feature Flags
      • Get Google OAuth Feature Flag
      • Get LinkedIn OAuth Feature Flag
      • Get MS SSO OAuth Feature Flag
      • Get Github OAuth Feature Flag
    • Team
      • Create Team
      • Get All Teams
      • Get Team Details
      • Edit Team
      • Delete Team
      • Create Recent Team
      • Get Recent Teams
      • Add Users to Team
      • Get Users in a Team
      • Get Teams Of User
      • Get User Role By Team
      • Get Agents Of User Team
      • Get Projects And Team
    • User
      • Create User In Organization
      • Get All Users By Organization
      • Get User
      • Edit User
      • Delete User
      • Batch Delete Users
      • User Filtered
      • Create User Permission
      • Get User Permission
      • Edit User Permission
      • Delete User Permission
    • Email Indexing Authorization
      • Email Authorize
    • Conversation Starters
      • Create Conversation Starter
      • Get Conversation Starters
    • Tool
      • Create Tool
      • Get All Tools
      • Get Tool
      • Edit Tool
      • Delete Tool
    • Agent Tool Connection
      • Enable Agent Tool
      • Get All Agent Tools
      • Disable Agent Tool
    • Organization Tool
      • Enable Organization Tool
    • API Tool Template
      • Create API Tool Template
      • Get All API Tool Templates
    • LLM Config
      • Get All LLM Configs
      • Get Active Config
      • Get LLM Config
      • Get Model Deployment
      • Get Org Configs
      • Set Agent Config View
  1. Corpus

Create Document In Corpus

Deprecated
POST
/v2/api/corpus/{corpus_id}/document
Enables authorized users to upload a new document into a specific corpus by providing essential details such as content type, source text, upload method, and user ID.
Purpose:
Designed for adding new content to an existing corpus for indexing, searching, or analysis purposes.
Ensures each document is properly linked with a corpus and can be processed asynchronously.
Returns a unique document identifier (document ID)
However, this API has been deprecated and is no longer recommended for use.

Recommended Replacement:#

Please use the latest and improved version of this API:
👉 Upload a Document to a Corpus
Request Body Parameters (form-data):
content_type (Text, required): Specifies the type of content being uploaded.
source (Text/File, required): The content itself — either a text string, a URL, or a file (PDF/DOCX/etc.)
upload_from (Text, required): Indicates where the upload is coming from (e.g., web).
user_id (required): ID of the user performing the upload.
Supported Upload Types:
1.
File Upload
Uploads any supported document file, including PDF, Word, Excel, CSV, PPTX, RTF, EML, EPUB, XML, KML, GZ, JSON, Text, HTML, Zip File, Open Document format.
content_type: file
source (File): The file to upload (e.g., sample.pdf, report.docx, notes.txt, data.xlsx)
2.
Text Upload
Uploads a plain text input.
content_type: text
source (Text): Any text string (e.g., "I am learning...")
3.
Weblink Upload
Uploads a URL pointing to an online webpage or PDF.
content_type: weblink
source (Text): A valid URL (e.g., https://example.com/doc.pdf or https://example.com/article)
What is a Corpus?
A corpus is a structured collection of documents or data grouped under a specific context or use case. It is commonly used for organizing content intended for search, training, redaction, or analysis.

How to View Your Corpus ID?#

To find your Corpus ID, visit the View Corpus ID Guide.
For more detailed information about corpus, refer to the Corpus Guide.

Request

Path Params

Header Params

Body Params multipart/form-data

Responses

🟢200OK
application/json
Document successfully created and processing started.
Body

🟠400Bad Request
🟠401Unauthorized
🟠403Forbidden
🟠404Record Not Found
🔴500Server Error
Request Request Example
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'https:///v2/api/corpus/0/document' \
--header 'Ocp-Apim-Subscription-Key: ' \
--header 'Authorization: Bearer ' \
--form 'content_type="text"' \
--form 'source="Example Source"' \
--form 'upload_from="web"' \
--form 'user_id="147"'
Response Response Example
{
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "statusQueryGetUri": "http://example.com",
    "sendEventPostUri": "http://example.com",
    "terminatePostUri": "http://example.com",
    "rewindPostUri": "http://example.com",
    "purgeHistoryDeleteUri": "http://example.com",
    "restartPostUri": "http://example.com",
    "suspendPostUri": "http://example.com",
    "resumePostUri": "http://example.com"
}
Previous
Delete Corpus
Next
Get All Documents From Corpus
Built with