---
title: "Connect via REST API"
description: "Make your first UptimeMonitoring REST API call with curl and an API key."
doc_version: "1"
last_updated: "2026-06-02"
---

## Prerequisites

- An `umk_live_` API key from [app.uptimemonitoring.com](https://app.uptimemonitoring.com) — see [Authentication](/docs/authentication/)
- `curl` (any recent version)

## Make your first call

List your monitors:

```bash
curl https://api.uptimemonitoring.com/api/v1/monitors \
  -H "Authorization: Bearer umk_live_..."
```

Replace `umk_live_...` with your actual API key.

## Create a monitor

```bash
curl -X POST https://api.uptimemonitoring.com/api/v1/monitors \
  -H "Authorization: Bearer umk_live_..." \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-api",
    "url": "https://example.com/healthz",
    "type": "http",
    "expected_status": "200"
  }'
```

See [Monitors](/docs/monitors/) for the full field reference and response shape.

## Verify

A successful list call returns `200 OK` with a JSON array. A successful create call returns `200 OK` with a `{monitor, state}` envelope. If you see `401`, check the common errors below.

## Common errors

| Symptom | Cause | Fix |
|---------|-------|-----|
| `401 Unauthorized` | Key prefix wrong or key revoked | Confirm the key starts with `umk_live_` — see [Authentication](/docs/authentication/#api-key-format) |
| `429 Too Many Requests` | Rate limit exceeded | See [Rate Limits](/docs/rate-limits/) |
| `400` on create | Invalid request body | See [Errors](/docs/errors/) — the envelope is `{"error":"<message>"}`, not RFC 7807 |

## Want this through an agent?

Connect UptimeMonitoring to your AI agent instead of calling the REST API directly:

- [Connect Claude Code](/docs/connect-claude-code/)
- [Connect ChatGPT](/docs/connect-chatgpt/)
- [Connect Cursor](/docs/connect-cursor/)
- [Connect via OpenAI API](/docs/connect-openai-api/)

## See also

- [MCP reference and host compatibility matrix](/docs/mcp/)
- [Monitors](/docs/monitors/) — full REST API reference
- [Authentication](/docs/authentication/) — key rotation and scopes