MobiariDocs

AI actions

Let the chat AI act in your own system (resend an invoice, restart a deploy, check a subscription) through signed calls to your endpoints.

The chat AI answers from the knowledge base and calls the team when it cannot help. With actions it can also do things in your system while it talks to the customer: each action is an https endpoint of yours that it calls with what it gathered in the conversation.

Set them up in the Mobiari admin, in Conversas → Configurações → Assistente → Ações no seu sistema. Managing actions is not part of the public API yet. Calls are signed with the workspace's integration secret (see customer context), so create one first.

An action

Field
namereenviar_boleto: lower-case letters, digits and _. The AI sees the tool action_reenviar_boleto.
labelWhat the team reads: "Reenviar boleto".
descriptionWhen to use it and what it does, for the AI: "Resends the open invoice to the customer's e-mail when they ask for a copy."
urlYour https endpoint.
parametersWhat the AI must gather first: key, description, kind (string, number, boolean) and required. Up to 10.
requires_identityOffered only in chats with a signed identity, when the customer is who your site says. On by default: keep it on for anything about an account.
confirmThe AI tells the customer what it will do and calls only after a yes. Enforced by Mobiari, not left to the AI: the first call only records the request; the same call (same parameters) runs only when the customer's next message is a clear yes ("sim", "pode", "ok"; anything with a no, a question or a condition is not), within 30 minutes, and only once.
enabledOff keeps it saved but hidden from the AI.

The call

Mobiari POSTs JSON to the url, with the same X-Mobiari-Timestamp and X-Mobiari-Signature headers as the context URL:

{
  "event": "ai.action",
  "action": "reenviar_boleto",
  "store_id": "…",
  "conversation_id": "…",
  "customer": {
    "external_id": "acct_42",
    "verified": true,
    "email": "ana@example.com",
    "phone": null,
    "name": "Ana",
    "customer_id": "…"
  },
  "input": { "fatura": "INV-9" }
}

Check the signature, act for customer.external_id, and answer within 8 seconds. Any 2xx counts as done; the body (JSON, or text, up to 4000 characters) is what the AI reads to tell the customer the result, so say it plainly: {"ok": true, "sent_to": "ana@example.com"}. Another status is a failure: the AI says so and offers the team. A test from the admin carries "test": true and no customer.

The AI never invents parameters or results: it asks the customer for what is missing and reports what your endpoint answered.

On this page