Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Contact Us
  • Give Feedback
  • Home
  • Actions
  • Custom & Advanced

Creating a Custom API Action

Connect your agent to any external system - if it has an API, your agent can use it.

Written by Outlearn Documentation

Updated at April 24th, 2026

Contact Us

If you still have questions or prefer to get help directly from an agent, please submit a request.
We’ll get back to you as soon as possible.

Please fill out the contact form below and we will reply as soon as possible.

  • Getting Started
  • Your Agents
  • Knowledge Sources
    Understanding Sources Managing Sources Knowledge Base Integrations Cloud Storage Ticketing Systems Team Chats Manual Imports
  • Actions
    Understanding Actions Communication Actions Calendar & Scheduling CRM & Sales Custom & Advanced
  • Handoffs
  • Deploying Your Agent
    How Deployment Works Customizing Your Chat Widget
  • Analytics
  • Plans & Billing
  • Terms & Policies
+ More

Table of Contents

What Is a Custom API Action? How to Create a Custom API Action Action (API Configuration) API Endpoint Collect Info First Headers & Body Trigger Response Handling Response Format Custom Response Instructions Settings Best Practices

A customer asks your agent to check the status of their installation request. Your team manages those in an internal system your engineering team built three years ago. There is no Outlearn integration for it. There never will be - it is custom, it is yours, and nobody else uses it. Without a way to reach it, your agent has to tell the customer to contact support instead of just answering the question.

Custom API Actions are built for exactly this situation. If your internal system has an API endpoint - and most do - your agent can call it during a conversation. Look up the installation status, retrieve the account details, trigger the process. Your agent gains access to any system your business runs on, not just the ones that happen to have pre-built integrations.

In this article, you'll learn:

  • What a Custom API Action is and when to use it
  • How to configure the API connection
  • How to set the trigger and response handling
  • How to use "Collect Info First" for actions that need user input

What Is a Custom API Action?

A Custom API Action lets your agent make an HTTP request to any URL during a conversation. When the trigger condition is met, your agent calls the API, receives the response, and presents the result to the user.

Use a Custom API Action when:

  • You want to look up real-time data from your own systems (e.g., order status, account balance, inventory)
  • You need to trigger a process in an internal tool (e.g., create a record, update a status)
  • The platform you want to connect doesn't have a built-in Outlearn integration

How to Create a Custom API Action

  1. Go to the Actions tab.
  2. Click + Create Action.
  3. In the Create an Action modal, scroll to the Advanced section and click Add Custom Action.

You'll land on the New Action configuration page. Fill in each section:

Action (API Configuration)

API Endpoint

  • Select the HTTP method: GET, POST, PUT, PATCH, or DELETE.
  • Enter the full URL of the API endpoint you want to call.

Collect Info First

Toggle this on if your agent needs to gather information from the user before calling the API.

For example, if your API requires an order number to look up a shipment, toggling this on tells the agent to ask the user for their order number before making the call.

This is one of the most useful settings for API actions - without it, your agent might call the API without the data it needs and return an error.

Headers & Body

Expand this section to add:

  • Headers: Any required HTTP headers (e.g., Authorization tokens, Content-Type).
  • Body: The request body for POST or PUT requests, in JSON format.

Trigger

Write plain-language instructions for when the agent should run this action.

"Use when the user asks about their order status, shipping, or delivery timeline and has provided their order number."

Be specific. For more guidance on writing triggers, see How Actions Are Triggered During a Conversation.

Response Handling

Response Format

Choose how the API result is presented to the user:

  • Text: The agent writes a natural-language response based on the API output. Best for most cases.
  • Card: Displays the result as a structured card. Good for data like order details or account summaries.
  • Link: Shows the result as a clickable link.

Custom Response Instructions

Toggle this on to give your agent specific instructions for how to interpret and present the API response.

"Tell the user their order is on the way and include the estimated delivery date. If the order hasn't shipped yet, let them know it's being prepared. If the API returns an error, apologize and offer to connect them with the support team."

If left off, your agent will decide how to present the result on its own.

Settings

  • Action Name: Give the action a clear, descriptive name (e.g., "Look up order status").
  • Available Channels: Choose whether this action runs on Chat, Email, or both.
  • Trigger Limitation: Set the maximum number of times this action can run per chat session. Recommended: set a limit for any action that calls a paid API or triggers an irreversible process.

Click Create Action when done.

Best Practices

  • Always use Collect Info First when your API needs specific user input - it prevents your agent from making incomplete API calls.
  • Store API keys and tokens in the Headers section using an Authorization header - never hardcode sensitive credentials in the endpoint URL.
  • Use Custom Response Instructions to handle error states gracefully. APIs fail. Tell your agent what to say when they do.
  • Start with a GET request and a test endpoint before connecting production systems - confirm the action triggers correctly before pointing it at live data.
  • Set a Trigger Limitation for any action that could have a cost or side effect if it runs multiple times.
api integration

Was this article helpful?

Yes
No
Give feedback about this article

Related Articles

  • What Are Actions and What Can They Do?
  • Actions vs. Knowledge Sources: What's the Difference?
  • How Actions Are Triggered During a Conversation

Copyright 2026 – Outlearn.

Knowledge Base Software powered by Helpjuice

Expand