whereamimentioned
PricingMethodologyDocsFree checkerFree toolsBlog
Sign inGet started
  • Start here

    • Overview
    • Quickstart
    • Concepts
    • Authentication and keys
  • REST API

    • API overview
    • Endpoint reference
    • Errors and rate limits
    • TypeScript client
  • CLI

    • CLI overview
    • Command reference
    • Configuration and credentials
    • Using the CLI in CI
  • MCP server

    • MCP overview and install
    • Tool reference
    • Prompts and recipes
  • Help

    • Troubleshooting
    • FAQ
    • Glossary
Documentation menu
  • Start here

    • Overview
    • Quickstart
    • Concepts
    • Authentication and keys
  • REST API

    • API overview
    • Endpoint reference
    • Errors and rate limits
    • TypeScript client
  • CLI

    • CLI overview
    • Command reference
    • Configuration and credentials
    • Using the CLI in CI
  • MCP server

    • MCP overview and install
    • Tool reference
    • Prompts and recipes
  • Help

    • Troubleshooting
    • FAQ
    • Glossary

Loading the page

whereamimentioned

The AI-visibility platform that tells you the truth about how AI engines represent your brand: grounded, rigorous, and transparent.

Product

  • Free checker
  • Free tools
  • Pricing
  • Docs
  • Get started

Trust

  • Methodology
  • Blog
  • Contact

Legal

  • Privacy Policy
  • Terms of Service
  • Cookie Policy

Account

  • Sign in
  • Create account

© 2026 whereamimentioned. All rights reserved.

v1 covers grounded AI models via live web search. AI Overviews and Copilot are on the roadmap.

REST API

Errors and rate limits

Every error code the API, the CLI and the MCP server can return, the structured details each carries, what caused it and what to do. Then every rate limit, with its scope and window.

Errors are designed to be handled by code first and read by people second. Every non-2xx response is one envelope, the code is one of a fixed list, and anything a client needs to react to is in details as structured data rather than in the message. This page is the reference for all of it, across the three surfaces.

The envelope

{
  "error": {
    "code": "scan_already_running",
    "message": "A scan is already running for this workspace.",
    "requestId": "req_01J9X4Z2M8K7Q3R5T6V8W9Y0ZA",
    "details": {
      "scanId": "3f9c1e42-08a1-4f6e-9b21-7d0c5a3e91bb",
      "pollUrl": "https://whereamimentioned.com/api/v1/scans/3f9c1e42-08a1-4f6e-9b21-7d0c5a3e91bb"
    }
  }
}
  • code: stable, machine-readable, from the table below. Branch on this.
  • message: one or two sentences for a person, often ending with the URL or command that fixes it. It may change between releases; do not parse it.
  • requestId: always present, also in the X-Request-Id header. Quote it to support.
  • details: present when the code defines a shape for it. Never free text.

The twelve codes

HTTP Code When details
400 bad_request The body is not valid JSON, or could not be read at all. none
401 unauthorized No Authorization header, a malformed key, a revoked or expired key, or a wam_test_ key on production. The response carries WWW-Authenticate. none
402 insufficient_credits The organization's balance cannot cover the scan. Only on scan creation. Nothing was charged. required, available, billingUrl
403 insufficient_role The key's effective role is below what the action needs. The message names both roles. none
403 insufficient_scope The key lacks the scope the route needs, is the wrong kind (an organization key on an organization-level route), or the request used a session cookie. none
403 feature_not_available The plan does not include this: the organization has no paid plan, a prompt cap was reached, a report format is not in the plan, or an organization was created by someone with no paid organization. billingUrl?, limit?, current?, allowedFormats?
404 not_found No such resource in the resolved organization. A resource of another organization answers identically. On the report route while the scan is not done: details.status. status?
409 conflict The request conflicts with current state. Four causes, told apart by details: an Idempotency-Key reused with different terms (originalScanId or originalOrgId), a plan cap on workspaces (limit, current, tier, billingUrl), a duplicate competitor (fields), or a scan quote whose priced terms moved (fields). see left
409 scan_already_running A scan is queued or running for this workspace. Adopt it: poll details.pollUrl. scanId, pollUrl
422 validation_failed The body, query or cursor did not match its schema, an account-wide key named no organization, or (site routes) the URL could not be used. issues? (Zod-style { path, message } list), hint?, reason?
429 rate_limited A rate limit was exceeded. Also sent as the Retry-After header. retryAfterSeconds
500 internal_error Something went wrong on our side. Already reported to our error tracking under the request id. none

Site route reasons

The seven /api/site/* routes add a details.reason to their 422s so a caller can tell input problems apart:

reason Meaning
unsafe_url The URL points at a private, loopback or link-local address, which the server refuses to fetch. details.issues[0].path is ["url"].
upstream_unavailable The site did not answer or answered with an error. details.upstreamStatus carries its status code.
crawl_refused The site's robots.txt disallows the crawler and nothing readable was found.

Handling errors in code

  • Retry only what is safe to retry. GET requests on a 502, 503 or 504, or a network failure, at most a couple of times with backoff. Never retry a POST blindly: on scan and organization creation, reuse the same Idempotency-Key so the server returns the original instead of making a second one.
  • Never retry a 429 immediately. Wait details.retryAfterSeconds. The scan-start ceiling (3 per hour per key) is not a traffic limit; waiting it out is the only correct behaviour.
  • Treat 409 scan_already_running as success with a different id. Poll details.pollUrl.
  • Treat 404 on DELETE .../prompts/{id} as success. The prompt is gone either way.
  • On 402, stop. Print required, available and billingUrl. Do not shrink the scan and try again; a person decides whether to buy credits.
  • On 403 feature_not_available, stop. The fix is on the billing page, not in code.
  • Log requestId with every error you record. It is the only thing support can look up.

How the CLI reports them

Every server error becomes a CliError with the same code, the server's message, the request id, and an exit code. Under --json, the error is itself the stdout document:

{
  "ok": false,
  "error": {
    "code": "insufficient_credits",
    "message": "Not enough credits. This scan needs 24 credits and the organization has 10.\nAdd credits or change plan: https://whereamimentioned.com/acme/billing",
    "requestId": "req_01J9X4Z2M8K7Q3R5T6V8W9Y0ZA",
    "details": { "required": 24, "available": 10, "billingUrl": "https://whereamimentioned.com/acme/billing" }
  },
  "exitCode": 4
}
Server code CLI exit Notes
unauthorized, insufficient_role, insufficient_scope, feature_not_available 3 Except feature_not_available from wam org create, which is 11: the account owns no paid organization.
insufficient_credits 4
rate_limited 5
scan_already_running 8 with --no-follow; otherwise the CLI follows the running scan
conflict 9 from scan run (a reused key or a moved quote) and from org create with originalOrgId; 10 from org create at the organization ceiling and from workspace create at the workspace cap
validation_failed 2
not_found 1 when the request named a scan id, or a report was requested before the scan finished; 3 when the organization or workspace itself was not found, because that is a credential or addressing problem
bad_request, internal_error 1

The CLI adds local codes of its own for conditions with no server behind them: no_credential (3), no_org and no_workspace (2), usage_error (2), network_unreachable (1), timed_out (1), api_version_mismatch (1), scan_failed (6) and threshold_not_met (7). The full exit-code table is on the CLI overview.

How the MCP server reports them

A failed tool call is an MCP tool result with isError: true and a structuredContent of the same shape as the envelope's error object (code, message, details, and helpUrl where there is a page that fixes it). The eleven API codes other than bad_request are used as they are, plus five that only exist on MCP:

Code When
quote_expired The quoteToken passed to run_scan is older than five minutes. Call estimate_scan again.
quote_mismatch The quote was minted for another key or workspace, or its priced terms moved. Call estimate_scan again and show the new price.
session_cap_reached The key has started 3 scans in the last 60 minutes. The message says when the cap resets.
upstream_unavailable A site tool could not reach the site.
response_too_large The structured result would exceed 256 KB. details.parameter names the argument to reduce (limit or depth).

Protocol-level failures (a malformed JSON-RPC frame, a missing envelope, an unknown method) are JSON-RPC errors, not tool errors, and an Origin header the server does not serve is an HTTP 403.

Rate limits

All limits are sliding windows. A denial is 429 rate_limited on REST, exit 5 on the CLI and a rate_limited tool error on MCP, each carrying the seconds to wait.

REST API

Bucket Limit Keyed on Notes
Failed authentication 30 per minute client IP Only failed attempts count. A valid key is never charged here.
Reads 120 per minute key Every GET.
Writes 30 per minute key POST, PATCH, DELETE, except scan creation.
Organization 300 per minute organization All keys of the organization together.
Scan starts 3 per 60 minutes key The money ceiling. A replay of an existing scan still counts.
Organization creation 3 per hour account Keyed on the person, never on IP.

Free site routes

Bucket Limit Keyed on Routes
Single-page checks 30 per hour client IP check-crawlers, validate-llms-txt, validate-structured-data, check-meta, analyze-chunks
Crawls 10 per hour client IP generate-llms-txt, generate-sitemap

The same two buckets are charged whether the check comes through the website, the CLI or the MCP server, so switching doors does not triple the allowance.

MCP server

Bucket Limit Keyed on Notes
Tool calls with a key 60 per minute key Account tools additionally take the REST buckets of the operation they perform.
Anonymous tool calls, all callers 2,000 per day global A circuit breaker for the no-key tools.
Anonymous crawls, per tool 200 per day global generate_llms_txt and generate_sitemap each.
Anonymous tool calls the site-route buckets above client IP
Invalid key presented the failed-authentication bucket above client IP A request with no Authorization header is never charged; a wrong key is, on every request.

Headers

Every REST response a limiter ran for carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset for the tightest bucket that applied; Reset is a Unix timestamp in seconds. A 429 adds Retry-After in seconds.

Fail-closed

If the rate limiter's backing store is unavailable in production, requests are denied, not allowed. A cluster of 429s or 500s on every route at once is more likely to be that than your usage; check the status of the service before changing your client.

PreviousEndpoint reference
NextTypeScript client

On this page

  • The envelope
  • The twelve codes
  • Handling errors in code
  • How the CLI reports them
  • How the MCP server reports them
  • Rate limits