API Actions

Connect your agent to a public HTTPS API so it can look up live data or take an action, such as checking a delivery or creating a ticket.

An API Action lets the agent call your API during a conversation, for example to check a parcel or look up a subscription.

Create an API Action

Name it and choose when it runs

Select Add Action → API Action. A card marked Incomplete appears until you save. Enter an API Action Name, then choose When to run:

  • AI decides when the conversation calls for it
  • Automatically before the agent's first reply
  • Automatically when visitor/session metadata matches, such as the visitor's country or channel

Say what to ask the visitor

Under What to ask the user first, add each value the agent must collect before calling, such as parcel_number, with its type and a short hint.

Set up the request

Under API Endpoint, choose the API request method and enter the API endpoint URL. In the URL, Headers, Query Params, or Body, select Add AI Data to insert a collected value or conversation data:

VariableValue
{{conversation_id}}Conversation ID
{{chatbot_id}}Agent ID
{{channel}}Channel
{{language}}Visitor language
{{country}}Visitor country
{{visitor_email}}Visitor email
{{visitor_name}}Visitor name

Choose an Auth type if your API needs one: a bearer token, basic credentials, or an API key header. Secrets are stored encrypted and never shown again.

Test and describe it

Select Test Response to send a real request. Write the Description for the AI: what the action does and when to use it. Under Save to memory, you can map response fields for later use. Then select Save changes.

Copy an existing card with its copy button to reuse an endpoint or authentication.

Rules for endpoints

  • The URL must be a public https:// address. Local and private network addresses are blocked.
  • If a call fails or times out, the agent is told it failed and answers without the result. A failed call is never retried on its own, so a request that creates something is never sent twice.

Troubleshooting

Test Response fails. Check the URL works from the internet, the auth details are right, and the API answers before the Request timeout (ms) you set.

The agent calls the action at the wrong time. Rewrite Description for the AI to say exactly when to call it, and when not to.

The agent asks for a value it already has. Add the value from Add AI Data instead of asking for it, for example {{visitor_email}}.