> ## Documentation Index
> Fetch the complete documentation index at: https://docs.corsair.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# UptimeRobot plugin

> Website and API monitoring with UptimeRobot - create, update, pause and delete monitors of any type, read uptime and response-time statistics, triage incidents and their comments, and manage status pages, announcements, maintenance windows, groups and tags.

Use **UptimeRobot** through Corsair: one client, typed API calls.

Create a key in UptimeRobot under Integrations & API, API keys. Calls go to `https://api.uptimerobot.com/v3` with the key as a Bearer token.

* **This is the v3 API.** The older v2 form-encoded API at `/v2` still exists but is not what this plugin wraps; v3 is JSON in and JSON out, with DELETE, PATCH and per-resource paths. The full contract is published as an OpenAPI document at `https://cdn.uptimerobot.com/api/openapi.yaml`.
* **A failure is always `{ code, message }`.** The `code` is stable and grouped by area — `003-*` is authentication, `009-*` is resources and validation, `026-*` is status pages. A wrong or revoked key answers `401` with `003-005`. A validation failure instead sends `message` as an *array* of per-field strings, and the plugin keeps them on `details`.
* **Creating a monitor depends on its type.** The input schema takes the union of all ten types and checks it against the one you chose: `HEARTBEAT` needs no `url` at all and rejects one, `THIRD_PARTY_SERVICE` needs only `config`, `PORT` and `UDP` need a `port`, `KEYWORD` needs `keywordType`, `keywordCaseType` and `keywordValue`, `HTTP`, `KEYWORD`, `PING`, `PORT`, `API` and `UDP` need a `timeout` (UptimeRobot answers 400 without one), `DNS`, `API`, `UDP` and `VISUAL_COMPARISON` need `config`, and everything else needs a `url`. A mismatch is reported before any request is made.
* **Pausing is not deleting.** `monitors.pause` stops the checks and the alerts and is reversible with `monitors.start`; UptimeRobot also pauses a monitor by itself after repeated failures, and `monitors.start` resumes that too. `monitors.delete` removes the monitor and its history for good.
* **`monitors.reset` discards history, not the monitor.** It clears the accumulated statistics and incident log while the monitor keeps checking, so it is marked destructive even though the monitor survives.
* **The interval floor is 30 seconds in the contract.** The free plan enforces a much higher floor (five minutes), and asking for less is refused by the API rather than silently raised.
* **Paging is a link, and a page can be empty.** Lists answer `nextLink`, which stays set while more pages remain. With a filter on `incidents.list`, a page can hold fewer items than `limit`, or none at all, while `nextLink` is still present — so page on the link, not on the item count. `tags.list` is the exception: it pages by `nextCursorId` instead.
* **A status page can show everything.** `monitorIds: [0]` on its own is the sentinel for every monitor in the account, and an empty array shows none. `autoAddMonitors` covers monitors created later, but an explicit `monitorIds` wins over it — including an empty one.
* **Rate limits are tight on the free plan.** It allows 10 requests a minute; paid plans allow twice the monitor limit, capped at 5,000. A `429` was refused before it ran, so the plugin retries it up to three times with backoff, honouring `Retry-After`.

**What you get:**

* 31 typed API operations

## Setup

**1. Install**

```bash npm theme={null}
npm install corsair @corsair-dev/uptimerobot better-sqlite3
npm install --save-dev @types/better-sqlite3
```

```bash yarn theme={null}
yarn add corsair @corsair-dev/uptimerobot better-sqlite3
yarn add --dev @types/better-sqlite3
```

```bash pnpm theme={null}
pnpm install corsair @corsair-dev/uptimerobot better-sqlite3
pnpm install --save-dev @types/better-sqlite3
```

```bash bun theme={null}
bun add corsair @corsair-dev/uptimerobot better-sqlite3
bun add --dev @types/better-sqlite3
```

**2. Add the plugin**

```ts corsair.ts theme={null}
import Database from 'better-sqlite3';
import { createCorsair } from 'corsair';
import { uptimerobot } from '@corsair-dev/uptimerobot';

export const corsair = createCorsair({
	plugins: [
		uptimerobot(),
	],
	database: new Database('corsair.db'),
	kek: process.env.CORSAIR_KEK!,
	multiTenancy: true,
	hub: {
		projectApiKey: process.env.CORSAIR_API_KEY!,
		signingSecret: process.env.CORSAIR_SIGNING_SECRET!,
	},
});
```

With `multiTenancy: true`, scope calls with `corsair.withTenant(id)`. See [Quick start](https://docs.corsair.dev/quick-start.md) for KEK + Hub keys, and [Multi-tenancy](https://docs.corsair.dev/concepts/multi-tenancy.md) for account isolation.

**3. Choose authentication**

> [tab] API Key (Recommended)
>
> No setup required yet. When you make your first request as a tenant, Corsair prompts for the API key.
>
> ```ts theme={null}
> uptimerobot()
> ```
>
> More: [API Key](https://docs.corsair.dev/concepts/api-key)

**4. Connect a tenant**

Mint a connect link and send the tenant to it. Hub hosts the page and delivers the result to your app — see [Connect / OAuth](https://docs.corsair.dev/management/connect).

```ts theme={null}
const { connectUrl } = await corsair.manage.connect.createLink({
	plugin: 'uptimerobot',
	tenantId: 'acme',
});
// redirect the user's browser to connectUrl
```

## Example API calls

**List monitors that are down or look down**

```ts theme={null}
const tenant = corsair.withTenant('acme');
await tenant.uptimerobot.api.monitors.list({
	status: ['DOWN', 'LOOKS_DOWN'],
});
```

**Tighten a storefront check to every minute**

```ts theme={null}
const tenant = corsair.withTenant('acme');
await tenant.uptimerobot.api.monitors.update({ id: 778001, friendlyName: 'Acme storefront', interval: 60 });
```

See the full list on the [API](https://docs.corsair.dev/plugins/uptimerobot/api.md) page.

## What's next

> [card] [API reference](https://docs.corsair.dev/plugins/uptimerobot/api.md)
>
> Every `uptimerobot.api.*` operation with input and output types.

> [card] [Connect / OAuth](https://docs.corsair.dev/management/connect)
>
> createLink, Hub delivery, and tenant connect flows.

> [card] [Use with agents](https://docs.corsair.dev/mcp-adapters/mcp-adapters)
>
> Expose this plugin's operations as MCP tools.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.