Developers

API tokens

Create, scope, rotate, and revoke UptimeWarden API tokens with granular permissions, time-bounded access, and pre-built permission groups.

In the app: More › Developers › API & Tokens › API tokens

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

PermissionAccessLimits
monitors:readList monitors and their status; read the overall status summary (GET /api/v1/status/overall)None
monitors:createCreate new monitors and update existing onesSubscription monitor cap
monitors:deleteDelete monitorsNone
monitors:results:readRead check results and stats7-day history range (results default to 24 hours, stats to 7 days)

Incident permissions

PermissionAccessLimits
incidents:readList incidents30-day history range (7 days by default; incidents still open are always listed)
incidents:updateUpdate status / resolutionNone
incidents:commentAdd timeline commentsNone

SSL permissions

PermissionAccessLimits
ssl:status:readRead SSL certificate statusNone

Security analysis permissions

PermissionAccessLimits
security:analysis:readRead the latest analysis of a monitor (GET /api/v1/security/monitors/{id}/analysis)Needs the plan's security-headers feature
security:analysis:monitorPart 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:websitePart 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

PermissionAccessLimits
health:predictions:readRead AI health predictionsOwned monitors only

Deploy & maintenance permissions

For CI/CD pipelines (e.g. GitHub Actions deploy notifications):

PermissionAccessLimits
deploys:readList and inspect recorded deploy markersYour own deploys
deploys:writeRecord and finalise deploy markersmonitorPublicIds must be your own monitors or ones a team shares with you
monitors:maintenance:readList active maintenance windows on owned monitorsNone
monitors:maintenance:writeOpen and close maintenance (mute) windows on owned monitorsNone

Alert source permissions

Available only where alert sources are turned on for your account. See Alert sources for the endpoints.

PermissionAccessLimits
alert_sources:readList alert sources, read one and list the tools you can chooseNone
alert_sources:writeAdd, change and delete alert sources, create a new address and preview a field mappingNone

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.

PermissionAccessLimits
webhooks:read / webhooks:writeWebhook 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:writeStatus pages and the monitors on them (/api/v1/status-pages)Plan's status page count
on_call:read / on_call:writeEscalation 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:writeAPI tokens (/api/v1/api-tokens)A new token gets only permissions the calling token has, never admin, and cannot outlive it

Admin permission

PermissionAccessLimits
adminFull access to every v1 endpointStaff 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:

GroupUse casePermissions
Monitor ViewerRead-only dashboards, status displaysmonitors:read, monitors:results:read, ssl:status:read
Monitor ManagerInfrastructure-as-code, automated provisioning+ monitors:create, monitors:delete
Incident ManagerTicketing integrations, on-call automationincidents:read, incidents:update, incidents:comment
Security AnalystCompliance scans, security auditssecurity:analysis:read, security:analysis:monitor, security:analysis:website, ssl:status:read
Health MonitorAI prediction consumersmonitors:read, health:predictions:read
Deploy ManagerCI/CD deploy markers and mute windowsmonitors:read, deploys:read, deploys:write, monitors:maintenance:read, monitors:maintenance:write
Alert Source ManagerConnecting outside monitoring toolsalert_sources:read, alert_sources:write (only where alert sources are turned on)
Infrastructure as CodeThe Terraform providermonitors:read, monitors:create, monitors:delete, monitors:maintenance:*, webhooks:*, status_pages:*, on_call:*, api_tokens:*
Full AccessInternal tooling, break-glassEvery 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

  1. Sign in to the dashboard.
  2. In the left menu open More › Developers › API & Tokens, then the API tokens tab.
  3. Click Create API token.
  4. 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.
  5. 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:

  1. Create a new token with the same permissions.
  2. Roll the new token out to every consumer.
  3. Check that the old token's Last used time no longer moves.
  4. 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 429 carries a Retry-After header.

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.

Bu sayfayı Türkçe okuyun