Skip to content

DownBad API Request Refused

The DownBad API is what a script, CI job or agent calls with an API key (the secret string starting with dbk_) in place of signing in. This page takes you from a refused request to one that works. How to call the API is in Use the DownBad API.

Your program got an error answer instead of data. The body looks like this:

{
"error": {
"code": "INSUFFICIENT_PERMISSIONS",
"message": "…",
"details": { "rule": "read_only", "helpUrl": "…" }
}
}

details.rule names the rule that refused the request. Find it in the table and go to its section under Fix it.

Statusdetails.ruleSection
401token_missingNo token was sent
401token_invalidThe token is not recognized
401token_expiredThe token expired
401token_revokedThe token was revoked
401member_removedThe person who made the key left the account
403account_pending_deletionThe account is scheduled for deletion
403viewer_read_onlyYour role can only read
403read_onlyThe token can only read
403free_plan_read_onlyThe Free plan can only read
403plan_limitA plan limit was reached
403plan_featureThe plan does not include this feature
429rate_limitToo many requests
429address_rate_limitToo many requests from one address
429health_check_limitToo many health checks from one address
503health_check_busyThe health check is busy
429recheck_monitor_spacingThe monitor was rechecked moments ago
429recheck_monitor_hourlyThe monitor was rechecked too often this hour
429recheck_account_hourlyThe account made too many rechecks this hour
409recheck_not_possibleThis monitor cannot be rechecked
503recheck_unavailableRechecks are unavailable
429feedback_limitToo much feedback in an hour
429confirmation_limitThe confirmation message was held back

A 404 with code NOT_FOUND means the monitor id isn’t in the key’s account. See The monitor was not found. For an incident id, see The incident was not found.

Each refusal above is DownBad applying a rule to your key or account, not an outage, and a refused request changes nothing. An outage answers with a 5xx status instead; check DownBad’s status for those, or ask the API, with no key needed:

Terminal window
curl -s https://downbad.app/api/public/v1/status

"status": "operational" means DownBad’s own services are working, and the problem is in the request. degraded or outage lists the affected part in components, with the time in UTC it was last known to work.

Send the simplest request there is, a list of your monitors, with the key your program uses. Put the key in an environment variable first, so it doesn’t land in your shell history:

Terminal window
export DOWNBAD_API_KEY='dbk_…'
curl -s -i https://downbad.app/api/public/v1/monitors \
-H "Authorization: Bearer $DOWNBAD_API_KEY"
If the key works
HTTP/2 200
x-ratelimit-limit: 60
x-ratelimit-remaining: 59
{"monitors":[…]}
If it is refused
HTTP/2 401
www-authenticate: Bearer realm="DownBad API", error="invalid_token", …
{"error":{"code":"TOKEN_REVOKED", …, "details":{"rule":"token_revoked", …}}}

If a read works but your program’s change is refused, the key works and the refusal is about changing things: see the 403 sections.

The request had no Authorization header, so DownBad doesn’t know who is asking.

  1. Send the key in the Authorization header as Bearer, a space, then the key: Authorization: Bearer dbk_….

  2. If your program reads the key from a setting or environment variable, check that the setting is present where the program runs, for example in your CI service’s secret settings.

DownBad has no key matching what was sent, or the header isn’t in the Bearer <key> form.

  1. Check the header is exactly Authorization: Bearer followed by the whole key, with no quotes, line breaks or extra spaces.

  2. Check the whole key was copied: it starts with dbk_ and is 55 characters long. Compare its first 12 characters with the list under Account › API keys.

  3. If you can’t find the key’s row, the key was never made in this account or was copied wrong. A key can’t be shown again, so make a new one. See Create a key.

Access tokens an app gets by signing in to DownBad for you expire after a while. API keys never expire.

  1. Have the app that uses the token sign in to DownBad again to get a new one.

Someone on your account revoked the key, so it is refused on every request. A revoked key can’t be turned back on.

  1. Make a new key with the same name and scope. See Create a key.

  2. Put the new key in your program’s settings in place of the old one.

The person who made the key left the account

Section titled “The person who made the key left the account”

A key acts for the person who made it. That person is no longer a member of the account, so the key acts for nobody.

  1. Have a current member make a new key under Account › API keys and put it in your program’s settings.

  2. Revoke the old key so it’s gone from the list.

Someone asked for the account to be deleted. Until that is cancelled, the API is closed to it.

  1. If the deletion was a mistake, an Owner can cancel it in DownBad under Account. The API answers again straight away.

A key acts with the role its maker has on the account right now. The person who made this key is a Viewer, who can read but not change anything. This happens when someone made a Read and write key as an Editor and was later changed to Viewer.

  1. Ask an Owner to make that person an Editor again. The same key can change things from its next request.

  2. Or have an Owner or Editor make a new Read and write key for the program, and revoke this one.

The key’s scope is Read: it can look at your monitors and incidents but not change them. A key’s scope can’t be changed after it is made.

  1. If the program only needs to look, stop it making the change and keep the key.

  2. If it has to change things, have an Owner or Editor make a Read and write key, put it in the program, then revoke the read key.

On the Free plan, the API can read your account but can’t change anything. The refusal’s details.upgradeUrl is where to upgrade.

  1. Make the change in DownBad itself, which the Free plan allows.

  2. Or upgrade on the Account page under Plan (the address in details.upgradeUrl), then retry the request with the same key.

The change would take your account past a limit of its plan, such as its number of monitors (max_monitor_count) or of heartbeats (max_heartbeat_count). The refusal’s details names the limit as featureKey, the plan’s allowance as limit, how many your account has now as current, and where to upgrade as upgradeUrl. current is the same used figure GET /api/public/v1/plan reports.

  1. Make room within the limit: for example, delete a monitor you no longer need, then retry.

  2. Or upgrade at the address in details.upgradeUrl, then retry.

Email addresses on channels count against the plan too: a channel create or a recipients change that would take the account past its allowance is refused with featureKey max_email_recipients. Remove an address from another channel, or upgrade, then retry.

A check interval faster than your plan allows is refused the same way, with featureKey min_check_interval_seconds, the fastest interval your plan allows as limit and the interval you asked for as current. Use limit seconds or slower, or upgrade for faster checks.

The change uses a feature your plan doesn’t include. details.featureKey names it:

featureKeyFeature
javascript_rendering_enabledLoading the page in a browser before judging
response_assertions_enabledResponse assertion rules
notification_channel_webhook_enabledWebhook channels
quiet_hours_enabledQuiet hours, the account’s or a channel’s
notification_profiles_enabledCreating or changing alert profiles
  1. Send the change without that setting. The message says which field to leave out.

  2. Or upgrade at the address in details.upgradeUrl, then retry.

Starting maintenance (POST /api/public/v1/maintenance-windows) is refused the same way on a plan without maintenance windows, with featureKey maintenance_enabled and the code FEATURE_NOT_ENABLED. Upgrade, then retry. Ending a window and listing windows work on every plan.

Each key may make 60 requests in any 60 seconds, reads included. This key made more. The answer has a Retry-After header and details.retryAfter (both in seconds) and details.retryAt (the time in UTC) saying when the next request will be accepted. Refused requests don’t count, so waiting that long is enough.

  1. Wait the number of seconds in Retry-After, then retry.

  2. Spread your program’s requests out: watch X-RateLimit-Remaining on each answer and slow down as it nears 0.

  3. Read once and reuse the answer instead of asking again: one list of monitors answers questions about all of them.

The answer is 429 with the rule address_rate_limit. One address may make 100 requests in any 60 seconds, whatever key each one carries. Every key used from that address counts toward it, and so do the MCP server and DownBad open in a browser on the same network. The address is checked before the key, so this can refuse a key that is under its own limit. Retry-After and details.retryAfter (both in seconds) and details.retryAt (the time in UTC) say when the next request will be accepted if you send nothing before then. details.limit and details.windowSeconds give the allowance. Refused requests count here, so each early retry moves that time later.

  1. Stop sending, wait until details.retryAt, then retry once.

  2. If several programs or keys run from one machine or CI runner, they share that address’s allowance: slow them down so together they stay under 100 requests a minute.

  3. Read once and reuse the answer instead of asking again.

The health check without an account (POST /api/public/v1/health-check) allows each address 5 checks in any hour and 20 in any day. Your address used one of those up. details.window says which (hour or day), details.limit its allowance, and Retry-After, details.retryAfter (in seconds) and details.retryAt (the time in UTC) when the next check will be accepted. Refused requests don’t count, so waiting that long is enough.

  1. Wait until details.retryAt, then retry.

  2. Reuse an answer instead of checking the same domain again: a domain checked in the last few minutes answers with the same findings, marked "cached": true, and still counts against your address.

  3. To watch a domain all the time, add it to a DownBad account. Its monitors check it on a schedule and have no such limit.

The answer is 503 with code SERVICE_UNAVAILABLE. DownBad could not start a fresh check right now, for everyone, not only you. details.reason says why:

  • capacity: as many checks are running at once as DownBad allows.
  • domain_cooldown: someone checked this domain moments ago, and its result isn’t ready yet.
  • hourly_budget: DownBad has run as many fresh checks this hour as it allows for callers without an account.

This refusal doesn’t count against your address.

  1. Wait the seconds in Retry-After (also details.retryAfter, with the time as details.retryAt), then retry once.

  2. For domain_cooldown, the retry usually returns the first check’s result with "cached": true.

The answer is 400 with code VALIDATION_ERROR. A heartbeat isn’t checked on an interval: it waits for your job to call its ping URL, on the schedule in config.schedule. So intervalSeconds is refused on a heartbeat’s create or change.

  1. Leave intervalSeconds out, and set how often the job runs in config.schedule, such as { "type": "interval", "periodSeconds": 3600 }.

  2. Send the request again.

The answer is 400 with code VALIDATION_ERROR, and the message names the problem. Nothing was started. The usual causes:

  • No bundle or monitor named. Send at least one id in bundleIds or monitorIds.
  • Both endsAt and durationMinutes were sent. Send one, or neither to keep the window until you end it.
  • endsAt is in the past. Send a later time, in UTC, or use durationMinutes.
  • The bundles hold no monitors. Name bundles that have monitors, or name the monitors directly.
  1. Read error.message and fix the field it names.

  2. Send the request again. If it answers 201, the window is running: check that coveredMonitorIds lists the monitors you expect.

The bundle or maintenance window was not found

Section titled “The bundle or maintenance window was not found”

The answer is 404 with code NOT_FOUND. A bundle, monitor or window id in the request isn’t in the key’s account. When starting maintenance, one unknown id refuses the whole request and nothing is started.

  1. List your bundles with GET /api/public/v1/bundles, your monitors with GET /api/public/v1/monitors, or the windows running now with GET /api/public/v1/maintenance-windows, and use an id from that list.

  2. If the window ended on its own, it is no longer listed. Ending it again isn’t needed.

The monitor id isn’t in the key’s account. It may have been deleted, or the id came from another account: a key only ever sees the account it was made in.

  1. List your monitors with GET /api/public/v1/monitors and use an id from that list.

  2. If the monitor is in another DownBad account you belong to, use a key made in that account.

A channel or alert profile id that isn’t in the key’s account answers 404 the same way. List them with GET /api/public/v1/channels or GET /api/public/v1/profiles and use an id from that list.

The incident id isn’t in the key’s account. The dossier and notes take an incident’s own id, not its monitor’s.

  1. List the open incidents with GET /api/public/v1/incidents?status=open and use an id from that list.

  2. If the incident is in another DownBad account you belong to, use a key made in that account.

The answer is 429 with the rule recheck_monitor_spacing. A monitor can be rechecked once every 2 minutes, and this one was rechecked less than 2 minutes ago. No probe was sent, and this refusal didn’t count.

  1. Wait until details.retryAt (also Retry-After, in seconds), then recheck once.

  2. Read the first recheck’s answer instead of rechecking again: the regions answered then, and a second recheck seconds later tells you little more.

The monitor was rechecked too often this hour

Section titled “The monitor was rechecked too often this hour”

The answer is 429 with the rule recheck_monitor_hourly. A monitor can be rechecked 10 times in any hour, and this one has been. No probe was sent. details.current is how many rechecks the hour holds, and details.retryAt when the oldest leaves it.

  1. Wait until details.retryAt, then recheck.

  2. If your program rechecks after every change it tries, have it read the incident’s dossier first and change one thing at a time: the monitor’s own checks keep running on its schedule meanwhile.

The account made too many rechecks this hour

Section titled “The account made too many rechecks this hour”

The answer is 429 with the rule recheck_account_hourly. An account’s monitors can be rechecked 30 times in any hour, all of them together, and yours have been. No probe was sent.

  1. Wait until details.retryAt, then recheck.

  2. Recheck only the monitors whose fix you just made. The rest still check on their own schedule.

The answer is 409 with the rule recheck_not_possible, and no probe was sent. The message says which of these it is:

  • The monitor is paused. Resume it with POST /api/public/v1/monitors/MONITOR_ID/resume, then recheck it.
  • The monitor is held for review or disabled, so DownBad sends it no checks. Open it in DownBad to see why.
  • The monitor’s kind is not checked from probe regions: WHOIS, blocklist and heartbeat monitors can’t be rechecked. Their own checks still run on their schedule; for a heartbeat, send the ping your job sends.
  1. Do what the message says for your case, then recheck if it applies.

The answer is 503 with the rule recheck_unavailable. This DownBad server couldn’t run a recheck: rechecks are switched off on it, its limits could not be read, the probe regions could not be asked, or none of them answered. Nothing was counted against your limits and nothing was recorded on the incident.

  1. Wait a few minutes, then try once more.

  2. Meanwhile, read the incident’s dossier: the monitor’s own checks still run on its schedule, and the incident closes when one passes.

  3. If it keeps happening, check DownBad’s own status.

You added an email channel, or an address to one, through the API, and nothing arrives at that address, though the channel’s other addresses get alerts. An address added through the API that isn’t the verified sign-in address of someone on your account must be confirmed by its owner before DownBad sends it anything; until then every alert and test skips it, and a channel with no other address sends nothing (its test answers "delivered": false). In GET /api/public/v1/channels/{id}, verification is pending and that address shows "addedVia": "public_api" and "confirmed": false; the alerting explanation lists it under unconfirmedRecipients.

  1. Ask the person at that address to open the message titled Confirm this address for DownBad alerts and click its link. Check their spam folder. The link works for 7 days.

  2. If it’s lost or expired, send it again: POST /api/public/v1/channels/{id}/verification.

  3. If the address is wrong, take it off the channel: PATCH with recipients without it.

Asking for the confirmation message again answers 409 when one went to the channel or one of its addresses less than a minute ago, or when every address is already confirmed, and 429 with the rule confirmation_limit once the account has sent 10 of them in the past hour. A channel create or change that was held back the same way still saves the channel and says why in confirmationHeldBack.

  1. Check the inbox, spam included: the last message is usually there.

  2. Wait the seconds in Retry-After (or details.retryAfter; for the 429, until details.retryAt), then ask once more with POST /api/public/v1/channels/{id}/verification.

Deleting an alert profile answers 409 while a monitor, bundle or group still alerts through it. details.monitorCount says how many monitors do.

  1. Move each monitor to another profile: PATCH /api/public/v1/monitors/{id} with a new notificationProfileId. Move bundles and groups in DownBad.

  2. Delete the profile again.

The answer is 429 with the rule feedback_limit. One person can send 20 feedback items an hour, counted across the app and the API together, and the person who made this key has. Everything already sent is saved, and each has its own FB reference. details.retryAt (also Retry-After, in seconds) is when one more fits.

  1. Wait until details.retryAt, then send it.

  2. If your program sends one item per event, have it collect them and send one item that lists them instead.

The answer is 404 with code NOT_FOUND for GET /api/public/v1/feedback/FB-…. The reference isn’t one of this account’s feedback items: it is mistyped, or it was sent from another DownBad account.

  1. Check the reference as the answer to POST /api/public/v1/feedback gave it: FB- and six characters. Letter case doesn’t matter.

  2. If it was sent from another DownBad account you belong to, use a key made in that account.

A false-alarm report is a change, so it follows the same rules as every change:

  1. Fix what the message names, then send the report again.

Run the request from Check it yourself again with the key your program now uses. A 200 with your monitors means the key works. In Account › API keys, that key’s Last used time moves to now (it updates at most once a minute). Then let your program retry the change.

Before you ask for help, collect:

  • the key’s name and its first 12 characters as the list shows them, never the whole key
  • the method and address your program called, such as PATCH /api/public/v1/monitors/…
  • the refusal’s status, code, message and details.rule, word for word, and when it happened
  • the x-request-id header from the answer, if your program kept it

Then send all of it to us through Contact Us.