AI Workflows

Custom API Calls in Super Agents

Integrate external APIs directly into your Super Agents to access third-party services, custom databases, and real-time data sources during AI conversations.
What You'll Learn

This article explains how to configure Custom API Calls as tools within Super Agents, enabling your AI assistants to interact with external systems and retrieve dynamic information during conversations.

You'll learn how to set up authentication, configure request parameters, and handle responses to create powerful integrations that extend your Super Agent's capabilities beyond standard features.

1

What are Custom API Calls in Super Agents?

Custom API Calls enable your Super Agents to interact with external services and data sources during conversations. When configured as a tool, your AI assistant can dynamically invoke third-party APIs to retrieve information, validate data, or trigger actions in external systems based on conversation context.

This feature extends Super Agent functionality beyond LeadConnector's native capabilities, allowing you to integrate with weather services, inventory systems, payment processors, or any REST API that your business requires. The AI determines when to use the API call based on your configuration and the conversation flow.

Custom API Calls support multiple authentication methods, dynamic parameter injection from conversation variables, and flexible response handling to ensure seamless integration with your existing technology stack.

2

Key Benefits

Custom API Calls transform your Super Agents into intelligent integrators that connect your AI workflows with external systems and data sources.

Real-Time Data Access — Retrieve current information from external databases, APIs, and services during conversations without manual intervention.
Dynamic Personalization — Customize responses based on data from CRM systems, inventory databases, or user profiles stored in external platforms.
Automated Actions — Trigger operations in external systems such as booking appointments, processing payments, or updating records through API calls.
Flexible Authentication — Support for multiple authentication methods including API keys, Bearer tokens, and custom headers ensures compatibility with various services.
Context-Aware Integration — Use conversation variables and custom values to pass relevant information to APIs, creating intelligent workflows that adapt to user input.
3

Configuration Components

Each Custom API Call tool consists of several components that work together to define how your Super Agent communicates with external services.

Component 1
Tool Name

A descriptive identifier for the API call that helps you organize multiple tools. This name appears in your tool list and should clearly indicate the API's purpose.

Component 2
Tool Description

An explanation that informs the AI when and how to use this tool. Write clear, specific descriptions that define the API's capabilities and when the Super Agent should invoke it during conversations.

Component 3
API Endpoint

The complete URL of the external API that your Super Agent will call. Include the protocol (https://) and the full path to the specific endpoint you want to access.

Component 4
HTTP Method

Select the request type (GET, POST, PUT, DELETE) based on your API's requirements. GET retrieves data, POST creates resources, PUT updates existing data, and DELETE removes resources.

Component 5
Authentication

Configure how your Super Agent authenticates with the external API. Options include API Key (added to headers), Bearer Token (for OAuth-style authentication), or Custom Headers (for unique authentication schemes). Enter your credentials securely in the provided fields.

Component 6
Parameters

Define the data your API call sends or receives. Add parameters by specifying their name, type (string, number, boolean), and source (conversation variable or custom value). Parameters can be required or optional based on your API's specifications.

Component 7
Response Handling

Specify how the Super Agent should process the API response. Map response fields to conversation variables or configure how the AI should interpret and use the returned data in subsequent conversation turns.

Best Practice
Write Detailed Tool Descriptions
Your tool description directly influences when and how the AI uses the API. Include specific trigger phrases, expected inputs, and the type of information the API returns to ensure accurate invocation.
4

How to Set Up a Custom API Call Tool

Follow these steps to add a Custom API Call to your Super Agent and configure it for use in conversations.


Step 1
Access Your Super Agent

Navigate to AI > Conversational AI > Super Agents in your LeadConnector account. Select the Super Agent you want to enhance with an API call tool, or create a new agent if needed.

Step 2
Add a New Tool

In the Super Agent configuration, locate the Tools section and click "Add Tool". Select "Custom API Call" from the available tool types.

Step 3
Configure Basic Information

Enter a Tool Name that identifies the API's purpose. In the Tool Description field, write a clear explanation of when the Super Agent should use this tool, what information it requires, and what data it returns. Be specific about trigger conditions and expected behavior.

Step 4
Set API Endpoint and Method

Enter the complete API endpoint URL in the API Endpoint field. Select the appropriate HTTP method from the dropdown menu based on whether you need to retrieve data (GET), send data (POST), update data (PUT), or delete data (DELETE).

Step 5
Configure Authentication

Choose your authentication method from the Authentication dropdown. For API Key authentication, enter your key and header name. For Bearer Token authentication, paste your token. For Custom Headers, add the required header name-value pairs as specified by your API documentation.

Step 6
Define Parameters

Click "Add Parameter" to define each piece of data your API needs. For each parameter, enter the parameter name, select its data type (string, number, or boolean), and choose whether to use a conversation variable or a custom value. Mark parameters as required if the API mandates them.

Tip

Use conversation variables to pass dynamic data from the ongoing conversation (like a user's name or appointment time) into your API calls. This creates personalized integrations that respond to user input.

Step 7
Configure Response Handling

In the Response Handling section, specify how the Super Agent should process the API response. Map response fields to conversation variables if you need to use the returned data in subsequent conversation turns or actions.

Step 8
Save and Enable the Tool

Click "Save" to add the Custom API Call tool to your Super Agent. Ensure the tool is enabled in your agent's tool list so it becomes available during conversations.

5

Testing and Validation

After configuring your Custom API Call tool, test it to ensure proper functionality before deploying your Super Agent in production conversations.

Use the Super Agent testing interface to initiate a conversation that should trigger your API call. Monitor the conversation flow to verify that the AI invokes the tool at the appropriate moment and processes the response correctly. Check your API logs to confirm that the request was received with the correct parameters and authentication.

Important

API call failures can interrupt conversation flow. Ensure your external API has proper error handling and that your Super Agent's tool description accounts for potential failure scenarios. Test with both successful and failed API responses to validate behavior.

Review the API response data in the conversation logs to confirm that the Super Agent receives and interprets the information correctly. Adjust your response handling configuration if the AI misinterprets or misuses the returned data.

Need Help?

If you encounter issues configuring Custom API Calls or need guidance on integrating specific services:

  • Navigate to AI > Conversational AI > Super Agents and review your tool configuration for accuracy
  • Check your external API documentation to verify endpoint URLs, authentication requirements, and parameter formats
  • Use the Super Agent testing interface to debug API call behavior in real-time
  • Review conversation logs to identify where API calls fail or produce unexpected results
  • Contact LeadConnector Support through the Help menu for assistance with complex integrations
6

Frequently Asked Questions

Q: Can I use multiple Custom API Calls in a single Super Agent?
Yes, you can add multiple Custom API Call tools to a single Super Agent. Each tool should have a distinct purpose and clear description so the AI knows which API to invoke based on conversation context. The Super Agent will automatically select the appropriate tool based on the conversation flow.
Q: How do conversation variables work with API parameters?
Conversation variables capture information from the ongoing conversation (such as user input, extracted data, or previous API responses) and pass it dynamically to your API call. When you configure a parameter to use a conversation variable, the Super Agent automatically substitutes the variable's current value when making the API request. This enables personalized, context-aware integrations.
Q: What happens if my API call fails or times out?
If an API call fails, the Super Agent will continue the conversation but may not have access to the expected data. You should design your tool descriptions and conversation flows to account for potential failures. Consider including fallback responses in your Super Agent configuration and ensure your external API has appropriate error handling and timeout settings.
Q: Are my API credentials stored securely?
Yes, LeadConnector encrypts and securely stores all authentication credentials you enter for Custom API Calls. Your API keys, Bearer tokens, and custom headers are protected with industry-standard security measures and are never exposed in conversation logs or user-facing interfaces.
Q: Can I modify an API call tool after it's in use?
Yes, you can edit any Custom API Call tool configuration at any time. Changes take effect immediately for new conversations. However, be cautious when modifying tools that are actively used in production Super Agents, as changes to parameters or endpoints could affect ongoing conversations or break existing workflows.
Q: How do I map API response data to conversation variables?
In the Response Handling section of your Custom API Call configuration, specify which fields from the API response should be stored as conversation variables. Enter the JSON path to the response field and assign it to a variable name. The Super Agent will then be able to reference this data in subsequent conversation turns or other tool invocations.
Q: Are there rate limits for Custom API Calls?
LeadConnector does not impose rate limits on Custom API Calls from Super Agents. However, your external API may have its own rate limits or usage restrictions. Monitor your API usage through your API provider's dashboard and ensure your integration respects their rate limit policies to avoid service interruptions.
Q: Can I test my API call without starting a full conversation?
Currently, Custom API Calls are tested through the Super Agent conversation interface. Initiate a test conversation that triggers the conditions described in your tool description, and the Super Agent will invoke the API call. Review the conversation logs to see the API request and response details. This allows you to validate your configuration in a realistic conversation context.