Skip to main content
A Custom API connects IrisAgent to any HTTP endpoint (internal systems, third-party services, data warehouses). You can use it:
  • In AI FAQ workflows: IrisAgent collects the required fields from the customer, calls your API, and explains the response in plain language.
  • As a trigger condition: for example, “only run this automation if the customer is on the Premium plan.”
To create a Zendesk ticket from a procedure, use the built-in Create Zendesk ticket action. You only need a Custom API for a different payload, such as mapping values to Zendesk custom ticket fields.

Step 1: Open the Custom APIs configuration

  1. In the IrisAgent dashboard, go to Data Sources → APIs.
  2. On the Custom APIs card, click Configure.
A side panel opens with two tabs: APIs and Credentials.

Step 2: Add a credential (optional)

Skip this if your API needs no authentication or uses a token in the URL.
  1. Open the Credentials tab and click Add Credential.
  2. Fill in:
  3. Click Create Credential.
You can also create a credential from inside the API form (Create New Credential, then Create & Select).
You cannot view a credential value after saving. Keep a copy somewhere safe.

Step 3: Create a Custom API

On the APIs tab, click Add API and fill in the Create Custom API form.

Template variables

Use {{variableName}} in the URL, headers, or body. IrisAgent fills them in before each call. Built-in variables: {{ticketId}}, {{priority}}, {{status}}, {{subject}}, {{accountId}} (the account or company ID on the ticket).
Any other name is a custom variable. In FAQ workflows, IrisAgent collects it from the customer before calling the API:

Response schema

Click Add Field for each response value you want to use. Set the Field name (the JSON key, e.g. isPremium) and Field type (String, Boolean, Integer, or Float). For {"isPremium": true, "tier": "enterprise"}, add isPremium (Boolean) and tier (String).

Expression

The expression evaluates the response. Reference fields as response.fieldName:
Set Return Type to what the expression returns (String, Boolean, Integer, or Float).

Prerequisite (optional): run another API first

Use this to feed one API’s result into another call. For example, HubSpot needs a contact’s record ID before you can link it to a ticket. The injected value is the prerequisite API’s Expression result, so make that expression return the single value you need (for example, the new record’s id). An API cannot be its own prerequisite. Click Create API to save.

Step 4: Test your API

Testing is available after you save.
  1. Click the edit icon next to your API.
  2. In the Test API Configuration section, enter sample values for each variable.
  3. Click Run Test.
You see the expression result, the execution time, and any error. Adjust the URL, schema, or expression until the result is correct. HubSpot only shows a contact on a ticket if the ticket is created with an association to the contact’s record ID. Chain two APIs to do this.

API 1: Upsert HubSpot contact

Creates the contact or returns the existing one, and outputs its ID.
{{email}} and {{name}} are custom variables collected from the customer.

API 2: Create HubSpot ticket

Association type ID 16 is HubSpot’s Ticket-to-Contact type:
On handoff, IrisAgent upserts the contact, stores its ID as {{contactId}}, and creates the ticket linked to it.

Use Custom APIs in workflows

See Using Custom APIs in plain-English workflows.

As a case trigger condition

  1. Go to Automate → Case Triggers.
  2. Click Create New Trigger and add a condition.
  3. In the condition picker, select your API. It is listed as API: <name>.
  4. Enter the value to compare against (for example, true for a Boolean).
  5. Save the trigger.
When a ticket arrives, IrisAgent calls your API with the ticket’s context and runs the trigger actions only if the condition matches. You can combine API conditions with other conditions. The response schema fields are also available in the Auto-respond to customer and Create Private Note actions. Insert them with the field picker. Need help? Email us.