API & Webhooks
The API & Webhooks tool is the single way to connect an agent to anything that speaks HTTP — your own backend, a CRM, or an automation platform. It has three modes; pick the one that matches what the agent needs to do.API Endpoints
Define endpoints (or import an OpenAPI spec). Each becomes a function the agent can call by name —
get_doctors, book_appointment. Use when the agent must read or write data in your system.Webhook
Fire-and-forget: POST conversation data to a Zapier / Make.com / n8n / custom URL. The agent does not read the response. Use to trigger an automation.
Free-form Request
The agent composes its own GET/POST requests under a base URL. Use only when you cannot define the endpoints up front.
This tool replaces the older separate Webhook, REST API, Custom API, Make.com, and n8n tiles. Agents saved with those still work — they load as the matching mode.
Mode 1 — API Endpoints (recommended)
The agent gets one named, typed function per endpoint, so a voice or chat agent in any language can callget_slot_availability(doctor_id, date) directly instead of constructing raw HTTP.
Set the base URL and auth
| Field | What it is |
|---|---|
| API Name | Friendly name shown to the agent, e.g. “Hospital Booking API”. |
| Base URL | Public HTTPS root, e.g. https://api.yourhospital.com. localhost, private IPs, and plain HTTP are blocked for security. |
| Auth Type | API Key Header (e.g. X-API-Key: <key>), Bearer Token (Authorization: Bearer <key>), Basic Auth, or none. |
| Default Headers | Optional JSON object sent on every request. |
Define endpoints
Each endpoint needs:- Function name — what the agent calls:
get_doctors,create_appointment. - Method + Path —
GET /api/doctors,POST /api/appointments. Use{braces}for path variables:/api/slot/{doctor_id}/availability. - Description — tells the agent when to use it: “Get available appointment slots for a doctor on a date.”
- Parameters — name, location (
path/query/body), type, required flag, and a description. Good parameter descriptions (“Date in YYYY-MM-DD format”) stop the agent guessing wrong formats.
| Function | Method & path | Parameters |
|---|---|---|
get_doctors | GET /api/doctors | limit (query, optional) |
get_slot_availability | GET /api/slot/{doctor_id}/availability | doctor_id (path), date (query) |
create_appointment | POST /api/appointments | patient_id, doctor_id, slot_id (body) |
Import from OpenAPI
Click Import OpenAPI, paste your OpenAPI 3.x or Swagger 2.0 JSON, and the endpoints are generated automatically — operation IDs become function names, summaries become descriptions, and path/query/body parameters are mapped with their types. Edit anything after import.Test the connection
Click Test Connection. The platform probes your API with the configured auth and tells you exactly what happened — including a specific message when the URL is reachable but the key is rejected (HTTP 401/403), so auth problems surface before your first live call.Tell the agent when to act
Mode 2 — Webhook
Fires a single POST to one URL when the agent decides something noteworthy happened (lead captured, appointment booked, ticket raised). The platform receiving it — Zapier, Make.com, n8n, or your own endpoint — does the rest.- In your automation platform, create a trigger that starts with an incoming/custom webhook and copy its URL.
- Add the API & Webhooks tool, choose Webhook mode, and paste the URL.
- (Optional) Set a secret — sent as
X-Webhook-Secret— or custom headers (e.g.X-API-Key) for endpoints that need auth. - Tell the agent when to fire it, e.g. “After booking, send a
appointment_bookedevent with the caller’s name and slot.”
Mode 3 — Free-form Request
The agent composes its own requests under a base URL using a singlemake_request function. This is the most flexible but least guided option — prefer API Endpoints mode whenever you can list the endpoints, because named functions are far more reliable for the model (especially in voice).
Limits and behavior
- API Endpoints: up to 25 endpoints per tool, 30 parameters each.
- Responses return to the agent as
{status_code, data}JSON, truncated at ~4,000 characters — preferlimit/pagination parameters for large collections. - Timeouts are configurable (1–120 s, default 15 s). Keep voice agents under ~10 s.
- All requests are SSRF-guarded: URLs are validated and re-resolved against private/reserved IP ranges.
Troubleshooting
| Symptom | Likely cause |
|---|---|
| ”authentication failed (HTTP 401/403)“ | Wrong Auth Type or header name — check whether your API expects X-API-Key or Authorization: Bearer. |
| ”Only HTTPS URLs are allowed” | Base/target URL uses http:// or points to localhost / a private IP. |
| Agent says it acted but nothing happened | A required parameter was missing — the function returns an error the agent may paraphrase. Check the call’s tool traces. |
| Responses cut off | Body exceeded the ~4,000-character budget. Add pagination/limit parameters. |
Using HTTP inside flows and workflows
- Flow Editor: drop an HTTP Request node onto the canvas to call an API at a specific step and pass the response to the next node.
- Voice Workflows (state machines): an API Request step calls an API mid-call and maps response fields into workflow variables for later branches.

