User GuidesRetrieve & Chat
External API Tools
Connect your own REST API as an approval-gated tool the assistant can call during chats and automations
External API Tools
Overview
External API tools let the assistant call an HTTP endpoint you control — an internal service, a partner API or a webhook — as part of a conversation. Each tool describes one request: method, URL, headers, parameters and body. The assistant can use it after you approve the call, and the endpoint's response becomes part of the answer.
Prerequisites
- Organization admin access to define tools under Organization → API Tools (
/org/<slug>/api-tools). - A reachable HTTPS endpoint. Private networks require the deployment to have network access to that host.
- Credentials for the endpoint, stored as headers or secrets in the tool definition rather than typed into prompts.
Step-by-step
- Open Organization → API Tools and create a tool.
- Give it a name and description that tell the assistant when to use it, for example
Get shipment status— "Returns current status for a tracking number". - Define the request: method, base URL, headers, and parameters with types and descriptions.
- Store authentication in the tool's headers (for example an
Authorizationheader) so it is never exposed in chat. - Test the tool from the editor with sample parameters.
- Enable the tool for the workspaces that should see it.
- In chat, ask for the outcome; the assistant selects the tool and shows an approval card with the resolved request before sending it.
Example
Create a tool named Lookup Permit Status:
- Method
GET - URL
https://api.example.go.id/permits/{permit_id} - Header
Authorization: Bearer <token>(stored in the tool) - Parameter
permit_id(string, required)
Then ask: Check the status of permit A-2024-118 and summarise the notes. Approve the call, and the assistant answers from the API response.
Expected result
- The approval card shows the method, URL and parameters that will be sent.
- After approval, the assistant's answer includes the API response or a summary of it.
- Calls appear in the audit log with the tool name, user and timestamp.
- Failed calls return an error message in chat without exposing stored headers.
Limits and troubleshooting
- Tool calls are approval-gated unless policy allows automatic execution. Deny a call to stop it without side effects.
- The endpoint must be reachable from the backend, not from the user's browser; localhost and metadata addresses are blocked by the egress guard.
- Store credentials in the tool definition. Never paste tokens into chat: chat content is stored in conversation history.
- Only JSON and text responses can be summarised reliably; binary payloads should be fetched by another system.
- If the assistant never selects the tool, improve its description with the exact phrases users say.