# Answers and errors

> The shape of every answer, what a notice means, and what an error carries.

Source: https://wiseview.ai/docs/api/answers

## An answer

Every answer:

```
{
  "data": …,
  "asOf": "…",
  "notice": "…"
}
```

- `data` is what you asked for; each endpoint’s page shows an abridged example.
- `asOf` is the moment the answer was made, as an ISO timestamp.
- `notice` appears when the answer quotes text written outside WiseView — headlines, filings, transcripts — so a script that hands it to an AI can say it is quoted material, not instructions.

## An error

Every error:

```
{
  "error": {
    "code": "…",
    "message": "…"
  }
}
```

The `code` is stable — branch on it. The `message` is a plain sentence you can show a person.

Every code the API answers with, generated from the API itself:

| Status | Code | When |
| --- | --- | --- |
| 400 | `invalid_params` | A parameter is unknown, missing, given twice or out of range. The message names it. |
| 400 | `key_in_address` | A key was put in the address. Send it in the Authorization header instead. |
| 401 | `missing_key` | No key was sent. Send "Authorization: Bearer wv_live_…". |
| 401 | `invalid_key` | The key is not one of ours. Check it was copied whole. |
| 401 | `key_revoked` | The key was revoked. Make a new one in your account, under API. |
| 403 | `switched_off` | The API is switched off right now. |
| 403 | `blocked` | The API is turned off for this account. |
| 403 | `account_closed` | This account cannot be used right now. |
| 403 | `membership_required` | The account has no active membership. |
| 403 | `not_on_plan` | The account's plan does not include the API. The free plan has no keys. |
| 403 | `endpoint_off` | This endpoint, or the feature behind it (like the squawk), is switched off right now. |
| 403 | `members_only` | The account's plan does not include this endpoint's data. |
| 404 | `not_found` | The lookup found nothing (an unknown report id, a name with no trades), or there is no endpoint at this address. Not counted. |
| 405 | `method_not_allowed` | Anything but GET. The API is read-only. |
| 429 | `rate_limited` | Too many calls this minute. Wait a moment. |
| 429 | `allowance_used_up` | This month's calls (or a trial's) are used up. Carries refillsAt and trialEndsAt. |
| 500 | `server_error` | Something went wrong on our side. Try again in a moment. |
| 502 | `lookup_failed` | The lookup failed on our side. Not counted; try again shortly. |

Only `GET` is answered: the API reads, and changes nothing in your account.
