Most uptime checks fetch one URL with no credentials. That works for a homepage. It doesn't work for the part of your API that matters, because that part sits behind a login.
So teams settle for one of three workarounds, and each one leaves a gap.
Three Workarounds, Three Gaps
Checking only the public health endpoint
/health answers without a token, so it's easy to monitor. But it doesn't touch your auth service, your token validation, or the permission checks on real endpoints. It can be green while every signed-in request fails.
Pasting a token into a header
A fixed Authorization: Bearer header gets the check past the login once. Then the token expires, and the check fails at 3 a.m. for a reason that has nothing to do with your API. The usual fix is a token that never expires, which is a credential you'd rather not have. Either way, the login itself is never tested.
Writing a script
A cron job with curl and jq can log in and call the endpoint. Now you have a script to maintain, credentials to store, results to alert on, and a cron job that needs monitoring of its own.
What Breaks Behind a Login
- The auth provider is down or slow. Logins time out, and everything after them fails.
- Tokens are issued but rejected. A signing key rotated, the expected audience changed, or a server's clock drifted. The login returns 200 and the next call returns 401.
- The session cookie stops coming back. A change to the cookie's domain or SameSite setting means clients never send it again.
- A permission regression. A deploy changes a role check, and a normal user gets 403 on an endpoint they need.
- The right status, the wrong data. The tenant lookup fails, and the endpoint returns 200 with an empty list.
None of these show up on a public health check. All of them show up the moment a real client logs in and asks for data.
Monitor the Flow, Not One Endpoint
The fix is to do what a client does, on every run: log in, keep the token from the response, call the endpoint with it, and check what comes back. Each run gets a fresh token, so an expired one never causes a false alarm, and the login is tested along with everything after it.
In Uptimy this is a multi-step API check: an HTTP check with more than one request, where a request can save values from its response for the ones after it.
Setting It Up
Say your API has a login endpoint that returns {"access_token": "..."}, and an orders endpoint that needs that token.
- The login request. Create an HTTP check. Pick POST and enter your login URL. Under Headers and body, put the monitoring account's credentials in the body. Under Checks, keep Status code is 200.
- Add the next request. Click Add request. Request 2 opens: set it to GET your orders endpoint.
- Save the token. Open request 1. Under Save from the response, click Save a value, name it
token, and take it from the JSON fieldaccess_token. - Use it. In request 2, add the header
Authorization: Bearer {{token}}. Request 2 lists the values saved before it; clicktokento copy the placeholder. - Check the data, not just the status. Give request 2 checks like Status code is 200, JSON field orders exists and Response time is below 1500 ms.
A check can have up to 10 requests, and any of them can save values for the next. Through the API or uptimyctl, here is the same check with a third request that opens the first order:
{
"steps": [
{
"name": "login",
"request": {
"method": "POST",
"uri": "https://api.example.com/auth/login",
"body": { "email": "[email protected]", "password": "..." }
},
"assertions": [{ "source": "status", "op": "eq", "value": 200 }],
"extract": [{ "var": "token", "source": "json", "path": "access_token" }]
},
{
"name": "orders",
"request": {
"method": "GET",
"uri": "https://api.example.com/orders",
"headers": { "Authorization": "Bearer {{token}}" }
},
"assertions": [
{ "source": "status", "op": "eq", "value": 200 },
{ "source": "json", "path": "orders", "op": "exists" },
{ "source": "response_time", "op": "lt", "value": 1500 }
],
"extract": [{ "var": "orderId", "source": "json", "path": "orders.0.id" }]
},
{
"name": "order details",
"request": {
"method": "GET",
"uri": "https://api.example.com/orders/{{orderId}}",
"headers": { "Authorization": "Bearer {{token}}" }
},
"assertions": [{ "source": "json", "path": "status", "op": "exists" }]
}
]
}What a Failure Looks Like
Requests run in order, and the run stops at the first one that fails. So the incident says where the flow broke, not just that it did. If the login works but the API rejects the token, the incident reads:
step 2 "orders": expected status code 200 but got 401The result lists every request that ran, with its status code, its time, and its own breakdown of DNS, connect, TLS and time to first byte. When a run is slow, you can see which request was slow.
Tokens stay out of your results
*** in check results, logs and error messages.Practical Tips
- Use a dedicated monitoring account. Give it read-only access, ideally in its own tenant or organization. Its credentials are stored with the check, like any HTTP check's headers and body, so never use a personal or admin account.
- Skip the interactive login. A monitoring account can't answer an MFA prompt. If your API supports OAuth client credentials or API keys, log in with those, for example a POST to
/oauth/tokenwith a client ID and secret. - Count the logins. Each region runs the whole flow on every run. Three regions at a one-minute interval is over 4,000 logins a day. Make sure that stays under your rate limits and doesn't flood your audit log, or check every five minutes instead.
- Cookie sessions work too. Cookies a response sets are sent with the later requests, so a session-based login needs nothing saved by hand.
- Mind the timeout. The check's timeout covers the whole run, not each request.
When to Use a Browser Check Instead
A multi-step API check talks to your API the way a client does. If what can break lives in the browser, like a login form, a redirect through an identity provider, or JavaScript that has to run, use a Playwright browser check. Many teams run both: the API check pinpoints which call failed, and the browser check proves a person can get through.
Multi-step API checks are included on the Growth plan and above. Single-request HTTP checks, with the same checks on status codes, keywords, JSON fields, headers and response time, are on every plan, including Free.
📌Key Takeaways
- 1A public health endpoint can be green while every signed-in request fails
- 2A pasted token expires, and it never tests the login itself
- 3Log in on every run, keep the token, and check the data that comes back
- 4Stopping at the first failed request tells you where the flow broke
- 5Use a dedicated read-only account, and count the logins against your rate limits