Skip to main content

Connect your AI Agent to open interfaces: HTTP Requests

With the "HTTP Requests" tool, your AI Agent calls open interfaces from other software mid-conversation. Let the agent dynamically access your CRM, inventory system, or booking system.

Written by Anouar Springer

The tool is available for all channels: Chat, Phone, and Email.

Don't confuse this with the HTTP Request in Automations. In Automations, the HTTP Request is a step in the flow that runs at a fixed point. This tool belongs to the AI Agent itself: it decides during the conversation whether and when to make the request, and continues working with the response.

Requirements: an AI Agent in Superchat and an API you want to call (URL, method, credentials if needed).


Adding the tool

  1. Open your AI Agent and switch to the Tools & Actions area on the left.

  2. Click Add Tool at the top right.

  3. Select the HTTP Requests card and click Add.

The tool editor opens with six tabs: General, Parameters, Request, Body, Credentials, and Test.


General: name and usage rule

  • Tool name: A short name describing what the tool does, e.g. "Check order status" or "Create appointment." The name appears in the list under Tools & Actions.

  • When should the agent use the tool? This description is the most important part of the tool. The AI Agent decides whether to make the request based on this text. Describe specifically in which situation it should use the tool, what it will find in the response, and how it should use it. Also mention when it should not use it.

Example: "Use this tool when the customer asks about the status of their order. The response contains the current status and expected delivery date, which you should tell the customer. Don't use this tool if the customer hasn't provided an order number."


Parameters: which values the agent provides

Parameters are the values that change from request to request, such as an order number or the contact's phone number. You define them here and then insert them via the { } button into the URL, query parameters, headers, or body.

Click Add and fill in for each parameter:

  • Name: The name you'll use later to insert the value.

  • Source: Where the value comes from.

    • AI Agent: The agent takes the value from the conversation, e.g. an order number the customer mentions.

    • Contact attribute: The value comes from the contact's existing data in Superchat, e.g. the customer number.

  • Type: Data type of the value, e.g. text.

  • Description: What the value is and where it comes from. For source "AI Agent," the description helps the agent pull the right value from the conversation.

  • Required: Whether the request absolutely needs the value.

The Usage column shows whether the parameter has already been inserted anywhere in the request. If it says "Not linked," the value isn't being sent anywhere yet.

Tip on "Required": Turn off "Required" for anything that comes from the conversation. If the value isn't available, the agent simply omits the field instead of blocking the request or unnecessarily asking the customer.


Request: method, URL, query parameters, and headers

  • Method & URL: Choose the HTTP method on the left (e.g. POST) and enter the URL of your API or webhook on the right.

  • Query parameters: Name-value pairs appended to the URL. Use Add to create more.

  • Headers: Name-value pairs for HTTP headers, e.g. Content-Type. Credentials don't belong here — use the Credentials tab instead.

  • Timeout: Seconds after which the request is cancelled (default: 30). On the phone, the caller is waiting during this time — keep the value as low as your API allows.

In all fields, you can insert a parameter via the { } button.


Body: content of the request

Choose what the request sends:

  • No body: The request sends no content. Suitable for simple queries.

  • JSON: Structured data, the standard for most APIs and webhooks.

  • Form data: Classic form fields.

  • Plain text: Free-form text content.

Here too, you insert parameters via { }, e.g. {"order_number": {{order_number}}}.


Credentials: authenticate your API securely

If your API needs an API key or a token, you store it here. Select existing credentials from the dropdown, or click Create new credentials. Once created, credentials are available again for other tools.

Credentials are stored securely. The AI Agent never sees or sets these values, so it can't accidentally reveal them in conversation either.


Test: run the request for real once

Before saving, check the request in the Test tab. Enter a sample value for each parameter and click "Send test request." The request genuinely goes to your API, so use test data.

The note "No parameters are used anywhere: this tool always calls the same request" means you've created parameters but haven't inserted them anywhere via { }, or that the tool works without any parameters at all. That's fine for a fixed query; once the agent should send values from the conversation, insert them into the URL, header, or body.

Then click Save. The tool appears in the list under Tools & Actions as HTTP Requests: <Name>.


Testing in conversation

Open the Test Environment on the right, choose the channel (Chat, Phone, or Email), and ask your AI Agent the question that should trigger the tool. This lets you see whether it uses the tool at the right moment and makes sensible use of the response.

If the agent doesn't use the tool, first sharpen the text under When should the agent use the tool? and also mention the tool in Task & Rules under "What should your agent do?", e.g.: "If a customer asks about their order, look up the order status via the tool and tell them the status and delivery date."

Important: Contact attributes aren't shared in the Test Environment. In the Test Environment, you can only work with parameters the agent pulls from the current conversation. Use a real conversation, triggered by yourself, to test with contact attributes.


Best practices

  • Phrase the usage rule positively and negatively. When to use it, when not to.

  • Keep responses lean. The agent reads your API's response. The clearer and shorter it is, the more precise its statement to the customer will be.

  • Keep the timeout as low as possible. The contact notices every second of waiting. On the phone we recommend 10 seconds at most, and 30 seconds in chat.

  • Test with test data. The test request and tests in the Test Environment genuinely call your API.

Did this answer your question?