API Reference

Use the REST API to interact with your agent programmatically. Create conversations, send messages, and manage memory from any application.

Base URL

https://app.base44.com/api/apps/69b66403ed99b8a4b9ba13eb/agents

Authentication

Include your API key in the request header:

api_key: 917b5a0b6a2f4be8a5e85d2f5e4956b7

Alternatively, pass it as a query parameter:

?api_key=917b5a0b6a2f4be8a5e85d2f5e4956b7

Quick Start

Follow these steps to start chatting with your agent via the API:

1. Create a conversation

curl -X POST "https://app.base44.com/api/apps/69b66403ed99b8a4b9ba13eb/agents/conversations" \ -H "Content-Type: application/json" \ -H "api_key: 917b5a0b6a2f4be8a5e85d2f5e4956b7" \ -d '{"agent_name": "default", "metadata": {}}'

2. Send a message

curl -X POST "https://app.base44.com/api/apps/69b66403ed99b8a4b9ba13eb/agents/conversations/{conversation_id}/messages" \ -H "Content-Type: application/json" \ -H "api_key: 917b5a0b6a2f4be8a5e85d2f5e4956b7" \ -d '{"role": "user", "content": "Hello, how can you help me?"}'

3. List conversations

curl "https://app.base44.com/api/apps/69b66403ed99b8a4b9ba13eb/agents/conversations" \ -H "api_key: 917b5a0b6a2f4be8a5e85d2f5e4956b7"

API Endpoints

GET
/conversations
List all conversations for the authenticated user
GET
/conversations/{conversation_id}
Get a specific conversation with all messages
POST
/conversations
Create a new conversation with the agent
POST
/conversations/{conversation_id}/messages
Send a message and get the agent's response
DELETE
/conversations/{conversation_id}/messages/{message_id}
Delete a specific message from a conversation
GET
/{agent_name}/memory
List the agent's memory items
DELETE
/{agent_name}/memory/{memory_id}
Delete a specific memory item

Response Format

Conversations are returned as JSON objects containing an array of messages:

{
  "id": "conversation_id", "app_id": "69b66403ed99b8a4b9ba13eb", "agent_name": "default", "messages": [{"id": "message_id", "role": "user", "content": "Hello!", "tool_calls": [], "file_urls": []},{"id": "message_id", "role": "assistant", "content": "Hi! How can I help you?", "tool_calls": [], "file_urls": []}], "metadata": {}}

Rate Limits

API requests are rate-limited per user. If you exceed the limit, you'll receive a 429 status code. Wait and retry after a short delay.

Error Codes

401Unauthorized — invalid or missing API key
403Forbidden — you don't have access to this resource
400Bad request — invalid input (e.g. message too long)
404Not found — conversation or resource doesn't exist