Skip to content

Errors and rate limits

REST errors use an HTTP status and JSON envelope:

{
"error": {
"code": "forbidden",
"message": "Grant or account role does not permit this operation"
}
}

Inspect error.code, not exact display wording. Additional metadata appears when relevant, such as limit, upgrade_plan and billing on quota errors.

HTTP status Common code Action
400 invalid_arguments, invalid_json Correct types, supported fields, query/body envelope or JSON. The message names each field and what it needs
401 unauthorized Check the credential, its expiry or revocation, and account membership
403 forbidden, invalid_origin Check effective scope/role, dashboard boundary or request origin
404 not_found, unknown_operation Use a supported path and owned response ID
409 idempotency_conflict Same key had different creation arguments, or what the key created has been deleted; reconcile intent or use a new key
409 quota_exceeded Operation did not complete; inspect limit and billing guidance
413 request_too_large Body exceeds 256 KiB
422 validation_failed, invalid_kind Correct model constraints or use an appropriate check kind
429 rate_limited Wait for Retry-After, or a minute after hitting the delete limit
500 invalid_result Server could not produce the required output; retain request context for support

Errors deliberately avoid echoing potentially sensitive input/model messages. invalid_arguments and validation_failed name the fields at fault without returning their submitted values:

{
"error": {
"code": "invalid_arguments",
"message": "Invalid arguments: days must be one of 7, 30; check.interval_seconds must be an integer"
}
}

Read the message to correct a call, but branch on error.code. Do not infer cross-account resource existence from a not-found response.

quota_exceeded means the plan doesn’t allow what was asked for, and nothing changed. The error carries:

Field Meaning
limit.name The limit that was hit, such as check_limit, dashboard_limit, domain_check_limit, included_probe_locations, min_interval_seconds, history_days or run_history_days
limit.value The plan’s value for that limit
limit.current, limit.requested What the account has now, or what the request asked for, depending on the limit. For history_days and run_history_days, current is the number of days requested
upgrade_plan Name of the cheapest plan that allows the request, or null
billing The same billing guidance as capabilities, including upgrade_url

upgrade_plan names a plan that allows what was asked for, not just a higher limit. A request for a 30-second interval names a plan with 30-second checks, and a request for 365 days of history names one that keeps 365 days. The message then includes a sentence such as “The Team plan raises this limit.” On Free, reaching a Free domain limit names the cheapest paid plan.

upgrade_plan is null when no plan allows the request, when self-service upgrades are unavailable, and on a custom plan, where a standard plan could lower other limits. Mention the plan to the user only when it’s set, and share billing.upgrade_url only when it isn’t null.

{
"error": {
"code": "quota_exceeded",
"message": "Operation not completed. Account check limit reached. The Team plan raises this limit. Review plans at https://pingstack.io/pricing. Select the named account before proceeding.",
"limit": { "name": "check_limit", "value": 50, "current": 50 },
"upgrade_plan": "Team",
"billing": {
"account": { "id": "ACCOUNT_ID", "name": "Example Co" },
"payments_enabled": true,
"can_manage_billing": true,
"upgrade_url": "https://pingstack.io/pricing"
}
}
}

The numbers in the example are placeholders. Read the limit and plan from the live response.

Requests are counted in minute windows:

Boundary Limit
Client IP 120 requests/minute
Grant 60 requests/minute
Account 300 requests/minute

The same authentication layer serves REST and MCP. An exceeded boundary returns Retry-After: 60. Request bodies are limited to 256 KiB. Use bounded pagination rather than oversized requests.

A key or connection can delete 10 items a minute across checks, dashboards and notification groups. The next delete returns 429 rate_limited and removes nothing. This is separate from the request limits above, and it applies to REST and MCP alike.

Five minutes after a key’s or connection’s first deletion, Pingstack emails the account owner, and the person who created the key or approved the connection if that’s someone else. The email lists everything it deleted in those five minutes. Later deletions start a new email.

HTTPS is required outside local development. If an Origin header is sent, it must match the app origin; this is not a general cross-origin browser API.

Use backoff for rate limits and transient transport failures. Retry creates with the same idempotency key for the same intended operation. Do not blindly retry invalid configuration, permission failures or a quota error.

For quotas, show the returned limit and available billing upgrade URL. A null URL means self-service purchasing is unavailable; lack of billing permission requires a billing-authorized account member.