Developers

Developer quickstart

Pick the right UptimeWarden tool for your workflow. CLI, GitHub Actions, Terraform, or REST API, and get a live monitor in under a minute.

UptimeWarden gives you five ways to automate your monitoring: four to declare and manage monitors as code, and an MCP server for AI agents. Pick the one that fits your workflow; they all talk to the same API.

Pick your tool

CLI (@uptimewarden/cli)

A TypeScript-first CLI for declaring monitors in a config file and applying them from your terminal or CI. Plan and diff support, drift detection, dry-run by default in the current release.

Use this if you want a Terraform-style workflow but prefer TypeScript over HCL, or you want to start declaring monitors as code today.

CLI reference · Monitoring as Code design · Source on GitHub

GitHub Actions (first-party Actions)

Composite Actions that wrap the same REST endpoints the CLI uses. Heartbeat pings, deploy markers, and pre-deploy incident gates. Free for every plan.

Use this if your CI/CD lives on GitHub and you want zero-setup monitoring hooks in your workflows.

GitHub Actions reference · Source on GitHub

Terraform Provider (uptimewarden/uptimewarden)

Native HCL for monitors: checks, regions, thresholds and alert routing (escalation policies and webhooks referenced by public id). Escalation policies, webhooks, status pages, on-call schedules and API tokens are not managed through the provider; create them in the dashboard.

Use this if the rest of your infrastructure is already in Terraform and you want monitoring to live in the same state file.

resource "uptimewarden_monitor" "api" {
  name     = "Production API"
  type     = "http"
  url      = "https://api.acme.com/health"
  interval = 60
}

Full Terraform Provider reference · Source on GitHub

MCP server (/api/mcp)

Lets an AI agent (Claude Code, Cursor, VS Code, claude.ai and Claude Desktop connectors) read and manage your account: ask what is down, look at last night's incident, start maintenance before a deploy. Each tool is one REST API call with your token's permissions.

Use this if you work with an AI coding agent and want it to know how your services are doing.

MCP server setup

REST API (/api/v1)

The underlying API every other surface wraps. Granular permission tokens and an OpenAPI 3.0 spec covering Monitors (create, read, update, delete with every setting the dashboard has), reference lists (escalation policies, webhooks, regions), Incidents, SSL, Security and AI Health Predictions, plus heartbeat success and failure pings.

Use this if you are building a custom integration, internal tooling, or a language binding none of the surfaces above gives you.

API Quick Start · API Tokens


60-second CLI start

From zero to a live, code-declared monitor in about a minute.

1. Install the CLI

@uptimewarden/cli is on npm. The source is at github.com/UptimeWarden/cli.

npm install -g @uptimewarden/cli

The binary is uw. Verify with:

uw --version

Requires Node.js 20+. Install instructions: nodejs.org.

2. Get an API token

In the UptimeWarden dashboard go to More › Developers › API & Tokens, open the API tokens tab and use Create API token with the Monitor Manager permission group. Copy the token (uptw_…).

3. Authenticate the CLI

uw auth login --token uptw_xxx

This writes ~/.uw/config.json with mode 0600. To verify:

uw auth status
# authenticated base=https://app.uptimewarden.online

4. Declare a monitor

Create monitors.uw.json:

{
  "monitors": [
    {
      "externalId": "homepage-prod",
      "name": "Homepage",
      "type": "http",
      "url": "https://example.com",
      "interval": 60
    }
  ]
}

The CLI config file is JSON.

5. Plan the change

uw apply -f monitors.uw.json

You will see a colored plan:

Plan:
  + create  1
  ~ update  0
  - delete  0
    + homepage-prod (Homepage)
Run with --yes to apply

6. Apply

uw apply -f monitors.uw.json --yes

The monitor is created in UptimeWarden. That is it, your first code-declared monitor is live.

What's next

Bu sayfayı Türkçe okuyun