REST API
Copies this page as Markdown with context, so an AI can walk you through your case step by step.
Create and manage monitors, read incidents and servers from your own systems. Included in the Agency plan.
Authentication
Create a key in Dashboard → Team and settings → REST API. It is shown only once: store it somewhere safe. Send it with every request:
Authorization: Bearer gya_…
Content-Type: application/jsonBase URL: https://ganyant.com/api/v1. We only store the key's SHA-256 hash; revoking it stops it immediately. Limit: 120 requests per minute per key.
Responses
Everything is JSON. Success comes in data; failures in error with a code and a message:
{ "data": { ... } }
{ "error": { "code": "plan_limit", "message": "Your plan does not allow this (monitors: 1000)." } }| HTTP status | When |
|---|---|
401 | Missing, malformed or revoked key |
402 | The plan does not include the API, or a plan limit was reached |
404 | The resource does not exist or belongs to another workspace |
422 | Invalid data (the message says which) |
429 | More than 120 requests in a minute |
Monitors
| Method and path | What it does |
|---|---|
GET /monitors | Lists every monitor with its status |
POST /monitors | Creates a monitor |
GET /monitors/:id | One monitor, with its 30-day uptime |
PATCH /monitors/:id | Changes name, interval, regions or pauses it ("paused": true) |
DELETE /monitors/:id | Deletes the monitor and its history |
POST /monitors/:id/check | Requests an immediate check |
Fields to create: target (required), type (http, ping, tcp, udp, heartbeat; default http), name, interval_s (default 300), regions (e.g. ["us-east", "sa-east"]), port, keyword, keyword_mode (contains or not_contains), expected_status, timeout_ms. Plan limits apply exactly as in the dashboard.
curl -X POST https://ganyant.com/api/v1/monitors \
-H "Authorization: Bearer $GANYANT_API_KEY" \
-H "Content-Type: application/json" \
-d '{"name":"Store","target":"https://store.com","interval_s":60,"keyword":"Add to cart"}'Incidents
GET /incidents?status=open (also resolved or all, and limit up to 200). Each incident has kind (downtime, ssl, disk, intrusion, rule, security, backup), title, started_at, acknowledged_at and resolved_at.
curl https://ganyant.com/api/v1/incidents?status=open -H "Authorization: Bearer $GANYANT_API_KEY"Servers
GET /servers lists servers running the agent and whether they are online. GET /servers/:id adds the latest metrics (cpu_pct, memory, swap, load, disks and network).
Status pages
GET /status-pages lists your pages with their public URL.
Real-time notices
To hear about every outage without polling, use signed webhooks: we send you a POST the moment it happens.