Authentication
Every Happy Uptime API request requires a Bearer token. Keys are prefixed with hu_ and scoped to a single project.
Authentication
All API requests require a Bearer token. API keys are prefixed with hu_ and are project-scoped.
curl -H "Authorization: Bearer hu_live_abc123..." \
https://happyuptime.com/api/v1/monitorsconst res = await fetch("https://happyuptime.com/api/v1/monitors", {
headers: { Authorization: "Bearer hu_live_abc123..." }
});Auth header format
Use the header exactly as shown above. Happy Uptime accepts API keys via Authorization: Bearer hu_... only. X-API-Key, Basic auth, and raw token values are not supported.
Scopes
Each API key has a scope that determines what operations it can perform.
| Scope | Permissions |
|---|---|
read | GET endpoints only |
write | GET + POST + PUT + DELETE |
admin | Full access including API key management |
Troubleshooting 401 responses
Use the exact base URL: https://happyuptime.com/api/v1. A missing /api/v1 prefix is the most common cause.
Send Authorization: Bearer hu_... on every request — not X-API-Key, not Basic auth.
If a key was copied incorrectly or lost, create a new one in Dashboard → Settings → API Keys. Full keys are only shown once.
If the request is authenticated but the scope is too low, the API returns 403 instead of 401.