Enjo API

11min

Introduction

This API allows external clients to connect with Enjo's AI agents. Users can send messages to the agents and automate workflows like generating support tickets. The API provides endpoints for seamless communication with AI agents through Enjo's platform. The API supports secure communication through Bearer token-based authentication.

Authentication

To access the API, developers must authenticate using Bearer tokens. These tokens are generated through the Personal Access Token settings within your workspace. Once created, the Bearer token can be included in the authorization header of your API requests to authenticate and interact with the API securely.

Accessing API Settings

  • Navigate to Personal Access Tokens:



Document image

  • Click on your settings icon in the bottom right corner of the Enjo dashboard.
  • Select Personal Access Token from the left sidebar.



Document image




Create a Token:

Document image

  • Click the Create Token button.
  • Assign a name to your token.



Document image

  • A new token will be generated—make sure to copy it immediately, as it will not be displayed again.

Making Your First API Request

This endpoint allows you to send text to a bot and receive automated responses. Additionally, it can trigger the creation of tickets in an integrated ticketing system, such as Jira, ServiceNow, or other supported platforms, streamlining issue tracking and management. Base URL: https://api.enjo.ai/
POST
Request
Response
Path Params
id
required
String
Unique identifier for the AI agent
Header Parameters
Auth Token
required
String
Bearer access_token
Body Parameters
text
required
String
This input serves as the basis for the bot's processing, enabling it to generate an appropriate reply or take further actions based on the message content.
conversationId
optional
String
A unique identifier is used to track the current conversation. This allows tracking across multiple requests
Curl
Responses
200
400
401
404
429
500


Ticketing Configuration The bot can automatically generate a ticket if it is configured with a ticketing platform.

API Response Structure

Upon a successful interaction with the bot or the creation of a ticket, the API response will include comprehensive details. This ensures full transparency and traceability of the conversation and any actions the bot takes, such as creating a ticket.

Table format describes the structure and details of the response:

Field

Type

Description

success

Boolean

Indicates whether the API call was successful (true) or encountered an error (false).

data

object

Contains the primary data in the response when the API call is successful.

├── answers

String

The bot's response or answer to the user query, may include detailed text, facts, or solutions.

├── sources

Array of Objects

Lists the sources from where the answers are derived

│   ├── type

The type of source (e.g Jira , Knowledge Base).

│   ├── name

String

Name or title of the source.

│   ├── score

Float

Confidence score of the source's relevance to the query.

│   ├── url

string

URL link to the source where more information can be found.

├── conversationId

string

A unique identifier to track the conversation and ensure continuity across multiple interactions.

├── ticketDetails

Object

Details about the ticket created in the external system (if applicable)

│   ├── url

String

URL to access the ticket in the external system.

│   ├── attributes

String

Metadata and additional information about the ticket.

│   ├── Id

String

Unique identifier for the ticket.

│   ├── Type

string

The category or type of issue raised in the ticket.

│   ├── Status

string

Current status of the ticket (e.g., Open, Closed).

│   ├── Priority

String

Priority level of the ticket (e.g., Low, Medium, High).

│   ├── Description

String

Description of the issue or request in the ticket.

│   ├── CreatedDate

String

Timestamp indicating when the ticket was created.

│   ├── LastModifiedDate

String

Timestamp indicating the last time the ticket was modified.

Rate Limiting

Limit: 20 requests per minute per IP

Response (when limit exceeded):

{ "code": "rate_limit_error", "message": "Rate limit exceeded", "status": 429 }

Throttling

Limit: 10 requests per 5 seconds per IP

Response (when throttling triggered):

{ "code": "rate_limit_error", "message": "Rate limit exceeded", "status": 429 }

Troubleshooting Guide

  • Issue: "Invalid botId" error Solution: Double-check that the bot ID in your request matches the one listed in your Enjo dashboard.
  • Issue: No ticket response was received Solution: Confirm that the bot is properly set up for ticketing. For setup details, refer to the AI Agent Ticketing Configuration Guide.





Document image

Document image