API Documentation
Programmatic access to FlareCanary. Manage endpoints, view drift events, and configure alerts via REST API.
Authentication
All authenticated endpoints accept either a session cookie (from the dashboard) or an API key via the Authorization header.
curl -H "Authorization: Bearer fc_your_api_key_here" \
https://flarecanary.com/api/endpointsGenerate an API key in Dashboard → Settings. Keys use the fc_ prefix.
Endpoints
/api/endpointsAuth requiredList all your monitored endpoint subscriptions.
Query: ?active=true|false (default: true)
// Response
{
"endpoints": [
{
"id": "sub_abc123",
"name": "Stripe Charges",
"url": "https://api.stripe.com/v1/charges",
"method": "GET",
"pollIntervalMinutes": 60,
"isActive": true,
"tags": ["payments", "critical"],
"driftCount": 2,
"lastCheckedAt": "2026-03-16T10:00:00Z",
"lastStatusCode": 200
}
],
"count": 1
}/api/endpointsAuth requiredSubscribe to a new API endpoint for schema drift monitoring.
// Request body
{
"name": "Stripe Charges", // required, max 200 chars
"url": "https://api.stripe.com/v1/charges", // required
"method": "GET", // GET|POST|PUT|PATCH|DELETE
"headers": { "Authorization": "Bearer sk_..." },
"requestBody": null, // for POST/PUT/PATCH
"pollIntervalMinutes": 60, // 15-1440 (plan-dependent)
"tags": ["payments"] // max 10 tags
}
// Response (201)
{ "id": "sub_abc123", "name": "Stripe Charges", ... }/api/endpoints/:idAuth requiredGet a single endpoint subscription with full details.
/api/endpoints/:idAuth requiredUpdate subscription settings. URL/method/headers are immutable.
// Request body (all fields optional)
{
"name": "Updated Name",
"pollIntervalMinutes": 120,
"tags": ["updated-tag"],
"isActive": false
}/api/endpoints/:idAuth requiredUnsubscribe from an endpoint. If no other subscribers remain, the watched URL is also removed.
/api/endpoints/testAuth requiredTest an endpoint connection without saving. Returns status code, response time, and JSON detection.
// Request body
{
"url": "https://api.example.com/data",
"method": "GET",
"headers": {}
}
// Response
{
"success": true,
"statusCode": 200,
"responseTimeMs": 142,
"isJson": true,
"fieldCount": 12
}/api/endpoints/:id/refreshAuth requiredManually re-poll the endpoint and update the baseline schema.
Drift Events
/api/endpoints/:id/driftsAuth requiredGet drift event history for an endpoint.
Query: ?limit=50&severity=breaking|warning|info
// Response
{
"endpointId": "sub_abc123",
"endpointName": "Stripe Charges",
"events": [
{
"id": "drift_xyz",
"severity": "breaking",
"changes": [
{ "path": "data.currency", "type": "removed" },
{ "path": "data.amount", "type": "type_change",
"from": "number", "to": "string" }
],
"detectedAt": "2026-03-16T10:00:00Z"
}
],
"count": 1
}Poll History & Uptime
/api/endpoints/:id/historyAuth requiredGet poll history with response time stats for charting.
Query: ?range=24h|7d|30d (default: 7d)
// Response
{
"history": [
{ "polledAt": "2026-03-16T10:00:00Z",
"statusCode": 200, "responseTimeMs": 142, "success": true }
],
"stats": {
"min": 98, "max": 312, "avg": 156,
"p50": 142, "p95": 285, "p99": 310
},
"totalPolls": 168,
"successfulPolls": 167,
"failedPolls": 1
}/api/endpoints/:id/uptimeAuth requiredGet 30-day uptime percentage with daily breakdown.
// Response
{
"uptimePercent": 99.4,
"totalPolls": 720,
"successfulPolls": 716,
"failedPolls": 4,
"dailyBuckets": [
{ "date": "2026-03-16", "total": 24, "success": 24 }
]
}Alerts
/api/alertsAuth requiredList alert configurations. Optionally filter by endpoint.
Query: ?endpointId=sub_abc123 (optional)
/api/alertsAuth requiredCreate a new alert destination (email or webhook).
// Email alert
{
"type": "email",
"config": { "to": "you@example.com" },
"endpointId": "sub_abc123" // optional (global if omitted)
}
// Webhook alert
{
"type": "webhook",
"config": { "url": "https://hooks.slack.com/..." }
}/api/alerts/:idAuth requiredUpdate alert config or toggle active/inactive.
/api/alerts/:idAuth requiredRemove an alert configuration.
Settings
/api/settings/api-keyAuth requiredCheck if you have an API key generated.
/api/settings/api-keyAuth requiredGenerate or regenerate your API key. Returns the raw key (store it securely — it cannot be retrieved later).
/api/settings/api-keyAuth requiredRevoke your current API key.
/api/settings/planAuth requiredGet your current plan, limits, and usage.
// Response
{
"plan": "starter",
"limits": {
"maxEndpoints": 25,
"minPollIntervalMinutes": 60
},
"usage": { "endpoints": 8 }
}Demo
/api/demoSee a pre-built schema drift example (Stripe-like charge object). No authentication required.
/api/demoCompare two JSON objects for schema differences. No authentication required.
// Request body
{
"before": { "id": 1, "name": "Alice", "active": true },
"after": { "id": "1", "name": "Alice", "role": "admin" }
}
// Response
{
"drift": {
"changes": [
{ "path": "id", "type": "type_change", "from": "number", "to": "string" },
{ "path": "active", "type": "removed" },
{ "path": "role", "type": "added" }
],
"summary": { "added": 1, "removed": 1, "typeChanges": 1 }
}
}/api/demo/unstableA demo endpoint that rotates its schema every 6 hours. Monitor this to see drift detection in action.
Errors
All errors return a JSON body with an error field.
| Status | Meaning |
|---|---|
| 400 | Invalid request body or parameters |
| 401 | Missing or invalid authentication |
| 403 | Plan limit reached (ENDPOINT_LIMIT, INTERVAL_LIMIT) |
| 404 | Resource not found |
| 409 | Conflict (e.g., duplicate email) |
| 500 | Internal server error |
Rate Limits & Plans
| Plan | Endpoints | Min poll interval | Price |
|---|---|---|---|
| Free | 3 | 24 hours | $0 |
| Starter | 25 | 1 hour | $19/mo |
| Pro | 100 | 15 minutes | $49/mo |