Complete reference for the BotRender API with examples and interactive testing.
Your API token is the API key you create in your Dashboard Settings. The X-Botrender-Token header should contain the full API key value.
💡 Admin and Owner roles can view existing API keys, while all roles can create new ones.
https://api.botrender.com/v1X-Botrender-Token: your-api-key
curl -X GET "https://api.botrender.com/v1/sites" \ -H "X-Botrender-Token: your-api-key" \ -H "Content-Type: application/json"
/sitesRetrieve all sites in your account.
{
"sites": [
{
"id": "site_123",
"url": "https://example.com",
"status": "active",
"created_at": "2024-01-15T10:30:00Z",
"renders_count": 1247,
"cache_hit_rate": 0.943
}
],
"total": 1
}/sitesAdd a new site to your account.
{
"url": "https://example.com",
"name": "My Website",
"settings": {
"cache_ttl": 3600,
"follow_redirects": true,
"wait_after_load": 1000
}
}{
"id": "site_124",
"url": "https://example.com",
"name": "My Website",
"status": "active",
"created_at": "2024-01-15T11:00:00Z"
}/sites/{site_id}/prerenderManually trigger prerendering for specific URLs.
{
"urls": [
"https://example.com/page1",
"https://example.com/page2"
],
"force_refresh": true
}/sites/{site_id}/cacheClear cache for specific URLs or entire site.
{
"urls": [
"https://example.com/page1",
"https://example.com/page2"
]
// Omit urls to clear entire site cache
}/sites/{site_id}/analyticsGet analytics data for a specific time period.
start_date - Start date (ISO 8601)end_date - End date (ISO 8601)granularity - hour, day, week, month{
"renders": {
"total": 12847,
"by_day": [
{ "date": "2024-01-15", "count": 423 },
{ "date": "2024-01-16", "count": 567 }
]
},
"cache_hit_rate": 0.943,
"avg_response_time": 185,
"top_user_agents": [
{ "name": "Googlebot", "percentage": 45.2 },
{ "name": "Bingbot", "percentage": 23.1 }
]
}Invalid request parameters or malformed JSON.
Invalid or missing API token.
Insufficient permissions or quota exceeded.
Too many requests. Check rate limit headers.