Documentation

Tools and actions

Let the assistant call your own APIs to track orders, update accounts, and take real action mid-conversation.

Tools & actions

Tools let IotaBot take real action by calling your own or third-party APIs. You define a tool once — its method, URL, parameters, and how the AI should use it — and the assistant invokes it automatically when a visitor's request matches. Each tool is scoped and purpose-built, so the assistant only does what you allow.

Anatomy of a tool

  • MethodGET (fetch/read data) or POST (create/perform an action).
  • URL template — your endpoint, with single-brace placeholders (like an orderId token) the AI fills from the conversation.
  • Parameters — each declares where it goes: path, query, body, or header.
  • Headers — static or secret values (e.g. an API key referenced securely, never hard-coded in the browser).

Example — GET (track an order)

A read-only lookup. The AI extracts the order number from the chat and fills the order-id path placeholder:

GET  https://yourwebsite.com/api/orders/{orderId}

Parameters:
  orderId   in: path     (from the conversation, e.g. "10482")

Headers:
  Authorization: Bearer <your-secret-api-key>

Example call:
  GET https://yourwebsite.com/api/orders/10482
  -> 200 { "status": "shipped", "eta": "today 6 PM" }

Example — POST (create a support request)

A write action. The AI collects values from the visitor and sends them in the request body:

POST https://yourwebsite.com/api/support/tickets

Parameters:
  email     in: body
  subject   in: body
  message   in: body

Body template:
  {
    "email":   "{email}",
    "subject": "{subject}",
    "message": "{message}"
  }

Example response:
  201 { "id": "SUP-3391", "status": "open" }

Placeholders are written in single braces (as shown above) and are safely URL-encoded before the request is sent. Point tools at any base URL — your own backend (https://yourwebsite.com/api/…) or a third-party service.