An AI agent API to connect Gental to your systems

Have an app, a CRM or an internal tool where the agent should answer? Gental’s API channel lets your systems start a conversation, send a customer’s message and get the answer with its sources, while every conversation shows in your team inbox like any other channel.

Published · Updated

In short

The Gental API connects your AI agent to your own app and systems. Create an API key with the scopes you need, publish the agent to the API channel, then send customer messages over REST and get the answer as JSON or streamed with server-sent events, with sources. Signed webhooks report what happens in your workspace. The API channel is included from the Growth plan.

Who can use the API

The API channel is included on the Growth and Business plans; see the pricing page. You authenticate with a workspace API key that you create in the dashboard.

A public API reference is coming soon. Until then, the steps below cover the full flow. To connect ready-made apps without code, see integrations, and to put the agent on WhatsApp, read about the WhatsApp AI agent.

What you can do with the Gental agent API

  • Scoped API keys

    Each key has the scopes you pick and can be limited to some agents. It is shown once, and revoking it stops it at once.

  • REST and streaming

    Get the full answer as JSON with sources, or stream it with server-sent events and show it as it is written.

  • Files and images

    Upload a customer’s photo or document into the conversation, and the agent reads it and answers.

  • Signed webhooks

    New messages, replies, handoffs, leads and linked number status. Every request is signed with HMAC-SHA256 and retried on failure.

  • Handover to your team

    When a teammate holds the conversation the API tells you, and the teammate’s reply reaches you as a webhook.

  • Linked numbers from your system

    Send messages from a linked WhatsApp number, manage its contacts, and decide who answers a chat: the agent or a person.

How to connect the agent to your system, step by step

The flow in short, without the error and limit details.

  1. Create an API key

    In Settings, Developers, pick the agents.chat scope, then copy the key and keep it on your server (never in a browser or mobile app).

  2. Publish the agent to the API

    Turn on API publishing on the agent. Only the published version answers; drafts stay in the dashboard.

  3. Start a conversation

    Your system sends POST /agents/{agentId}/conversations and gets a conversation id back.

  4. Send the customer’s message

    POST /conversations/{conversationId}/messages with the text. You get the answer, its sources, and whether it was answered or needs a person. Add Accept: text/event-stream to stream it.

  5. Receive events

    Add a webhook URL, verify the signature on every request, and deduplicate on the event id.

API key scopes

ScopeAllows
agents.chatList agents, start conversations, send and read messages
whatsapp.readList linked numbers, their contacts and send status
whatsapp.sendSend messages, cancel a send, and hand a chat to a person or back to the agent
whatsapp.contactsSave and remove contacts, and check whether a phone is on WhatsApp

Linked numbers need API access turned on for that number. The connection is unofficial and Meta may restrict the number.

Built for real systems

  • An Idempotency-Key on every write, so a retry never sends a message twice.
  • Error messages in Arabic or English, following Accept-Language.
  • Clear rate limits, with Retry-After when you reach them.
  • Automatic webhook retries, with delivery history in the dashboard.
  • Your keys, webhook URLs and secrets are never written to logs.

Common questions

Does Gental have a chatbot API?

Yes. The API channel lets your system start conversations with the agent, send messages and get answers over REST or streamed, and receive events through signed webhooks.

Which plan includes the API?

Growth and Business (Enterprise on request). Each API answer uses credits like on every channel (1 for a normal reply). See the pricing page for details.

Can I call the API from the browser?

No. Keep the key on your server: your app or site talks to your server, and your server talks to Gental.

How do I know a webhook came from Gental?

Each request carries an HMAC-SHA256 signature of the timestamp and raw body with your signing secret. Reject any request with a wrong signature or a timestamp more than 5 minutes old.

Do API conversations show up for my team?

Yes. They appear in the team inbox like any channel, and a teammate can take over.

Start today. It answers tonight.

Add your knowledge, pick a persona, publish it on your website. Free to start.

  • No card
  • No code
  • Data stored in Saudi Arabia