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.
What you’re seeing
Section titled “What you’re seeing”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.
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.
Is it you or us?
Section titled “Is it you or us?”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:
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.
Check it yourself
Section titled “Check it yourself”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:
export DOWNBAD_API_KEY='dbk_…'curl -s -i https://downbad.app/api/public/v1/monitors \ -H "Authorization: Bearer $DOWNBAD_API_KEY"HTTP/2 200x-ratelimit-limit: 60x-ratelimit-remaining: 59
{"monitors":[…]}HTTP/2 401www-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.
Fix it
Section titled “Fix it”No token was sent
Section titled “No token was sent”The request had no Authorization header, so DownBad doesn’t know who is
asking.
-
Send the key in the
Authorizationheader asBearer, a space, then the key:Authorization: Bearer dbk_…. -
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.
The token is not recognized
Section titled “The token is not recognized”DownBad has no key matching what was sent, or the header isn’t in the
Bearer <key> form.
-
Check the header is exactly
Authorization: Bearerfollowed by the whole key, with no quotes, line breaks or extra spaces. -
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. -
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.
The token expired
Section titled “The token expired”Access tokens an app gets by signing in to DownBad for you expire after a while. API keys never expire.
- Have the app that uses the token sign in to DownBad again to get a new one.
The token was revoked
Section titled “The token was revoked”Someone on your account revoked the key, so it is refused on every request. A revoked key can’t be turned back on.
-
Make a new key with the same name and scope. See Create a key.
-
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.
-
Have a current member make a new key under Account › API keys and put it in your program’s settings.
-
Revoke the old key so it’s gone from the list.
The account is scheduled for deletion
Section titled “The account is scheduled for deletion”Someone asked for the account to be deleted. Until that is cancelled, the API is closed to it.
- If the deletion was a mistake, an Owner can cancel it in DownBad under Account. The API answers again straight away.
Your role can only read
Section titled “Your role can only read”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.
-
Ask an Owner to make that person an Editor again. The same key can change things from its next request.
-
Or have an Owner or Editor make a new Read and write key for the program, and revoke this one.
The token can only read
Section titled “The token can only read”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.
-
If the program only needs to look, stop it making the change and keep the key.
-
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.
The Free plan can only read
Section titled “The Free plan can only read”On the Free plan, the API can read your account but can’t change anything.
The refusal’s details.upgradeUrl is where to upgrade.
-
Make the change in DownBad itself, which the Free plan allows.
-
Or upgrade on the Account page under Plan (the address in
details.upgradeUrl), then retry the request with the same key.
A plan limit was reached
Section titled “A plan limit was reached”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.
-
Make room within the limit: for example, delete a monitor you no longer need, then retry.
-
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 plan does not include this feature
Section titled “The plan does not include this feature”The change uses a feature your plan doesn’t include. details.featureKey names
it:
featureKey | Feature |
|---|---|
javascript_rendering_enabled | Loading the page in a browser before judging |
response_assertions_enabled | Response assertion rules |
notification_channel_webhook_enabled | Webhook channels |
quiet_hours_enabled | Quiet hours, the account’s or a channel’s |
notification_profiles_enabled | Creating or changing alert profiles |
-
Send the change without that setting. The message says which field to leave out.
-
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.
Too many requests
Section titled “Too many requests”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.
-
Wait the number of seconds in
Retry-After, then retry. -
Spread your program’s requests out: watch
X-RateLimit-Remainingon each answer and slow down as it nears 0. -
Read once and reuse the answer instead of asking again: one list of monitors answers questions about all of them.
Too many requests from one address
Section titled “Too many requests from one address”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.
-
Stop sending, wait until
details.retryAt, then retry once. -
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.
-
Read once and reuse the answer instead of asking again.
Too many health checks from one address
Section titled “Too many health checks from one address”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.
-
Wait until
details.retryAt, then retry. -
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. -
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 health check is busy
Section titled “The health check is busy”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.
-
Wait the seconds in
Retry-After(alsodetails.retryAfter, with the time asdetails.retryAt), then retry once. -
For
domain_cooldown, the retry usually returns the first check’s result with"cached": true.
A heartbeat was given an interval
Section titled “A heartbeat was given an interval”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.
-
Leave
intervalSecondsout, and set how often the job runs inconfig.schedule, such as{ "type": "interval", "periodSeconds": 3600 }. -
Send the request again.
Maintenance did not start
Section titled “Maintenance did not start”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
bundleIdsormonitorIds. - Both
endsAtanddurationMinuteswere sent. Send one, or neither to keep the window until you end it. endsAtis in the past. Send a later time, in UTC, or usedurationMinutes.- The bundles hold no monitors. Name bundles that have monitors, or name the monitors directly.
-
Read
error.messageand fix the field it names. -
Send the request again. If it answers
201, the window is running: check thatcoveredMonitorIdslists 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.
-
List your bundles with
GET /api/public/v1/bundles, your monitors withGET /api/public/v1/monitors, or the windows running now withGET /api/public/v1/maintenance-windows, and use anidfrom that list. -
If the window ended on its own, it is no longer listed. Ending it again isn’t needed.
The monitor was not found
Section titled “The monitor was not found”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.
-
List your monitors with
GET /api/public/v1/monitorsand use anidfrom that list. -
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 was not found
Section titled “The incident was not found”The incident id isn’t in the key’s account. The dossier and notes take an
incident’s own id, not its monitor’s.
-
List the open incidents with
GET /api/public/v1/incidents?status=openand use anidfrom that list. -
If the incident is in another DownBad account you belong to, use a key made in that account.
The monitor was rechecked moments ago
Section titled “The monitor was rechecked moments ago”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.
-
Wait until
details.retryAt(alsoRetry-After, in seconds), then recheck once. -
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.
-
Wait until
details.retryAt, then recheck. -
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.
-
Wait until
details.retryAt, then recheck. -
Recheck only the monitors whose fix you just made. The rest still check on their own schedule.
This monitor cannot be rechecked
Section titled “This monitor cannot be rechecked”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.
- Do what the message says for your case, then recheck if it applies.
Rechecks are unavailable
Section titled “Rechecks are unavailable”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.
-
Wait a few minutes, then try once more.
-
Meanwhile, read the incident’s dossier: the monitor’s own checks still run on its schedule, and the incident closes when one passes.
-
If it keeps happening, check DownBad’s own status.
An email address gets no alerts
Section titled “An email address gets no alerts”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.
-
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.
-
If it’s lost or expired, send it again:
POST /api/public/v1/channels/{id}/verification. -
If the address is wrong, take it off the channel:
PATCHwithrecipientswithout it.
The confirmation message was held back
Section titled “The confirmation message was held back”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.
-
Check the inbox, spam included: the last message is usually there.
-
Wait the seconds in
Retry-After(ordetails.retryAfter; for the429, untildetails.retryAt), then ask once more withPOST /api/public/v1/channels/{id}/verification.
The alert profile is still in use
Section titled “The alert profile is still in use”Deleting an alert profile answers 409 while a monitor, bundle or group still
alerts through it. details.monitorCount says how many monitors do.
-
Move each monitor to another profile:
PATCH /api/public/v1/monitors/{id}with a newnotificationProfileId. Move bundles and groups in DownBad. -
Delete the profile again.
Too much feedback in an hour
Section titled “Too much feedback in an hour”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.
-
Wait until
details.retryAt, then send it. -
If your program sends one item per event, have it collect them and send one item that lists them instead.
The feedback reference was not found
Section titled “The feedback reference was not found”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.
-
Check the reference as the answer to
POST /api/public/v1/feedbackgave it:FB-and six characters. Letter case doesn’t matter. -
If it was sent from another DownBad account you belong to, use a key made in that account.
The false-alarm report was refused
Section titled “The false-alarm report was refused”A false-alarm report is a change, so it follows the same rules as every change:
403withviewer_read_only,read_onlyorfree_plan_read_only: see Your role can only read, The token can only read or The Free plan can only read. On the Free plan, send the same facts as feedback instead, with the typewrong_result: any key can send feedback.404with codeNOT_FOUND: see The incident was not found.400with codeVALIDATION_ERROR: the body needs exactly two fields,summary(1 to 500 characters) andevidence(1 to 20,000 characters, of which the first 4,000 are kept).
- Fix what the message names, then send the report again.
Confirm DownBad sees the fix
Section titled “Confirm DownBad sees the fix”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.
Still stuck
Section titled “Still stuck”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,messageanddetails.rule, word for word, and when it happened - the
x-request-idheader from the answer, if your program kept it
Then send all of it to us through Contact Us.