docs
API Reference
API Overview

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 templates
  • GET /api/test-definitions - List test definitions
  • POST /api/test/create - Create and run tests
  • GET /api/test/status/{id} - Get test execution status

Authentication

  • POST /api/auth/signin - User login
  • POST /api/auth/signup - User registration
  • GET /api/auth/apikey - Generate API keys

Analytics

  • GET /api/analytics - Usage analytics and insights
  • GET /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).