---
title: "Connect via REST API"
description: "Make your first Monitive REST API call with curl and an API key."
doc_version: "1"
last_updated: "2026-11-19"
---

## Prerequisites

- An `mk_live_` API key from [my.monitive.com](https://my.monitive.com) — see [API keys](/docs/api-keys/)
- `curl` (any recent version)

## Make your first call

List your monitors:

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

The API's address is `https://api.monitive.com`.

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

## Create a monitor

```bash
curl -X POST https://api.monitive.com/api/v1/monitors \
  -H "Authorization: Bearer mk_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 `mk_live_` — see [API keys](/docs/api-keys/#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 Monitive 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
- [API keys](/docs/api-keys/) — key format and rotation