API Reference
Testr provides both REST APIs and MCP integration for programmatic access to all platform features.
Available APIs
REST API
- Base URL:
https://testr.pro/api
- Authentication: Bearer token (session-based)
- Format: JSON request/response
- Rate Limiting: Applied per user account
MCP Integration
- Endpoint:
https://testr.pro/api/mcp
- Authentication: API key header
- Protocol: Model Context Protocol v2024-11-05
- Real-time: Session-based with 24-hour validity
Quick Start
REST API Authentication
# Get session token via login
curl -X POST https://testr.pro/api/auth/signin \
-H "Content-Type: application/json" \
-d '{"email": "user@example.com", "password": "password"}'
# Use token in subsequent requests
curl -X GET https://testr.pro/api/test-definitions \
-H "Authorization: Bearer YOUR_SESSION_TOKEN"
MCP Integration
{
"mcpServers": {
"Testr": {
"url": "https://testr.pro/api/mcp",
"headers": {
"x-api-key": "testr_YOUR_API_KEY"
}
}
}
}
Core Endpoints
Test Management
POST /api/test-definitions
- Create test templatesGET /api/test-definitions
- List test definitionsPOST /api/test/create
- Create and run testsGET /api/test/status/{id}
- Get test execution status
Authentication
POST /api/auth/signin
- User loginPOST /api/auth/signup
- User registrationGET /api/auth/apikey
- Generate API keys
Analytics
GET /api/analytics
- Usage analytics and insightsGET /api/analytics/stats
- Dashboard statistics
For detailed MCP tool documentation, see MCP Tool Reference.
For complete REST API documentation, visit the interactive API docs (opens in a new tab).