Skip to content
EN
Open app

For AI assistants: this page as plain markdown is at https://docs.voicelogica.ai/raw/integrations/custom-api.md, and https://docs.voicelogica.ai/llms.txt lists the docs by topic, one file each, small enough to read whole. Read those rather than this HTML page.

Custom API

3 min read
Copy as Markdown
View as MarkdownOpen the raw .md file.md

Integrations - Catalogue - Custom API - Connect links any REST API with a base URL and one auth header for the agent to call mid-conversation.

Connect Custom API base URL and auth header
custom-api-connectExpand
API base URLREQUIRED
Root URL, e.g. https://api.example.com. No trailing slash.
Auth header nameREQUIRED
e.g. Authorization or X-Api-Key.
Auth header valueREQUIRED
The secret sent on every request. It is sent exactly as you type it, so include any scheme prefix yourself, for example Bearer abc123 for a bearer token, or just the raw key. Stored encrypted.
Label
Friendly name, e.g. My API.
  1. Catalogue - search Custom API - Connect.
  2. Fill base URL + auth header name/value + label - Connect (cancel if you are only exploring).
  3. Enable the Custom API tool on the agent and map the operations your contract exposes.
  4. Save and prove on a test call.

Custom API is not a free-form “call any URL” tool. It runs a fixed set of operations, and your API must expose the matching endpoint for each one you turn on. Pick the operations under the Custom API tool on the agent, the same way as any other integration.

OperationWhat happens on the callEndpoint your API must expose
Identify callerLooks a customer up by phone, VAT (ΑΦΜ) or your own customer id, and reads back their name, email and status. On by default, it runs on connect against the number the caller is calling from, so the agent knows who is calling before it speaks.GET /customers
Check availabilityChecks live stock for one item id, optionally for a single warehouse, and reads back quantity, lead time and restock date.GET /items/{id}/availability
List customer ordersLists a customer’s orders by customer id or VAT, optionally narrowed by a date range or status.GET /orders
Get one orderReads a single order by its id: status, line items (ordered, shipped, pending) and tracking.GET /orders/{id}
Create an orderPlaces an order for an identified customer from a list of items, each by item id or barcode.POST /orders

If you allow Create order, set Max order value and Max order lines. Orders above either limit are refused before they reach your API.

Why do my Custom API calls fail right after I connect it?

Remove any trailing slash from the API base URL. Also confirm that the Auth header name matches what your API expects, for example Authorization or X-Api-Key.