> ## Documentation Index
> Fetch the complete documentation index at: https://docs.tyviso.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Errors

> Shared error reference for 401/404/422, referenced from every endpoint page.

[← Back to API Integration](/integration/api-integration)

Errors behave the same way across the whole API, so they live here instead of under every endpoint.

<AccordionGroup>
  <Accordion title="401 — Unauthorised">
    The key is missing, malformed, or not recognised. Returns a flat error string.

    ```json theme={null}
    { "error": "Invalid API key" }
    ```
  </Accordion>

  <Accordion title="404 — Not found">
    The partner or resource behind your key has no matching record.

    ```json theme={null}
    { "success": false, "error": "partner.not-found" }
    ```
  </Accordion>

  <Accordion title="422 — Validation failed">
    A required parameter is missing or out of range. `errors` lists each field.

    ```json theme={null}
    {
      "message": "The type field is required.",
      "errors": { "type": ["The type field is required."] }
    }
    ```
  </Accordion>
</AccordionGroup>

<Warning>
  **Watch out:** some giveaway responses return `200` with `success: false` — an already-claimed offer or an exhausted code pool is a valid outcome, not a failure. Always branch on `success` as well as the status code.
</Warning>
