# Custom API (/docs/integrations/custom-api)

> Connect your agent to any external service using custom API integration.

















Custom API integration connects your agent to external services through
REST APIs, allowing it to fetch data or perform actions using third-party
services.

## Key benefits [#key-benefits]

* Access external data sources in real-time
* Connect to your own backend services
* Integrate with virtually any REST API endpoint
* Extend your agent's capabilities with custom functionality

## Setup option 1: from the main dashboard [#setup-option-1-from-the-main-dashboard]

<Steps>
  <Step>
    ### Open the integrations page [#open-the-integrations-page]

    Go to the Integrations page in your dashboard and select the **All
    Integrations** tab.

        <img alt="Connecting from dashboard" src="__img0" />
  </Step>

  <Step>
    ### Connect a Custom API [#connect-a-custom-api]

    Find the Custom API card and click **Connect**. Configure your API (see
    configuration details below) and test it in the **Test** tab.

        <img alt="Custom API config in dashboard" src="__img1" />
  </Step>

  <Step>
    ### Attach to your agent [#attach-to-your-agent]

    Go to your agent's edit page, open the **Integrations** tab, and attach
    the integration from the dropdown.
  </Step>
</Steps>

## Setup option 2: from agent configuration [#setup-option-2-from-agent-configuration]

<Steps>
  <Step>
    ### Open the agent's integrations tab [#open-the-agents-integrations-tab]

    Go to your agent's edit page and select the **Integrations** tab.
  </Step>

  <Step>
    ### Connect a Custom API [#connect-a-custom-api-1]

    Under **Connect New Integrations**, find Custom API and click
    **Connect**. Configure and test your API. The integration will
    automatically attach to your agent.
  </Step>
</Steps>

## Setup option 3: from the chat interface [#setup-option-3-from-the-chat-interface]

<Steps>
  <Step>
    ### Ask in chat [#ask-in-chat]

    Use natural language like "Connect my CRM api" or "Connect my Airtable
    api". A connection widget will automatically appear.
  </Step>

  <Step>
    ### Add the integration [#add-the-integration]

    Click **Add integration** to navigate to the integration tab. Under
    **Connect New Integrations**, find Custom API Integration and click
    **Connect**. Configure your integration.
  </Step>
</Steps>

## Configuration guide: basic settings [#configuration-guide-basic-settings]

* **Integration Name**: choose a descriptive name (for example, "Weather API")
* **Description**: explain the API's purpose and usage. This is important for LLM tool calling.
* **URL**: full endpoint URL (for example, `https://api.example.com/data`)
* **Method**: select HTTP method (GET, POST, PUT, DELETE)

## Configuration guide: headers [#configuration-guide-headers]

* Authorization tokens
* `Content-Type` specifications
* API keys
* Custom headers

## Configuration guide: parameters [#configuration-guide-parameters]

Specify both query parameters (GET) and body parameters (POST or PUT).

* **Name**: parameter identifier
* **Description**: purpose of this parameter
* **Required**: toggle between optional and required
* **Data Type**: select from dropdown
* **AI Generated**: toggle whether the AI should dynamically generate values

<img alt="Adding query or body parameters" src="__img2" />

## Testing your integration [#testing-your-integration]

<Steps>
  <Step>
    ### Open the test tab [#open-the-test-tab]

    Navigate to the **Test** tab.
  </Step>

  <Step>
    ### Run a test [#run-a-test]

    Enter test values for all parameters and click **Test API** to verify the
    connection.

        <img alt="Running a test before saving integration" src="__img3" />
  </Step>

  <Step>
    ### Save the integration [#save-the-integration]

    After successful testing, click **Save Integration**.
  </Step>
</Steps>

## Using with your agent [#using-with-your-agent]

* Once connected, your agent will automatically use this API when appropriate
* Usage is determined based on the API description you provide

## Example: Airtable [#example-airtable]

Example of using Airtable with custom API integration.

<img alt="Custom API Airtable integration sample" src="__img4" />

## Example: Supabase user authentication [#example-supabase-user-authentication]

Walk through creating a complete Supabase authentication integration step
by step.

<Steps>
  <Step>
    ### Add integration name and description [#add-integration-name-and-description]

    Make sure descriptions are clear and concise. The AI uses them to
    understand the integration and decide when to call it.

        <img alt="Supabase custom API integration setup" src="__img5" />
  </Step>

  <Step>
    ### Configure URL, method, and parameters [#configure-url-method-and-parameters]

    Set the API URL and HTTP method, then add the query parameters needed
    for the request. Enable **AI Generated** on the query parameters so the
    agent can derive the values from the conversation.
  </Step>

  <Step>
    ### Test and save [#test-and-save]

    Click next to move to the test step, run a sample request, and save the
    integration once the response is correct.

        <img alt="Supabase custom API testing" src="__img6" />
  </Step>
</Steps>

## Other example use cases [#other-example-use-cases]

* **CRM integration**: retrieve customer data from Salesforce or HubSpot
* **Inventory management**: check product availability in real time
* **User verification**: authenticate users against internal databases
* **Weather data**: fetch current weather for location-based services
* **Booking systems**: check availability and make reservations

## Pro tips [#pro-tips]

* Provide detailed descriptions for AI-generated parameters
* Use specific examples in your descriptions
* Test thoroughly before deploying to production
