RESTful API
Standard HTTP methods and JSON responses
Secure Authentication
API key-based authentication with permissions
Rate Limiting
1000 requests per day per API key
Getting Started
1
2
Make Your First Request
Include your API key in the X-API-Key header with every request.
curl -X GET "https://your-app.base44.dev/apiAgents" \
-H "X-API-Key: your_api_key_here"
-H "X-API-Key: your_api_key_here"
3
Handle the Response
All responses are in JSON format with success and data fields.
{
"success": true,
"data": [...],
"count": 10
}
API Endpoints
GET
/apiAgentsread:agents
List all approved marketplace agents
Query Parameters:
category(string)- Filter by categorystatus(string)- Filter by status (default: approved)limit(number)- Max results (default: 50)POST
/apiAgentswrite:agents
Create a new marketplace agent
Request Body:
{
"agent_name": "string (required)",
"agent_role": "string (required)",
"system_prompt": "string (required)",
"description": "string",
"category": "string",
"pricing_model": "string"
}
GET
/apiCoursesread:courses
List all published courses
Query Parameters:
category(string)- Filter by categorystatus(string)- Filter by status (default: published)limit(number)- Max results (default: 50)GET
/apiEventsread:events
List upcoming events
Query Parameters:
status(string)- Filter by status (default: upcoming)type(string)- Filter by event typelimit(number)- Max results (default: 50)GET
/apiAuthread:users
Get authenticated user information
Code Examples
// Install axios: npm install axios
const axios = require('axios');
const API_KEY = 'your_api_key_here';
const BASE_URL = 'https://your-app.base44.dev';
// List agents
async function listAgents() {
const response = await axios.get(`${BASE_URL}/apiAgents`, {
headers: {
'X-API-Key': API_KEY
},
params: {
category: 'business',
limit: 10
}
});
return response.data;
}
// Create agent
async function createAgent(agentData) {
const response = await axios.post(`${BASE_URL}/apiAgents`, agentData, {
headers: {
'X-API-Key': API_KEY,
'Content-Type': 'application/json'
}
});
return response.data;
}API Permissions
read:agentsList and view marketplace agents
write:agentsCreate and modify agents
read:coursesList and view courses
read:eventsList and view events
read:usersView authenticated user data
Rate Limiting
Default Limit: 1000 requests per day per API key
Rate limit headers are included in all API responses. Contact support for higher limits.