Reference

API Documentation

The Vartio REST API lets you manage monitors, services, alert channels, and status pages programmatically. All responses are JSON. The base URL for all API requests is https://api.vartio.dev.

Authentication

The API uses JWT bearer tokens signed with HS256. Tokens contain your user ID and organization ID and expire after 24 hours by default.

1. Obtain a token

POST your credentials to the login endpoint. The response contains a token field.

POST /api/v1/auth/login
Content-Type: application/json

{
  "email": "[email protected]",
  "password": "your-password"
}

2. Use the token

Pass the token in the Authorization header on all protected requests.

GET /api/v1/monitors
Authorization: Bearer <your-token>

Public

These endpoints require no authentication and are accessible without a token.

GET
/health

Health check — returns 200 when the API is up.

GET
/metrics

Prometheus metrics endpoint.

GET
/public/status/{slug}

Fetch a public status page by its slug. No authentication required.

Auth

Registration, login, and password reset. These endpoints do not require a token but are rate-limited by IP address.

POST
/api/v1/auth/register

Register a new user and organization. Returns a JWT token.

Rate limited: 5 requests/min per IP

POST
/api/v1/auth/login

Authenticate with email and password. Returns a JWT bearer token.

Rate limited: 10 requests/min per IP

POST
/api/v1/auth/forgot-password

Request a password reset email.

Rate limited: 3 requests/min per IP

POST
/api/v1/auth/reset-password

Complete a password reset using the token from the reset email.

Rate limited: 5 requests/min per IP

GET
/api/v1/auth/me

Return the authenticated user and their organization memberships.

Monitors

Create and manage uptime monitors for HTTP, SSL, DNS, TCP, UDP, ping, and multi-step checks.

Requires Authorization: Bearer header.

GET
/api/v1/monitors

List all monitors for the organization. Includes current status and 30-day uptime.

POST
/api/v1/monitors

Create a new monitor.

GET
/api/v1/monitors/{monitorID}

Get a single monitor by ID.

PUT
/api/v1/monitors/{monitorID}

Update a monitor's configuration.

DELETE
/api/v1/monitors/{monitorID}

Delete a monitor and all its check history.

GET
/api/v1/monitors/{monitorID}/checks

List recent check results for a monitor.

GET
/api/v1/monitors/{monitorID}/stats

30-day aggregated statistics for a monitor.

GET
/api/v1/monitors/{monitorID}/uptime

Daily uptime breakdown. Defaults to the last 90 days.

Services

Services are logical groupings that organize related monitors into a single unit for your status page.

Requires Authorization: Bearer header.

GET
/api/v1/services

List all services for the organization, including their member monitors.

POST
/api/v1/services

Create a new service group.

GET
/api/v1/services/{serviceID}

Get a service and its monitors.

PUT
/api/v1/services/{serviceID}

Update a service name or description.

DELETE
/api/v1/services/{serviceID}

Delete a service. Monitors are not deleted.

Alert Channels

Configure where alert notifications are sent. Supported types: email, Slack, Discord, webhook.

Requires Authorization: Bearer header.

GET
/api/v1/alert-channels

List all alert channels for the organization.

POST
/api/v1/alert-channels

Create a new alert channel.

GET
/api/v1/alert-channels/{channelID}

Get a single alert channel.

PUT
/api/v1/alert-channels/{channelID}

Update an alert channel configuration.

DELETE
/api/v1/alert-channels/{channelID}

Delete an alert channel.

Status Pages

Public status pages that display uptime history and incidents to your users.

Requires Authorization: Bearer header.

GET
/api/v1/status-pages

List all status pages for the organization.

POST
/api/v1/status-pages

Create a new status page.

GET
/api/v1/status-pages/{pageID}

Get a status page configuration.

PUT
/api/v1/status-pages/{pageID}

Update a status page.

DELETE
/api/v1/status-pages/{pageID}

Delete a status page.

Guides

Integration Guides

Step-by-step instructions for connecting Vartio alerts to Slack, Discord, your own HTTP endpoint, and email.

Slack

Receive down and recovery alerts as Slack messages using an Incoming Webhook. Each alert includes the monitor name, URL, and failure cause.

Step 1 — Create a Slack Incoming Webhook

In Slack, go to Apps → Incoming Webhooks (or visit api.slack.com/apps), create a new app, enable Incoming Webhooks, and add it to a channel. Copy the generated webhook URL.

Step 2 — Create the alert channel

POST /api/v1/alert-channels
Authorization: Bearer <token>
Content-Type: application/json

{
  "name": "Slack Alerts",
  "type": "slack",
  "config": {
    "webhook_url": "https://hooks.slack.com/services/T.../B.../..."
  }
}

What alerts look like

Down alerts appear as plain text messages with the monitor name, URL, and failure cause. Recovery alerts confirm when the monitor comes back online. Vartio sends a plain text field so messages display in any Slack client without attachments.

Discord

Post alert embeds to a Discord channel using a server webhook. Alerts are color-coded: red for down events, green for recoveries.

Step 1 — Create a Discord Webhook

In your Discord server, open Channel Settings → Integrations → Webhooks, create a new webhook, choose a channel, and copy the webhook URL.

Step 2 — Create the alert channel

POST /api/v1/alert-channels
Authorization: Bearer <token>
Content-Type: application/json

{
  "name": "Discord Alerts",
  "type": "discord",
  "config": {
    "webhook_url": "https://discord.com/api/webhooks/..."
  }
}

Format note

Discord webhooks use an embeds array rather than a plain text field. Vartio automatically formats the payload to match Discord's expected structure — no extra configuration is required on your end.

Webhook

Receive alerts as HTTP POST requests to your own endpoint. Use this to trigger custom automation, pipe alerts into your own systems, or fan out to multiple destinations.

Only publicly routable URLs are accepted. Private IP ranges and localhost are blocked to prevent SSRF.

Create the alert channel

POST /api/v1/alert-channels
Authorization: Bearer <token>
Content-Type: application/json

{
  "name": "My Webhook",
  "type": "webhook",
  "config": {
    "url": "https://example.com/hooks/vartio",
    "secret": "optional-shared-secret"
  }
}

If secret is provided, Vartio sends it in the X-Webhook-Secret header so you can verify the request origin.

Payload format

Vartio sends a JSON body with Content-Type: application/json. The type field is either down or recovery. The cause field is omitted on recovery events.

{
  "type": "down",
  "monitor_name": "Production API",
  "monitor_url": "https://api.example.com/health",
  "cause": "connection refused",
  "incident_id": "01932b4c-...",
  "occurred_at": "2025-01-15T10:30:00Z"
}

Email

Email alert channels send HTML messages with the monitor name, URL, failure cause, and timestamp. Use multiple channels to notify different recipients or teams.

Add an email recipient

Create an alert channel with type: email and set the destination address in config.email. You can create as many email channels as needed — each one delivers to a separate inbox.

POST /api/v1/alert-channels
Authorization: Bearer <token>
Content-Type: application/json

{
  "name": "On-call Engineering",
  "type": "email",
  "config": {
    "email": "[email protected]"
  }
}

Subject line format

Down alerts arrive with the subject [DOWN] <monitor name> is unreachable. Recovery alerts use [RECOVERED] <monitor name> is back online, making it easy to set up email filters.

Quick start

A complete example: authenticate and create your first HTTP monitor in two requests.

Step 1 — Log in

curl -s -X POST https://api.vartio.dev/api/v1/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"[email protected]","password":"secret"}' \
  | jq -r '.token'

Copy the token from the response — you will use it in the next step.

Step 2 — Create a monitor

TOKEN="<paste-token-here>"

curl -s -X POST https://api.vartio.dev/api/v1/monitors \
  -H "Authorization: Bearer $TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "My API",
    "type": "http",
    "url": "https://api.example.com/health",
    "interval": 60
  }'

The monitor starts checking immediately. You can verify it is running with GET /api/v1/monitors/{monitorID}/checks.

Need help or found an issue with the API?

Reach us at [email protected]. We respond within one business day.