REST API
Learn how to create an API key, authenticate, and make your first requests.
This page explains how to authenticate against the UptimeX API and make your first requests. Every endpoint, with its parameters and response schema, is in the API reference.
#Base URL
All requests go over HTTPS to:
https://api.uptimex.coRequests and responses are JSON. Send Content-Type: application/json with a body.
#Authentication
The API authenticates with API keys. A key starts with upk_, is scoped to exactly one project, and acts with the role of the person who created it in that project. A key can read and write that project's monitors, channels, maintenance windows, incidents, and status page. It cannot reach account settings, billing, other projects, team members, or keys.
#Create a key
- Open the project's Project Settings and find Access tokens.
- Enter a name and choose when the key expires: 1 hour, 1 day, 7 days, 30 days, 90 days, or Never.
- Choose Create. The key is shown once. Copy it now.
Viewers cannot create keys. A key stops working when its creator leaves the project, and you can revoke any of your keys from the same list.
#Use the key
Send it as a Bearer token on every request:
Authorization: Bearer upk_your_keyKeys cannot create keys
#Rate limits
Requests made with API keys are limited per account, across all of the account's projects and keys: 30 requests a minute on the free plan, 120 on Pro, and 300 on Team. Over the limit, the API answers 429 with Retry-After: 60 and {"error":"rate_limited","limit":30}. See Errors.
#Create a monitor
Only url is required. This creates an HTTP monitor checked every 5 minutes:
curl -X POST https://api.uptimex.co/v1/monitors \
-H "Authorization: Bearer upk_your_key" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com", "name": "Marketing site", "interval_sec": 300 }'The response is the created monitor with HTTP status 201. Its status is null until the first check completes a moment later. Omitted fields take the defaults listed in Create a monitor, and interval_sec is raised to your plan's minimum if it is lower.
Set type to keyword, api, heartbeat, scheduler, port, or dns for the other kinds. Each takes the fields its dashboard form takes: host and port for a port monitor, host, dns_record_type, and dns_expected_value for DNS, interval_sec and grace_sec for a heartbeat.
#Test before saving
POST /v1/monitors/test takes the same body as an HTTP, Keyword, or API create and runs one check without saving anything:
curl -X POST https://api.uptimex.co/v1/monitors/test \
-H "Authorization: Bearer upk_your_key" \
-H "Content-Type: application/json" \
-d '{ "url": "https://example.com", "method": "GET" }'The response holds status, latency_ms, connect_ms, ttfb_ms, detail, http_status, and the first 4,096 characters of the body.
#Everyday calls
| Call | Purpose |
|---|---|
GET /v1/monitors | Every monitor in the key's project, with its status and last 30 checks. |
PATCH /v1/monitors/{id} | Change any field. Send {"enabled": false} to pause and true to resume. |
DELETE /v1/monitors/{id} | Delete the monitor and its history. |
GET /v1/monitors/{id}/events?limit=50 | The activity log, newest first, up to 200. |
GET /v1/monitors/{id}/history?range=24 | Chart data for the last N hours, up to your plan's retention. |
GET /v1/projects/{ref}/channels | The project's notification channels. |
GET /v1/projects/{ref}/maintenance | The project's maintenance windows. |
GET /v1/incidents?project={ref} | The project's incidents, ongoing first. Pro and Team. |
Lists are not paginated. Where a limit applies, its maximum is 200.
#Request headers on monitors
When you send request_headers on a PATCH, the list replaces the stored one. Leave the field out to keep the stored headers, send [] to remove them all, or send an entry with a name and no value to keep that header's stored value.
#The OpenAPI document
The document is served from the API itself, so you can point any client generator at it:
https://api.uptimex.co/openapi.jsonA rendered version lives at https://api.uptimex.co/docs, and the API reference in these docs is built from the same document.
#What's next?
- Errors: every error code and what to do about it.
- API reference: the full endpoint list.
- Connect an AI agent: the same key over MCP.