API tokens
Create, scope, rotate, and revoke UptimeWarden API tokens with granular permissions, time-bounded access, and pre-built permission groups.
The UptimeWarden API is consumed from scripts, CI pipelines, dashboards, the CLI, and third-party integrations. A single all-powerful key is convenient but dangerous, any leak hands the attacker full control. UptimeWarden solves this with granular, permission-scoped tokens plus built-in time bounds on the most sensitive reads.
Token format
A token is a long, random string:
- 32 random bytes, base64url-encoded.
- Prefixed with
uptw_so it is recognisable in logs. - The first 12 characters (e.g.
uptw_abcd123) are stored as a public prefix you can reference; the remainder is hashed and never retrievable after creation.
The prefix is what surfaces in the token list and audit logs, so you can tell which token did what without exposing the secret.
Token lifetime
- Expiry. A token is created with an optional expiry. The web dialog offers 30, 90 or 365 days, or never; the default is 90 days. After the expiry the token answers
401. - Turned off stays off. A token can be turned off by its owner, by a password reset or by an account suspension. It cannot be turned back on; create a new token.
- Account state. Tokens stop working when the owner's account is deactivated or deleted.
- MCP apps connected with OAuth. Each shows in the list as one token named
MCP: <app name>. Deleting it disconnects the app. See MCP server for details.
Permission model
Permissions follow a <resource>:<action> pattern. Each token carries a list of permissions; on every request, the API checks that the token holds the permission required by the endpoint.
Monitor permissions
| Permission | Access | Limits |
|---|---|---|
monitors:read | List monitors and their status; read the overall status summary (GET /api/v1/status/overall) | None |
monitors:create | Create new monitors and update existing ones | Subscription monitor cap |
monitors:delete | Delete monitors | None |
monitors:results:read | Read check results and stats | 7-day history range (results default to 24 hours, stats to 7 days) |
Incident permissions
| Permission | Access | Limits |
|---|---|---|
incidents:read | List incidents | 30-day history range (7 days by default; incidents still open are always listed) |
incidents:update | Update status / resolution | None |
incidents:comment | Add timeline comments | None |
SSL permissions
| Permission | Access | Limits |
|---|---|---|
ssl:status:read | Read SSL certificate status | None |
Security analysis permissions
| Permission | Access | Limits |
|---|---|---|
security:analysis:read | Read the latest analysis of a monitor (GET /api/v1/security/monitors/{id}/analysis) | Needs the plan's security-headers feature |
security:analysis:monitor | Part of the Security Analyst group. The analyze endpoint it was meant for (POST /api/v1/security/monitors/{id}/analyze) answers 501 for now | - |
security:analysis:website | Part of the Security Analyst group. The analyze endpoint it was meant for (POST /api/v1/security/analyze) answers 501 for now | - |
Security analysis runs on a schedule; you read its result with security:analysis:read.
Health prediction permissions
| Permission | Access | Limits |
|---|---|---|
health:predictions:read | Read AI health predictions | Owned monitors only |
Deploy & maintenance permissions
For CI/CD pipelines (e.g. GitHub Actions deploy notifications):
| Permission | Access | Limits |
|---|---|---|
deploys:read | List and inspect recorded deploy markers | Your own deploys |
deploys:write | Record and finalise deploy markers | monitorPublicIds must be your own monitors or ones a team shares with you |
monitors:maintenance:read | List active maintenance windows on owned monitors | None |
monitors:maintenance:write | Open and close maintenance (mute) windows on owned monitors | None |
Alert source permissions
Available only where alert sources are turned on for your account. See Alert sources for the endpoints.
| Permission | Access | Limits |
|---|---|---|
alert_sources:read | List alert sources, read one and list the tools you can choose | None |
alert_sources:write | Add, change and delete alert sources, create a new address and preview a field mapping | None |
Infrastructure as code permissions
For the Terraform provider and other provisioning tools. The routes under /api/v1 mirror the dashboard's and run its own validation, plan limits and ownership checks.
| Permission | Access | Limits |
|---|---|---|
webhooks:read / webhooks:write | Webhook endpoints and their alarm templates (/api/v1/webhooks/configs) | Secrets stay masked; the signing secret is returned once on create. An unknown field in the body is refused with 400 |
status_pages:read / status_pages:write | Status pages and the monitors on them (/api/v1/status-pages) | Plan's status page count |
on_call:read / on_call:write | Escalation policies and on-call schedules (/api/v1/on-call/policies, /api/v1/on-call/schedules) | Public ids only: send targetPublicId / userPublicId |
api_tokens:read / api_tokens:write | API tokens (/api/v1/api-tokens) | A new token gets only permissions the calling token has, never admin, and cannot outlive it |
Admin permission
| Permission | Access | Limits |
|---|---|---|
admin | Full access to every v1 endpoint | Staff only |
admin cannot be granted to customer tokens. It does not appear in the token dialog, and Full Access does not include it. Scope every token to a preset or to the individual permissions it needs.
Pre-built permission groups
The token-creation dialog offers one-click presets you can use as a starting point:
| Group | Use case | Permissions |
|---|---|---|
| Monitor Viewer | Read-only dashboards, status displays | monitors:read, monitors:results:read, ssl:status:read |
| Monitor Manager | Infrastructure-as-code, automated provisioning | + monitors:create, monitors:delete |
| Incident Manager | Ticketing integrations, on-call automation | incidents:read, incidents:update, incidents:comment |
| Security Analyst | Compliance scans, security audits | security:analysis:read, security:analysis:monitor, security:analysis:website, ssl:status:read |
| Health Monitor | AI prediction consumers | monitors:read, health:predictions:read |
| Deploy Manager | CI/CD deploy markers and mute windows | monitors:read, deploys:read, deploys:write, monitors:maintenance:read, monitors:maintenance:write |
| Alert Source Manager | Connecting outside monitoring tools | alert_sources:read, alert_sources:write (only where alert sources are turned on) |
| Infrastructure as Code | The Terraform provider | monitors:read, monitors:create, monitors:delete, monitors:maintenance:*, webhooks:*, status_pages:*, on_call:*, api_tokens:* |
| Full Access | Internal tooling, break-glass | Every permission on this page except admin |
After picking a preset you can add or remove individual permissions before creating the token.
Time-bounded permissions
Two permissions have a limited supported history range:
monitors:results:read: monitor results and stats reach at most 7 days back (results default to 24 hours, stats to 7 days).incidents:read: incidents reach at most 30 days back (7 days by default). Incidents that are still open are always listed, whatever their age.
You choose the window with days=N, timeRange (24h, 7d, 30d, or Nh / Nd), since=<RFC 3339> or startDate=<RFC 3339> with an optional endDate (exclusive). A window that reaches past the range returns 403 TIME_RANGE_EXCEEDED with the requested-vs-allowed values in details; a value that cannot be read returns 400 INVALID_TIME_RANGE. These ranges are independent of your plan's data-retention setting. For longer windows, use the dashboard.
Creating a token
- Sign in to the dashboard.
- In the left menu open More › Developers › API & Tokens, then the API tokens tab.
- Click Create API token.
- Set:
- Token Name: a label for your own use (e.g.
GitHub Actions deploy pipeline). - Permissions: pick a preset chip or tick permissions one by one.
- Expires: 30, 90 or 365 days, or never. The default is 90 days.
- Token Name: a label for your own use (e.g.
- Click Create token and copy the token from the dialog. Once you close it, the secret is gone for good.
Authenticating
Pass the token in the Authorization header:
GET /api/v1/monitors
Authorization: Bearer uptw_abcd1234...
The Bearer prefix is required; it is not case-sensitive. Raw tokens or query-string authentication are rejected.
Viewing usage
The token list shows each token's prefix, permissions, last-used time (Last used) and its request count for the last 30 days; a token that was never used shows Never. If you see a token in use that you did not expect, delete it. The same stats come from GET /api/user/api-tokens/{id}/usage.
Rotating a token
There is no "rotate" button, you delete and recreate, ideally with overlap:
- Create a new token with the same permissions.
- Roll the new token out to every consumer.
- Check that the old token's Last used time no longer moves.
- Delete the old token.
This overlap prevents a single point of failure. If you must rotate instantly because a token leaked, delete it immediately and accept a brief outage while the new token rolls out.
Revoking a token
The Delete button on a token in the token list removes it. In-flight requests complete; the next request on that token returns 401 Unauthorized. Delete leaked tokens the same day you discover them.
Audit trail
Token creation, permission changes, and deletion are recorded in the audit log alongside the actor, the token's public prefix, and the timestamp. See Audit Logging for the full event list.
Limits
- The number of active tokens per user is gated by your plan. Every MCP app connected with OAuth counts toward it.
- Per-minute rate limits apply per token: reads 120, writes 60, SSL and health predictions 60, security analysis reads 30, analyze 10, MCP 120 messages. See API getting started. A
429carries aRetry-Afterheader.
FAQ
Can I share a token across services? Technically yes, but don't. Per-service tokens let you rotate and revoke independently, and the Last used time is far more meaningful when each token has one consumer.
My token says "Forbidden" but I think it should work. The error response names the missing permission. Cross-check it against the API Endpoints reference.
Can I turn a token back on after it was turned off? No. A token turned off by its owner, by a password reset or by an account suspension stays off. Create a new token.
Does the token carry my plan's limits? Yes, limits are enforced at the account level, not the token level. A monitor-creation request from any of your tokens counts against your subscription's monitor cap.
Where is the machine-readable list of endpoints and permissions?
/api/docs/v1-openapi.json, the canonical OpenAPI 3.0 spec.
Related
- Audit Logging: what is recorded about token use
- Subscription Plans: token limits per plan
- API Quick Start: first
curlcall using a token - API Endpoints: permission required per endpoint