Create a custom API action
Let the assistant call your own service during the conversation, to read stock levels or an order status, or to book an appointment.
- Plans
- All plans
- Roles
- Owner, Admin
- In the admin
- Chatbot › Actions › Custom API actions
An API action lets the assistant call your own service during the conversation: check stock, give an order status, offer time slots, create an appointment. You describe the call once (URL, parameters, authentication, response fields) and explain when to use it. The assistant decides on its own when to call it, and Botello checks every call server-side.
Connecting an ERP, a booking system, an internal tool or a public API (Cal.com, Calendly) without any development on Botello’s side. For an action that changes data (booking, ticket, cancellation), the visitor always confirms before the call.
Before you start
- API actions are enabled by the Botello team for your workspace. If the Custom API actions card does not appear, write to support@botello.ch.
- You are an Owner or Admin of the workspace.
- Your assistant answers with the new agent. If not, a warning banner says so at the top of the window: the actions exist but are never called. Ask the Botello team to switch you over.
- Your API is reachable over HTTPS, on a public address, and answers in JSON in under 10 seconds.
- To try it without your own API, create the sandbox: it adds two ready-to-use demo actions.
Create an action
Start from a template or from scratch
Under Ready-made templates, choose a template (see Templates), or click Create an action to start from scratch. If you have a sandbox, the Demo actions (sandbox) are offered too.
Describe the action
Fill in Display name, Technical name and above all When to use it (for the AI): this is the text the assistant reads to decide whether to call the action.
Describe the call
Choose the Method and enter the URL with its parameters in double curly braces, for example https://api.exemple.ch/orders/{{order_number}}. Add the Authentication, the Headers and, for POST, PUT or PATCH, the JSON body.
Declare the parameters
For each value in curly braces, add a parameter and choose who provides it: the assistant, the visitor or Botello. See Parameters and access.
Choose the response fields
Under Response fields passed to the AI, add at least one path, for example order.status. The assistant reads only these fields. Paste a sample response into Preview on a sample response and click See what the assistant will read to check, without any network call.
Save and test
Click Save, then Test on the action’s row. Enter sample values and click Run test. See Test an action.
Settings
In form order:
| Setting | What it does | Tip |
|---|---|---|
| Display name | The name you see in the list (120 characters at most). | “Order status” |
| Technical name | The action’s identifier for the AI. Lowercase letters, digits and _, 2 to 40 characters, starting with a letter. Unique within the chatbot. | order_status, check_stock |
| When to use it (for the AI) | What the action does and when to call it (10 to 1000 characters). | One sentence on what it does, one on when to use it. See Examples. |
| Method | GET, POST, PUT, PATCH or DELETE. | GET to read, the others to write. |
| URL | The address called. https:// is required. Parameters are inserted with {{name}}, never in the domain. | Values are URL-encoded automatically. |
| Authentication | How Botello identifies itself to your API. | See Authentication. |
| Headers | Up to 10 headers. Tick Secret for a sensitive value (encrypted, never shown again). A non-secret header can contain {{name}}. | Host, Cookie, Content-Length, Connection, Transfer-Encoding and X-Botello-… are reserved. |
| JSON body | The body sent, for POST, PUT and PATCH only. Valid JSON, 10,000 characters at most. | "{{quantite}}" alone in a string keeps the parameter’s type (number, yes/no). |
| Parameters the AI fills in | Up to 10 parameters: name, type, description, required, source. | See Parameters and access. |
| Response fields passed to the AI | Up to 15 paths in the JSON response. At least one. | Only select what the assistant needs. |
| Max response length | What the assistant reads is cut beyond this (100 to 8000 characters, 2000 by default). | 1000 to 2000 is almost always enough. |
| Timeout (ms) | How long to wait for the response (1000 to 10,000 ms, 8000 by default). | Beyond that, the call fails with “No answer in time”. |
| Max calls per minute | Call limit for this action, across the whole chatbot (1 to 120, 20 by default). | Protects your API against a spike. |
| Ask the customer to confirm | The assistant describes the action and only runs it after the customer’s “yes”, in their next message. On by default for any method other than GET. | Keep it for any action that writes to your system. |
| Verified visitors only | The action is only offered to customers signed in on your site or verified by the channel (WhatsApp). | Required as soon as it touches personal data. See Verified visitors. |
| Action active | Toggle in the list: an inactive action is never offered to the assistant. | Turn it off while your API is under maintenance. |
A chatbot can have 20 actions at most.
Templates
The template names come from Botello’s server and are shown in French in every admin language.
| Template | What it does | What to fill in |
|---|---|---|
| Cal.com — lien de réservation (booking link) | Lists your event types with their booking link. | Your Cal.com API key in Bearer token, and your Cal.com username instead of REPLACE_USERNAME (twice). |
| Cal.com — créneaux disponibles (available slots) | Gives the free slots between two dates. | Your Cal.com API key, and the event type ID instead of REPLACE_EVENT_TYPE_ID. |
| Calendly — lien de réservation (booking link) | Lists your Calendly event types with their link. | Your Calendly personal access token, and your user URI instead of REPLACE_WITH_YOUR_USER_URI. |
| Démo — statut de commande (bac à sable) (order status demo) | Reads a fake order in your sandbox. | Nothing: save, then test. |
| Démo — prise de rendez-vous (bac à sable) (appointment booking demo) | Creates a fake appointment, with confirmation. | Nothing. |
Templates are ordinary actions, fully editable once added. You replace the REPLACE_… values once. The {{…}} values are filled in on every call.
What happens during a conversation
- The assistant sees the list of active actions this visitor is allowed to use. An action marked Verified visitors only is not even offered to an unverified visitor.
- When the visitor’s question matches When to use it (for the AI), the assistant calls the action with the values it has.
- Botello checks the call: values the visitor must have written, values provided by the server, call limits.
- Action that writes: on the first call, nothing is sent. The assistant describes what it is about to do and asks for confirmation. The call only goes out on the next message, after the visitor’s “yes”, with exactly the same values, within 30 minutes. A single “yes” triggers only one call, even if the message is sent twice.
- Botello calls your API, signs the request (Signed calls), then passes only the chosen fields to the assistant, presented as untrusted data, never as instructions.
- If the call fails, the assistant never shows the error code to the visitor: it apologizes and offers the team when handoff is available.
On top of the per-minute limit, a single visitor (a single session) cannot trigger more than 10 calls of the same action in 10 minutes.
Test an action
Test really calls your service with the values you enter. For a parameter provided by Botello (for example verified_email), type a sample value: in real use, Botello provides it.
The result shows three blocks:
| Block | Content |
|---|---|
| What Botello sent | The method, the final URL (a key passed in the URL is masked as •••), the header names, and Signed call (X-Botello-Signature) ✓. |
| Your API's raw response (only you see it) | The HTTP status, the content type and the first 3000 characters of the response. Nothing is stored. |
| What the assistant will read | Exactly what the assistant would receive: the chosen fields, sanitized, cut to the max length. |
Possible error messages: Call limit reached, No answer in time, Service unreachable, Internal address refused, Invalid configuration, Authentication refused (OAuth token).
Tests do not count in the statistics and do not trigger webhooks.
Statistics
Each action shows its figures for the last 30 days: number of calls, success rate and, if any, the date and cause of the last failure (“last failure on … (HTTP 503)”). Calls blocked by the call limit do not count as calls.
To track calls in your own tools, subscribe a webhook to action.executed and action.failed: see the event catalog.
Examples
An action that reads a product’s stock:
Technical name : check_stock
When to use it : Gives the stock and restock date of a product. Use it when the visitor asks
whether a product is available or when it will be back.
Method : GET
URL : https://api.exemple.ch/stock?sku={{sku}}
Parameter : sku (Text, required, provided by the assistant) : "Product SKU, e.g. MC-40-BLK"
Fields : data.available (available), data.restockDate (restock_date)Your API answers:
{ "data": { "sku": "MC-40-BLK", "available": 0, "restockDate": "2026-12-02", "supplierCost": 112.4 } }The assistant only reads:
{"available":0,"restock_date":"2026-12-02"}supplierCost never reaches it.
“Gives the status, carrier and tracking link of an order. Use it when the visitor asks where their order is and has given their order number and e-mail.” What the action does, then when to call it, with the information it needs.
“Orders.” Too vague: the assistant knows neither when to call it nor which values to ask the visitor for.
Description language
The When to use it (for the AI) text is passed to the assistant as is: English or French both work. The templates supplied by Botello are written in English. Either way, the assistant answers the visitor in the visitor’s language.
Troubleshooting
| What you see | Likely cause | Fix |
|---|---|---|
| The Custom API actions card does not appear | Developer tools are not enabled for your workspace | Write to support@botello.ch |
| Banner “Note: this chatbot still answers with the former engine…” | The chatbot does not use the new agent yet | Ask the Botello team to switch you over |
| “The domain cannot contain a parameter.” | {{…}} placed in the domain name | The domain is fixed: put the parameter in the path or the query |
“A {{parameter}} used is not declared.” | A name in curly braces has no parameter | Add the parameter, or fix the typo |
| “Choose at least one response field the assistant may read.” | No response field | Add at least one path |
| Reads the whole response badge | Older action, created without response fields | Add fields: any edit will require them anyway |
| The assistant never calls the action | Description too vague, action inactive, or visitor not verified for a restricted action | Make When to use it (for the AI) more precise, check Action active and the access setting |
| The assistant asks again for a value it already knows | The parameter is provided by “The visitor” and the value does not appear word for word in their messages | Expected: this is the protection. See Parameters and access |
| Internal address refused | The URL points to a private network | Expose your API on a public address |
Frequently asked questions
Learn more
Verify a webhook signature
Prove that every delivery comes from Botello and has not been tampered with, with ready-to-copy code in Node.js, PHP and Python.
Parameters, access and response of an API action
Choose who provides each value of a call, which visitors can use it and what the assistant reads from the response.
