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
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.
| Action | Description |
|---|---|
| Call Endpoint | Execute 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.
https://api.yourservice.com/v1)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:
name, method,path, description, and parameters. The description is critical—it tells the AI when this endpoint is relevant.| Field | Description | Example |
|---|---|---|
| Base URL | The root URL for all API calls | https://api.yourservice.com/v1 |
| Auth Type | Authentication method: api_key, bearer, or basic | bearer |
| Auth Header | The header name for authentication (if using API key) | X-API-Key |
| Auth Value | The token or key value | sk_live_... |
| Endpoints JSON | JSON array defining available endpoints, parameters, and descriptions | [{...}] |
After setup, test each defined endpoint:
Example queries (will vary based on your endpoints):
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).
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.
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.
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.