Chatspark
K
K

REST API Connector

For enterprise teams who need to connect their AI agent to internal APIs, legacy systems, or any service with a REST interface.

8 min read

Updated February 2026

Enterprise Only
The REST API Connector is available exclusively on the Enterprise plan. Contact sales to upgrade if you're on a different plan.

Overview

Not every system has a pre-built integration. Internal tools, industry-specific platforms, and custom backends all expose REST APIs, but connecting them to a chatbot traditionally requires engineering time and custom middleware.

The REST API Connector lets you point your AI agent at any REST endpoint and define how it should be called and how the response should be interpreted. No code required—just a base URL, authentication details, and a JSON definition of your endpoints.

When to Enable This

  • You have internal APIs (inventory, CRM, ERP) that don't have a pre-built ChatSpark integration
  • You want to connect to a third-party service that isn't in our integration library
  • Your team has built a custom backend and wants the AI agent to query it
  • You need to prototype an integration quickly before requesting a native connector

Available Actions

ActionDescription
Call EndpointExecute a configured API call with dynamic parameters extracted from the conversation

You can define multiple endpoints in a single configuration. Each endpoint becomes a distinct action the AI can invoke based on conversational context.

Prerequisites

  • A ChatSpark Enterprise plan
  • A REST API that returns JSON responses
  • API documentation for the endpoints you want to connect
  • Valid authentication credentials for the target API

Setup Instructions

Step 1: Gather Your API Details

  1. Identify the base URL for the API (e.g., https://api.yourservice.com/v1)
  2. Determine the authentication method: API key header, Bearer token, or Basic auth
  3. Document each endpoint: HTTP method, path, required parameters, and expected response shape

Step 2: Define Your Endpoints

Create a JSON array that describes each endpoint. Each entry should include the path, method, a natural-language description (so the AI knows when to use it), and parameter definitions:

Endpoint JSON Format
Each endpoint object should contain: name, method,path, description, and parameters. The description is critical—it tells the AI when this endpoint is relevant.

Step 3: Enable in ChatSpark

  1. In ChatSpark, go to AI Actions
  2. Find REST API Connector in the Library and click Enable
  3. Select the agent(s) that should have access
  4. Enter your base URL, auth type, and credentials
  5. Paste your endpoints JSON
  6. Click Save

Configuration Fields

FieldDescriptionExample
Base URLThe root URL for all API callshttps://api.yourservice.com/v1
Auth TypeAuthentication method: api_key, bearer, or basicbearer
Auth HeaderThe header name for authentication (if using API key)X-API-Key
Auth ValueThe token or key valuesk_live_...
Endpoints JSONJSON array defining available endpoints, parameters, and descriptions[{...}]

Testing Your Integration

After setup, test each defined endpoint:

  1. Use the Test button in the AI Actions settings to verify connectivity
  2. Open your AI agent and ask a question that should trigger each endpoint
  3. Verify the response data matches what the API returns directly

Example queries (will vary based on your endpoints):

  • “Look up order #12345 in our system”
  • “What's the current inventory for Widget Pro?”
  • “Find all active subscriptions for acme@example.com”

Troubleshooting

Connection refused or timeout

Verify the base URL is reachable from the internet. If the API is behind a firewall or VPN, you'll need to whitelist ChatSpark's IP addresses (available in your Enterprise settings).

Authentication errors

Double-check the auth type matches what the API expects. Common mistakes include using bearer when the API expects an X-API-Key header, or forgetting to include the “Bearer ” prefix in the token value.

AI calls the wrong endpoint

Improve the description field in your endpoints JSON. The AI uses these descriptions to decide which endpoint to call. More specific, distinct descriptions lead to better routing.

Unexpected response format

The connector expects JSON responses. If your API returns XML or plain text, you'll need a middleware layer to convert it to JSON first.

Need Help?
If you're having trouble configuring the REST API Connector, contact our support team and we'll walk you through the endpoint definition process.

Previous

QuickBooks

Next

Rippling