Intelligence API error reference · Updated August 2026

invalid_country_code.

HTTP 400invalid_request_errorRetry with a corrected request

Every Orbyt Intelligence error envelope carries a permanent doc_url that resolves here. This page is generated from the same error registry the API serves from, so it can never drift from runtime behavior.

What it means.

The ?country= parameter must be one of the supported ISO 3166-1 alpha-2 codes (US, GB, CA per RFC-006 Tier 1). Phase B will add additional countries; until then, an unrecognized code is rejected to surface integration errors loudly rather than silently defaulting to US.

Retry strategy.

The envelope returns retry_strategy: "retry_with_clarification" by default for this code.

The request needs a correction before it can succeed. Inspect error.message (and error.param when present), adjust the request, then retry.

Example error envelope.

Locked RFC-001 shape. The HTTP status is 400, the x-request-id header mirrors error.request_id, and the doc_url points back to this page.

{
  "error": {
    "type": "invalid_request_error",
    "code": "invalid_country_code",
    "message": "The `?country=` parameter must be one of the supported ISO 3166-1 alpha-2 codes (US, GB, CA per RFC-006 Tier 1).",
    "doc_url": "https://www.orbytlabs.ai/intelligence/api/errors/invalid_country_code",
    "request_id": "req_0123456789abcdef",
    "retry_strategy": "retry_with_clarification",
    "retry_hint": {
      "clarification_needed": "See error.message for the parameter to correct"
    }
  }
}

How to fix it.

  1. Inspect error.param to find which parameter the API rejected.
  2. Read error.message and error.retry_hint.clarification_needed for the exact correction.
  3. Re-issue the request with the corrected value. The fix is always client-side for this strategy.

Related codes.

Other codes in the invalid_request_error family.

Keep building.