Functions
Let the bot do things, not just say things. It calls your API mid-conversation and answers with live data.
Available on the Scale plan and higher.
What a function is
A function is one of your HTTP endpoints, described in plain language. When a customer asks something that needs live data — “where's my order ORD-12345?” — the bot decides to call it, extracts the parameters from the conversation, hits your API, and answers with what it gets back.
Setting one up
Go to API & Agents → Functions and provide:
- Name —
get_order_status. Lowercase, underscores. - When should the bot use it? — the description the model reads to decide. Be specific; this is the most important field.
- Method & URL —
GETsends parameters as a query string,POSTas a JSON body. HTTPS only. - Parameters — one per line,
name: what it means. The description tells the model what to extract.
Name: get_order_status
Description: Look up the current shipping status and expected delivery
date of a customer's order using their order number
Method: GET
URL: https://api.yourshop.com/orders/status
Parameters: order_id: the customer's order number, e.g. ORD-12345What your endpoint receives
For the example above, the bot calls:
GET https://api.yourshop.com/orders/status?order_id=ORD-12345
Return JSON. The bot reads it and phrases the answer for the customer, in their language:
{"order_id":"ORD-12345","status":"shipped",
"courier":"BlueDart","expected_delivery":"July 13, 2026"}
→ "Your order ORD-12345 has shipped with BlueDart and should
arrive by July 13, 2026."Writing good descriptions
The model only calls a function when the description convinces it this is the right tool. Vague descriptions cause missed calls and wrong calls.
- ✅ “Check whether a specific product size is currently in stock at a given store branch”
- ❌ “Product API”
Security
- Endpoints must be HTTPS and publicly reachable. Private and internal addresses are rejected.
- Pass auth with custom headers — they're stored with the function and never exposed to the visitor.
- Responses are truncated to 4,000 characters and time out after 10 seconds.
- The bot never shows the customer your raw response or your endpoint.
- Treat every parameter as untrusted input — a customer could ask about someone else's order number. Authorize on your side.
Limits
Up to 10 functions per account. If the bot gets confused it stops after three tool rounds and tells the customer it couldn't complete the lookup, rather than looping.
Related
Functions let the bot pull from your systems. To push events out to your systems, see Webhooks.
Something unclear? Tell us.
Start free trial