Getting started with ApiMirror
Everything you need to monitor, test, and document your API endpoints.
Quickstart
You can start monitoring an endpoint in under a minute. No SDK required — everything goes through our REST API or the dashboard.
1. Get your API key
After signing up, grab your API key from Settings → API Keys. Keys are prefixed with am_live_ for production and am_test_ for sandbox.
2. Register an endpoint
$ curl -X POST https://api.api-mirror.com/v1/endpoints \ -H "Authorization: Bearer am_live_your_key" \ -H "Content-Type: application/json" \ -d '{ "url": "https://api.example.com/health", "interval": 60, "assertions": [ { "source": "status", "operator": "eq", "target": 200 } ] }'
3. Verify it's running
Check the dashboard or query the status endpoint. Your first check runs within seconds of registration.
$ curl -s https://api.api-mirror.com/v1/endpoints/ep_8f3k/status \ -H "Authorization: Bearer am_live_your_key" | jq '.status, .latency_ms' 200 43
Authentication
All API requests require a Bearer token in the Authorization header. Tokens never expire, but you can revoke and rotate them from the dashboard.
Rate limits are tied to your API key. If you exceed your plan's limits, you'll get a 429 Too Many Requests response with a Retry-After header.
API Reference
Base URL: https://api.api-mirror.com/v1
Endpoints
Checks
Alerts
Code Examples
# List all endpoints $ curl https://api.api-mirror.com/v1/endpoints \ -H "Authorization: Bearer am_live_your_key" # Trigger a manual check $ curl -X POST https://api.api-mirror.com/v1/endpoints/ep_8f3k/check \ -H "Authorization: Bearer am_live_your_key"
import requests API_KEY = "am_live_your_key" BASE = "https://api.api-mirror.com/v1" headers = {"Authorization": f"Bearer {API_KEY}"} # Register endpoint resp = requests.post(f"{BASE}/endpoints", headers=headers, json={ "url": "https://api.example.com/health", "interval": 60 } ) print(resp.json())
const API_KEY = "am_live_your_key"; const BASE = "https://api.api-mirror.com/v1"; // Register endpoint const res = await fetch(`${BASE}/endpoints`, { method: "POST", headers: { "Authorization": `Bearer ${API_KEY}`, "Content-Type": "application/json" }, body: JSON.stringify({ url: "https://api.example.com/health", interval: 60 }) }); console.log(await res.json());
Webhooks
ApiMirror sends webhook events when your endpoints go down, recover, or breach latency thresholds. Configure webhook URLs in Settings → Webhooks or via the API.
All webhook payloads include a X-ApiMirror-Signature header for verification. The signature is an HMAC-SHA256 of the request body using your webhook secret.
Event types
- endpoint.down — Endpoint returned a non-2xx status or timed out
- endpoint.recovered — Endpoint is healthy again after being down
- endpoint.latency_breach — Response time exceeded configured threshold
- endpoint.ssl_expiry — SSL certificate expires within 14 days
Rate Limits
API rate limits depend on your plan:
- Hobby: 60 requests/minute
- Pro: 300 requests/minute
- Team: 1,000 requests/minute
Rate limit headers are included in every response: X-RateLimit-Limit, X-RateLimit-Remaining, and X-RateLimit-Reset.