Skip to main content
POST
/
bot
/
{public_url}
/
api
curl --request POST \
  --url https://bots.easy-peasy.ai/bot/{public_url}/api \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "message": "What can you help me with?"
}
'
{
  "response": "<string>"
}
The Bots API uses a different base URL (https://bots.easy-peasy.ai) but the same API key as all other Easy-Peasy.AI endpoints.

Getting your Bot’s public URL

  1. Go to your Easy-Peasy.AI dashboard
  2. Navigate to your bot’s settings
  3. Open the Integrations tab
  4. Select API to find your bot’s public_url

Streaming

When stream: true is set, the response is returned as server-sent events (SSE). Each event contains a chunk of the bot’s response text, allowing you to display the response progressively as it’s generated.

Conversation history

To maintain context across multiple messages, include the history array with previous messages. Each entry should have a role (human or ai) and text field.

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.