Skip to main content
POST
Send a message to an agent you built in the dashboard and get its answer. Agents were called Bots, which is why the path starts with /bot.
The Agents API uses a different base URL (https://bots.easy-peasy.ai) but the same API key as all other Easy-Peasy.AI endpoints.

Find your agent’s ID

public_url is your agent’s ID. In the dashboard, open your agent and go to Channels > Chat bubble > Manage and copy Your Agent ID, or open Integrations > REST API to see the full endpoint with example code.

Streaming

When stream: true is set, the response is returned as server-sent events (SSE). Each event contains a chunk of the agent’s answer, so you can show it as it’s written.

Conversation history

To keep context across messages, send the earlier messages in history. Each entry has a role (human or ai) and a text field. Each request is answered on its own, so without history the agent doesn’t know what was said before.

What the API doesn’t do

The agent answers from its knowledge and instructions. Actions, such as buttons, forms, and bookings, don’t run through the API.

Authorizations

x-api-key
string
header
required

Your API key (same as all other Easy-Peasy.AI endpoints). Get yours at https://easy-peasy.ai/settings/api

Headers

x-api-key
string
required

Your API key (same as all other Easy-Peasy.AI endpoints).

Path Parameters

public_url
string
required

The bot's unique public URL identifier. Found on the bot's Integrations > API page.

Body

application/json
message
string
required

The message to send to the bot.

history
object[]

Previous conversation history for multi-turn conversations. Messages should alternate between human and ai roles.

stream
boolean
default:false

If true, the response is streamed as server-sent events (SSE). Each event contains a chunk of the bot's response.

include_sources
boolean
default:false

If true, the response includes source references from the bot's knowledge base (if configured).

Response

Successful response from the bot

response
string

The bot's response text.