Overview
Custom APIs let you connect IrisAgent to any external HTTP endpoint — your internal systems, third-party services, or data warehouses. Once configured, a Custom API can be used in two ways:- As a trigger condition in the drag-and-drop Workflows builder (e.g., “only run this automation if the customer is on the Premium plan”)
- As a live data source in AI-powered FAQ workflows, where IrisAgent collects required fields from the customer, calls your API, and presents the response in natural language
Step 1: Open the Custom APIs configuration
- Log in to the IrisAgent dashboard.
- Click on Data Sources in the left navigation.
- Scroll to the Development section and click Configure on the Custom APIs card.
Step 2: Add a credential (if your API requires authentication)
Skip this step if your API is publicly accessible or uses URL-based tokens.- In the side panel, click the Credentials tab.
- Click Add Credential.
- Fill in the fields:
- Click Create & Select.
Credential values are stored securely and cannot be viewed after saving. Store them in a safe location before saving.
Step 3: Create a Custom API
- Click the APIs tab and then Add API.
- Fill in the Create Custom API form:
Basic information
HTTP configuration
Template variables
Use{{variableName}} placeholders in the URL, headers, or body to inject live ticket context at call time. IrisAgent automatically substitutes these before making the request.
Built-in variables (always available):
Example URL using a built-in variable:
{{orderId}} as a field it needs to collect from the customer before calling the API.
Response schema
Define the fields you expect back from your API. This tells IrisAgent how to interpret the response.- Click Add Field.
- For each field, set:
- Field name — matches the JSON key in the response, e.g.
isPremium - Field type —
String,Boolean,Integer, orFloat
- Field name — matches the JSON key in the response, e.g.
- Add one field per value you want to use in an expression or surface to the customer.
{"isPremium": true, "tier": "enterprise"}:
- Field
isPremium→ Boolean - Field
tier→ String
Expression
Write a condition that evaluates the API response. IrisAgent uses this expression to determine the trigger result. Access response fields usingresponse.fieldName:
Boolean, String, Integer, or Float).
Prerequisite (optional): run another API first
Some workflows need to call one API and then feed its result into a second call. A common case: HubSpot requires a contact’s record ID to link it to a ticket, so you have to create or look up the contact before creating the ticket. The Prerequisite section, at the bottom of the form, lets this Custom API run another Custom API first and reuse its result:
At call time IrisAgent runs the prerequisite first, evaluates its Expression, and injects the value under the name you chose. You then reference it like any other template variable, for example
{{contactId}}.
The injected value comes from the prerequisite API’s own Expression, so make sure that API’s Expression returns the single value you want (for example, the new record’s
id). The prerequisite dropdown never lists the API you are currently editing, so an API cannot depend on itself.- Click Create API to save.
Step 4: Test your API
After saving, reopen the API in edit mode to use the built-in test tool.- Click the edit icon next to your API in the table.
- Expand the Test API section.
- Enter sample values for each template variable (built-in and custom).
- Click Run Test.
- The expression result
- The execution time in milliseconds
- Any error message if the call failed
Example: chain two APIs to link a HubSpot Contact to a ticket
When a chatbot handoff creates a HubSpot ticket, HubSpot will not automatically link the person to it just because their email appears in the ticket text. To show up under the ticket’s Contacts panel, the ticket has to be created with an association to the contact’s record ID. That takes two calls: first resolve the contact, then create the ticket linked to it. Use a Prerequisite to chain them.API 1: Upsert HubSpot contact
This creates the contact if it is new, or returns the existing one, and outputs its ID.
Request body:
{{email}} and {{name}} are custom variables IrisAgent collects from the customer during the conversation.
API 2: Create HubSpot ticket
This creates the ticket and links it to the contact from API 1.
Request body (the
associations block references {{contactId}} from the prerequisite; association type ID 16 is HubSpot’s Ticket-to-Contact type):
{{contactId}}, and creates the ticket already linked to that contact.
Using Custom APIs in Workflows
[Recommended] As a live data source in AI FAQ workflows for chats and cases
See Workflows — Using Custom APIs in plain-English workflows for how to wire a Custom API into an AI-driven multi-turn conversation.As a trigger condition (drag-and-drop builder) for cases
- Go to Automations → Triggers on the IrisAgent dashboard.
- Click + Create New Trigger and add a Condition.
- In the condition picker, scroll to the API section — your Custom APIs appear listed as
API: <name>. - Select your API. Depending on its return type, you will be prompted to enter a comparison value (e.g.
truefor a Boolean, or a string to match). - Save and activate the trigger.
Feel free to email us if you encounter any issues or need help setting up your Custom API integration.