Limitations
- For Cognigy.AI 4.100 and earlier, you can download Snapshots up to 100 MB using the Cognigy.AI CLI. In later versions, there’s no maximum download size for Snapshots via the CLI.
- The
pushandrestoreCLI commands can only update resources. If you want to create a resource, use the Cognigy.AI API. - CLI commands don’t support adding or moving Nodes in the Flow structure. For this purpose, use the Cognigy.AI API.
Cognigy.AI API
For communication with the Cognigy.AI installation, the frontend uses an HTTP-based API. This API can also be used by developers to build custom integrations with Cognigy.AI. We also offer a library in the form of an NPM package called the “rest-api-client” which helps to lower the burden of consuming our APIs. This library is available on NPM and is written in modern JavaScript including Typescript definitions. Our OpenAPI DocumentationWhat are the API capabilities?
Any kind of information that is visible and any kind of action that can be performed in the frontend is queried or triggered through this API, which is 100% exposed for developers, too.API Base URL
The API Base URL is the endpoint for accessing the Cognigy.AI OpenAPI. The table outlines the base URLs for different environments.| Environment | API Base URL |
|---|---|
| Trial (trial.cognigy.ai) | https://api-trial.cognigy.ai |
| SaaS | Choose the environment you use:
|
| On-premises | Specify the API URL as the value for the environment variable BACKEND_BASE_URL_WITH_PROTOCOL in your Cognigy.AI values.yaml file. |
| NiCE CXone Environments | Use the https://cognigy-api-<region>.nicecxone.com pattern, where <region> matches your NiCE CXone cluster. For example, https://cognigy-api-na1.nicecxone.com, https://cognigy-api-eu1.nicecxone.com. For a full list of available regions, refer to NiCE CXone Shared SaaS Clusters. |
Manage API Keys
An API key is used to authenticate to the Cognigy.AI API as a user in the system without exposing the user’s credentials. To generate an API key, read Create API Keys. To delete an API key, read Revoke API Keys.How to Use the API
Cognigy API includes an OpenAPI documentation that outlines all the different API operations in detail. For example, for the Cognigy trial environment, accesshttps://api-trial.cognigy.ai/openapi, and for a NiCE CXone environment, access https://cognigy-api-<region>.nicecxone.com/openapi, such as https://cognigy-api-na1.nicecxone.com/openapi.
To call the API, send an HTTP request including one of the following:
- A query parameter
api_keywith your API key set as a value. - A header
X-API-Keywith your API key set as a value.
https://api-<cognigy-domain>.ai and your API key is <api-key>, you can open a browser tab and go to https://api-<cognigy-domain>.ai/projects?api_key=<api-key> to get a list of all the Projects assigned to you, including metadata about the resources within each Project.
This call is used by the frontend when you load the Main page.
Super API-Key
Most of the APIs in Cognigy.AI are agent-bound, meaning that a developer using our API can only request information from Projects they have access to. There are certain use-cases where, for example, all Flows within a certain Organization should be listed. For such use-cases, we have introduced a feature called the “Super API-Key” with our 4.1.4 release.Feature availability
Feature availability
Super API-Key and TTL
Super API-Key and TTL
Cognigy.AI CLI
The Cognigy.AI CLI is a command-line interface enabling users to manage Projects directly from the command line. For example, with this CLI, you can create Snapshots, manage Locales, and deploy AI Agents efficiently. To start using the Cognigy.AI CLI, refer to the Cognigy repository on GitHub. You can also explore the Cognigy Help Center, including its Cognigy CLI section.Examples
The following examples show common CLI commands and the resources they work with.Clone a Project
Clone a Project
agent (all Project resources), flows, endpoints, lexicons, aiAgents.Restore a Project
Restore a Project
agent (all Project resources), flows, endpoints, lexicons, aiAgents.Pull and Push Resources
Pull and Push Resources
pull—flows,lexicons,endpoints,extensions,locales,aiAgents.push—flows,lexicons,endpoints,aiAgents.
Compare Local and Remote Resources
Compare Local and Remote Resources
flows, lexicons, endpoints, aiAgents.Train a Flow
Train a Flow
Create a Snapshot or Locale
Create a Snapshot or Locale
Export and Import Multilingual Flow Texts
Export and Import Multilingual Flow Texts
content.csv file with the text fields from Nodes in the Flow across all Locales, or import updated localized content back into a Flow.Localize a Flow
Localize a Flow
Translate a Flow
Translate a Flow
google, microsoft, deepl.Execute a Raw API Command
Execute a Raw API Command
--list to print all available API commands.Run Playbooks
Run Playbooks
./playbookRunResults.json.0 — success, 1 — failure, 2 — timeout.Manage AI Agent Knowledge
Manage AI Agent Knowledge
.ctxt files into the store.text, pdf, docx, csv, json, jsonl, epub, srt, md, cheerio, playwright, diffbot, other.