1. Guides
Ejento APIs
Stable
  • Stable
  • V2
  • V2 Legacy
  • Overview
  • Changelog
  • Versioning
  • Quick-Start Template for Building an App
  • FAQs
  • Guides
    • How to generate API Key and Auth Token
    • Build an App with Ejento APIs
    • How to Import Ejento APIs into Postman
    • Response API Migration
    • Indexing API Migration
    • Voice Call API Integration Guide
    • Staging & Publishing for Agents API Guide
  • Authentication
    • Getting Started with Authentication
    • SSO
      • Initiate Google SSO Login
      • Initiate Microsoft SSO Login
      • Initiate LinkedIn SSO Login
      • Initiate Okta SSO Login
    • Feature Flags
      • Get Login Feature Flags
    • Authenticate User
    • Request Passwordless Exchange Token
    • Exchange Passwordless Token for Access Tokens
    • Register User
    • Update Own Password
    • Refresh Access Token
    • Passwordless Authentication (Email Magic Link)
    • Validate Magic Link Token
    • Verify Email OTP
  • Agents
    • Agent Access
      • Get Agent Access
      • Update Agent Access
    • Agent Alias
      • Get Agent Alias
      • Create an Agent Alias
      • Update an Agent Alias
      • Delete an Agent Alias
      • Get all Agent Aliases
    • Agent Tags
      • Add or Remove Tags from an Agent
      • Get all Tags for a given Project or Organization
      • Get all Tags grouped by Agent for a given Project or Organization
    • Agent Chat Threads
      • Get Chat Threads of an Agent
      • Create Chat Thread for an Agent
    • Agent Comment
      • Get all Comments for an Agent
      • Create a Comment
      • Update a Comment
      • Delete a Comment
    • Agent Rating
      • Get Ratings of an Agent
      • Update Agent Rating
      • Get all Agent Ratings
    • Agent Review
      • Get all Reviews for specific Agent
      • Create a new Review
      • Get all Reviews of the Authenticated User
      • Update a Review
      • Delete a Review
    • Agent Tools
      • List all Tools with their enabled status for the given Agent
      • Unlink an Agent from a Tool
      • Link an Agent to a Tool
      • List all tools that are connected to the Agent
    • Agent Vote
      • Get Vote Information for an Agent
      • Vote on an Agent
    • Agent Type
      • Get all Agent Types
      • Get a specific Agent Type
      • Update a specific Agent Type
    • Evaluation Datasets
      • List Agent Evaluation Datasets
      • Create Agent Evaluation Dataset
      • Batch Delete Agent Evaluation Datasets
      • Get Agent Evaluation Dataset
      • Update Agent Evaluation Dataset
      • Delete Agent Evaluation Dataset
    • Evaluation Runs
      • List Agent Evaluation Runs
      • Create Agent Evaluation Run
      • Batch Delete Agent Evaluation Runs
      • Get Agent Evaluation Run
      • Update Agent Evaluation Run
      • Delete Agent Evaluation Run
    • Agent Permissions
      • List all permissions on an agent
      • Grant permission on an agent
      • Update a permission on an agent
      • Revoke permission on an agent
      • Grant multiple permissions on an agent
      • Revoke multiple permissions on an agent
      • Get user permissions on a specific agent
      • Get user permissions on multiple agents
    • Get all Agents
    • Create a new Agent
    • Get an Agent
    • Update an Agent
    • Delete an Agent
    • Activate an Agent
    • Get Agent-Corpus Connections
    • Create Multiple Agent-Corpus Connections
    • Delete Agent-Corpus Connections
    • Get Agent-Corpus Connection Details
    • Create Agent-Corpus Connection
    • Update Agent-Corpus Connection
    • Delete Agent-Corpus Connection
    • Get agent history with pagination
    • Restore an agent to a previous checkpoint
    • Get a single agent history record by history ID
    • Create Custom Instructions for an Agent
    • Update Custom Instructions for an Agent
    • Delete a Custom Instruction for an Agent
    • Get Agent Prompt History
    • Create a Recent Agent
    • Delete a Recent Agent
    • Get Agent Details with Starred Status
    • Create Starred Agent
    • Delete Starred Agent
    • Get the Status of an Agent
    • Get all Character Voices
    • Publish staging agent to main
    • Get Agent Filter
    • Get publish history for an agent
    • Generate an image for an agent based on the provided description
    • Get rollback diff preview for a publish record
    • Get all Agents by Project
    • Roll back staging agent to a previous publish
    • Get list of Recent Agents
    • Get Staging Diff
    • Get all Starred Agents of the Authenticated User
    • Get all workflows for an agent
  • Agent Response
    • Stream Agent Response (SSE)
    • Generate Agent Response (Non-Streaming)
    • Generate Token for Voice Call
    • Get an Agent Response
    • Update an Agent Response
    • Delete an Agent Response
    • Get Comments for Agent Response
    • Create a Comment for Agent Response
    • Create a Feedback for an Agent Response
    • Pin an Agent Response
    • Unpin an Agent Response
    • Get Supporting Content of an Agent Response
    • Get Thoughts of an Agent Response
    • Get Agent Responses based on filters
    • Get Agent Responses of an Agent
    • Create Agent Response Log
    • Get Pinned Agent Responses
    • Create Bulk Agent Response Logs
  • Chat Thread
    • Agent Response
      • Get Agent Responses for a Chat Thread
      • Delete Agent Responses for a Chat Thread
    • Chat Logs
      • Get Chat Logs for a Chat Thread
    • Corpus Connection
      • Get Corpus Connection by ChatThread ID
      • Delete Corpus Connection by ChatThread ID
      • Get a ChatThread-Corpus connection
      • Create a ChatThread-Corpus connection
      • Delete a ChatThread-Corpus connection
    • Documents
      • Get Documents in Chat Thread
    • Get Chat Thread
    • Update Chat Thread
    • Delete Chat Thread
    • Get Chat Threads based on various filters
    • Get Recent Chat Threads across all Agents
  • Chat Logs
    • Get Chat Log Details
    • Get Chat Log Search Results
  • Conversation Starters
    • Get Conversation Starters for an Agent
    • Create a new Conversation Starter.
  • Teams
    • Team Permissions
      • List all permissions on a team
      • Grant permission on a team
      • Update a permission on a team
      • Revoke permission on a team
      • Grant multiple permissions on a team
      • Revoke multiple permissions on a team
      • Get user permissions on a specific team
      • Get user permissions on multiple teams
    • Get all Teams
    • Create a Team
    • Get a Team
    • Update a Team
    • Delete a Team
    • Get all Projects of a Team
    • Create a Recent Team
    • Get all Users in a Team
    • Add Users to a Team
    • Remove User from Team
    • Get Recent Teams
    • Get all Teams of the Authenticated User
  • Projects
    • Project Permissions
      • List all permissions on a project
      • Grant permission on a project
      • Update a permission on a project
      • Revoke permission on a project
      • Grant multiple permissions on a project
      • Revoke multiple permissions on a project
      • Get user permissions on a specific project
      • Get user permissions on multiple projects
    • Retrieve all Projects
    • Create a Project
    • Get a Project
    • Update a Project
    • Delete a Project
    • Get Agent Responses using Project ID
    • Add a Recent Project for a User
    • Add Users to a Project
    • Remove a User from a Project
    • Get all Workflows for a Project
    • Get multiple Projects by their IDs
    • Get Projects based on filters
    • Get Recent Projects for a User
    • Get Projects with Team Details
  • Corpora
    • Corpus Permissions
      • Get all Permissions for a Corpus
      • Grant permission on a corpus
      • Update a permission on a corpus
      • Revoke permission on a corpus
      • Batch grant permissions on a corpus
      • Batch revoke permissions on a corpus
      • Get calling user's permissions on a corpus
      • Get a user's permissions on a corpus
      • Get a user's permissions across multiple corpora
    • Get all Corpus
    • Upload a Document to a Corpus
    • Create a Corpus
    • Get a Corpus
    • Update a Corpus
    • Delete a Corpus
    • Get Corpus Agent Connections
    • Get Default Corpus Agent Connection
    • Annotate/Tag a Corpus
    • Get Conversation Starters for a Corpus
    • Get all Documents for a Corpus
    • Delete Document(s) from a Corpus
    • Check Duplicate Documents in a Corpus
    • Trigger a Refresh (Reindex) of a Corpus
    • Get Sitemaps for a Corpus
    • Get Corpora with Refresh (Reindex) Enabled
  • Documents
    • Get a Document
    • Update a Document
    • Delete a Document
    • Annotate a Document
    • Get Conversation Starters for a Document
    • Trigger a Refresh (Reindex) of a Document
    • Retrieve multiple Documents by IDs
  • Organizations
    • Organization Permissions
      • List all permissions on an organization
      • Get user permissions on a specific organization
    • Get all Configurations
    • Get active configuration for an Organization
    • Get the Model Deployment for an Organization
    • Get all Tools in an Organization
    • Disable a Tool for all Agents in an Organization
    • Enable a Tool for all Agents in an Organization
    • Get all API Tool Templates
    • Create a new API Tool Template
    • Create a new API tool
    • Create an attachment tool
    • Create a new RAG tool in an Organization
    • Create a Web Search Tool in an Organization
    • Get all Users in an Organization
    • Create a User in an Organization
    • Get all Configurations of user's Organization
  • Users
    • Get a User
    • Update a User
    • Delete a User
    • Get Agent Responses of a User
    • Get all User Permissions
    • Get Projects of a User
    • Get all Workflow Tables for a User
    • Get all Workflows for a User
    • Delete multiple Users
    • Get a specific User by user_email
    • Get all Users
    • Get authenticated User
    • Get User Projects
  • Analytics
    • Get Agent Cost Data
    • Get Agent Document Count Data
    • Get Agent Indexing Mode Data
    • Get Agent Most Active Data
    • Get Agent Query Count Data
    • Get Recent Agent Data
    • Get Agent Summary Statistics
    • Get Agent Token Data
    • Get Agent Vote Data
    • Get Corpus Document Count Data
    • Get Corpus Indexing Mode Data
    • Get Cost Data
    • Get Document Count Data
    • Get Indexing Mode Data
    • Get Project Cost Data
    • Get Project Document Count Data
    • Get Project Indexing Mode Data
    • Get Project Most Active Data
    • Get Project Query Count Data
    • Get Recent Project Data
    • Get Project Summary Statistics
    • Get Project Token Data
    • Get Project Vote Data
    • Get Overall Summary Statistics
    • Get Team Cost Data
    • Get Team Document Count Data
    • Get Team Indexing Mode Data
    • Get Team Most Active Data
    • Get Team Query Count Data
    • Get Recent Team Data
    • Get Team Summary Statistics
    • Get Team Token Data
    • Get Team Vote Data
    • Get Total Entity Counts
    • Get User Cost Data
    • Get User Document Count Data
    • Get User Indexing Mode Data
    • Get User Most Active Data
    • Get User Query Count Data
    • Get Recent User Data
    • Get User Summary Statistics
    • Get User Token Data
    • Get User Vote Data
    • Get Vote Count Data
    • Get Workflow Summary Statistics
    • Get Query Count Data
    • Get Token Data
  • Configurations
    • Update the LLM configuration for an Agent
    • Get OAuth-related Feature Flags
  • Guardrails
    • Get available guardrail types for agent
    • Enable/disable a guardrail type for agent
    • Get Guardrails
    • Apply Guardrails on Input Text
    • Update Guardrails
    • Delete Guardrails
    • Get Guardrails in Organization
    • Create Guardrail in Organization
    • Enable or Disable Guardrail for Organization
  • Feature Flags
    • Get All Feature Flags
    • Get Agent Alias Feature Flag
    • Get Agent Evaluation Feature Flag
    • Get Api Tools Feature Flag
    • Get Caching Feature Flag
    • Get Call Feature Flag
    • Get Chat Agent Creation Feature Flag
    • Get Chat Widget Feature Flag
    • Get dall_e Image Generation Feature Flag
    • Get Developer Portal Feature Flag
    • Get Flush Cache Feature Flag
    • Get Guardrail Feature Flag
    • Get PII Redaction Feature Flag
    • Get Share Agent Feature Flag
    • Get Sharepoint Legacy Feature Flag
    • Show Quota Limit Feature Flag
    • Get Staging Agent Feature Flag
    • Get Workflow Evaluation Feature Flag
    • Get Youtube Index Feature Flag
  • Notifications
    • Get all Notifications
    • Create a new Notification
    • Update Notifications by User ID
    • Get a Notification
    • Update a Notification
    • Delete a Notification
  • Tools
    • Get Tool by ID
    • Update Tool by ID
    • Delete Tool by ID
  • Workflows
    • Evaluation Datasets
      • List Workflow Evaluation Datasets
      • Create Workflow Evaluation Dataset
      • Batch Delete Workflow Evaluation Datasets
      • Get Workflow Evaluation Dataset
      • Update Workflow Evaluation Dataset
      • Delete Workflow Evaluation Dataset
    • Evaluation Runs
      • List Workflow Evaluation Runs
      • Create Workflow Evaluation Run
      • Batch Delete Workflow Evaluation Runs
      • Get Workflow Evaluation Run
      • Update Workflow Evaluation Run
      • Delete Workflow Evaluation Run
    • Workflow Permissions
      • Get all Permissions for a Workflow
      • Grant permission on a Workflow
      • Update a permission on a Workflow
      • Revoke permission on a Workflow
      • Batch grant permissions on a Workflow
      • Batch revoke permissions on a Workflow
      • Get a user's permissions on a workflow
      • Get a user's permissions across multiple workflows
    • Get all Workflows
    • Create a Workflow
    • Get a Workflow
    • Stream Workflow Response (SSE)
    • Update a Workflow
    • Delete a Workflow
    • Get all Workflow Chat Threads
    • Create a Workflow Chat Thread
    • Get all Workflow Responses
    • Create a Workflow Chat Response
    • Get a Workflow Chat Thread
    • Update a Workflow Chat Thread
    • Delete a Workflow Chat Thread
    • Get all Workflow Chat Responses
    • Delete a Workflow Response
    • Create a Workflow Feedback
    • Retrieve a list of reviews for a given workflow response
    • Create a Workflow Review
    • Get Workflow Responses based on filters
  • Citation
    • Get Citation File Content
  • Sitemaps
    • Get a Sitemap
    • Toggle Sitemap Syncing
    • Delete a Sitemap (cascade)
    • Get documents linked to a Sitemap
  • Google Drive
    • Folder Mappings
      • Get Google Drive Folder Mappings by Corpus ID
  1. Guides

Staging & Publishing for Agents API Guide

The Staging feature lets you make changes to an agent's configuration in a staging environment before they reach your end-users and agent integrations. Nothing you change in Staging goes live until you publish. You can also revert any previously published changes at any time.
This functionality protects end-users from seeing incomplete or broken configurations. Think of Staging as a space where you can experiment, iterate, and collaborate with others freely, and only promote changes to Production when everything is ready.

How It Works#

Every agent has two environments: Staging and Production.
EnvironmentWho Sees ItWhat It's For
ProductionEnd-users & Agent IntegrationsThe current live configuration
StagingEditors onlyA workspace to prepare the next set of changes

Editing in Staging#

Make your changes to the agent — update the name, description, knowledge sources, tools, guardrails, or any other configuration. All edits apply to Staging only, allowing you to review and test before propagating them to your published agent.
Your staging changes are preserved until you publish them, so you can work across multiple sessions without losing progress.
Working across sessions
You might update the system prompt on Monday, add a new knowledge source on Wednesday, and adjust the guardrails on Friday — all in Staging — and only publish the full set of updates once you're happy with how everything works together.

Endpoints That Require a Follow-up Publish#

The endpoints below modify the Staging state only. None of these changes reach end-users until POST /publish is called.
MethodEndpointDescription
PUT/api/v2/agents/{agent_id}Update agent
POST/api/v2/agents/{agent_id}/instructionsCreate instructions
PUT/api/v2/agents/{agent_id}/instructionsUpdate instructions
DELETE/api/v2/agents/{agent_id}/instructions/{instruction_id}Delete instruction
POST/api/v2/agents/{agent_id}/corporaBulk connect corpora
DELETE/api/v2/agents/{agent_id}/corporaBulk disconnect corpora
POST/api/v2/agents/{agent_id}/corpora/{corpus_id}Connect corpus
PUT/api/v2/agents/{agent_id}/corpora/{corpus_id}Update corpus connection
DELETE/api/v2/agents/{agent_id}/corpora/{corpus_id}Delete corpus connection
POST/api/v2/agents/{agent_id}/tools/{tool_id}/enableEnable tool
DELETE/api/v2/agents/{agent_id}/tools/{tool_id}/disableDisable tool
PATCH/api/v2/agents/{agent_id}/tools/{tool_id}/actions/{action_id}Update action config
POST/api/v2/agents/{agent_id}/tools/{tool_id}/actions/{action_id}/enableEnable action
POST/api/v2/agents/{agent_id}/tools/{tool_id}/actions/{action_id}/disableDisable action
PATCH/api/v2/agents/{agent_id}/guardrailsEnable/disable guardrail
PUT/api/v2/agents/{agent_id}/accessUpdate access level
POST/api/v2/agents/{agent_id}/annotatesUpdate tags
POST/api/v2/agents/{agent_id}/sharepoint/folderCreate a new SharePoint folder connection
PUT/api/v2/agents/{agent_id}/sharepoint/folderUpdate the existing SharePoint folder connection
DELETE/api/v2/agents/{agent_id}/sharepoint/folderDelete the SharePoint folder connection

Reviewing Changes Before Publishing#

Before publishing, you can review a side-by-side comparison of what has changed between Staging and Production. The comparison covers:
Agent settings (name, description, model configuration, etc.)
Instructions
Knowledge sources
Tools
Guardrails
Each changed field shows the current Production value alongside the new Staging value, so you can verify everything looks correct before it goes live.
Only differences are shown
If a field is unchanged, it will not appear in the comparison — only the fields that differ between Staging and Production are highlighted. This keeps the review focused and easy to scan, even when your agent has many configuration options.

Endpoint to Preview Before Publishing#

MethodEndpointDescription
GET/api/v2/agents/{agent_id}/staging-diffPreview a full diff of all changes in Staging relative to Production. Returns has_changes: false when there is nothing to publish.

Publishing#

When you are satisfied with your staging changes, publish them to make them live. Production is updated instantly and a snapshot of the changes is saved to your publish history.
:::note Nothing to publish?
If Staging is already identical to Production, the publish endpoint is blocked and returns has_changes: false.
:::
Review before you publish
Publishing is instant. Once confirmed, changes immediately reflect on the published agent. Always review using the staging diff before proceeding.

Endpoint for Publish#

MethodEndpointDescription
POST/api/v2/agents/{agent_id}/publishPublish all staging changes to the Production agent. Blocked when Staging is identical to Production.
staging.png

Publish History#

Every publish is recorded automatically. Each entry in your publish history shows who published, when, and a summary of what changed. You can browse this history at any time.
Why publish history matters
The publish history is useful for auditing purposes — for instance, if you need to understand who made a particular change and when. It also serves as the foundation for the Revert feature, since each history entry represents a known-good snapshot you can revert to.

Endpoint for Publish History#

MethodEndpointDescription
GET/api/v2/agents/{agent_id}/publishesRetrieve the full publish history for an agent, including who published, when, and a summary of changes.

Revert a Publish#

If you need to roll back a change or return to an earlier configuration, you can revert any entry in your publish history. This is useful if a newly published configuration causes unexpected behavior. You are not limited to reverting only the most recent publish — you can select any entry from the full history.
revert.png

Preview Before Reverting#

Before committing to a revert, you can preview what would change in Staging so there are no surprises. The preview shows the side-by-side diff view — it compares the selected history entry against the current state of Staging, so you can see exactly what will be rolled back before you commit.
MethodEndpointDescription
GET/api/v2/agents/{agent_id}/publishes/{change_track_id}/diffPreview what reverting this publish would change in Staging and in Production if subsequently published.

How Revert Works#

Reverting removes the changes introduced by that publish from Staging. Production is not affected immediately. This gives you a chance to review the reverted changes before they go live. Once satisfied, publish to make the revert live in Production.
MethodEndpointDescription
PUT/api/v2/agents/{agent_id}/rollbackRemoves the changes made at a given change_track_id from the Staging environment. Production is not affected until POST /api/v2/agents/{agent_id}/publish is called.
Production is not immediately affected
Reverting does not immediately update Production. You are always in control of when changes go live.
Previous
Voice Call API Integration Guide
Next
Authentication
Built with