{
"response": "<string>"
}{
"error": "Invalid API key"
}{
"error": "Bot not found"
}Chat with an agent
Send a message to a bot and receive a response. Each bot has a unique public_url identifier, available from the bot’s Integrations > API page in the dashboard. Uses the same x-api-key as all other Easy-Peasy.AI endpoints.
Supports optional conversation history for multi-turn conversations and streaming responses.
{
"response": "<string>"
}{
"error": "Invalid API key"
}{
"error": "Bot not found"
}/bot.
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
Whenstream: 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 inhistory. 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
Your API key (same as all other Easy-Peasy.AI endpoints). Get yours at https://easy-peasy.ai/settings/api
Headers
Your API key (same as all other Easy-Peasy.AI endpoints).
Path Parameters
The bot's unique public URL identifier. Found on the bot's Integrations > API page.
Body
The message to send to the bot.
Previous conversation history for multi-turn conversations. Messages should alternate between human and ai roles.
Show child attributes
Show child attributes
If true, the response is streamed as server-sent events (SSE). Each event contains a chunk of the bot's response.
If true, the response includes source references from the bot's knowledge base (if configured).
Response
Successful response from the bot
The bot's response text.
Was this page helpful?
