REST API · OpenAPI · Webhooks

The AI Guru Agent API

AI Guru Agent has a public REST API for your chatbots, conversations, leads, training content and analytics, described in an OpenAPI document. You authenticate with an API token that only has the scopes you choose. Webhooks tell your systems when a lead arrives or a visitor needs a person.

What can the AI Guru Agent API do?

Read your chatbots and their settings, read visitor conversations, read and manage leads, read and manage training content and Q&A answers, and read analytics or export them as CSV. Each API token carries only the scopes you give it:

ScopeWhat it allows
bots:readRead your chatbots and their settings
chats:readRead visitor conversations
leads:readRead and export leads
leads:writeAdd, change and delete leads
knowledge:readRead training content and Q&A answers
knowledge:writeAdd, change and remove training content and Q&A answers
analytics:readRead analytics and export them as CSV

Where is the API reference?

The OpenAPI document lists every public endpoint with its request and response: /aiguru-agent/v3/api-docs/public-api. Every path starts with /aiguru-agent/api/v1/.

How do I authenticate?

Create an API token in the dashboard under Settings → API & agents and pick its scopes (tokens start with agp_). Exchange it for a short-lived access token, then send that as a Bearer token. A token can never do more than the person who created it.

curl -X POST https://<your-aiguru-host>/auth/token/exchange \
  -H "Content-Type: application/json" \
  -d '{ "token": "agp_..." }'

curl https://<your-aiguru-host>/aiguru-agent/api/v1/bots \
  -H "Authorization: Bearer <accessToken>"

Which webhooks can I receive?

  • lead.created — a visitor left their details, or someone added a lead
  • conversation.escalated — a visitor is waiting for a person
  • conversation.resolved — a conversation was marked resolved

To connect Zapier, paste a Zapier “Catch Hook” address in the dashboard; it registers the webhook and sends a test event.

How do I add the chat widget?

Paste one script tag with your chatbot's key before </body>, or share the hosted chat link. The dashboard's Install page gives you both, ready to copy.

Is there an MCP server or a CLI?

Not yet. Today the REST API and webhooks are how your own tools and AI agents connect.