<!-- https://developers.silktide.com/v1/presence/accuracy/get-fact-checks | Presence / Accuracy -->

# List each check of a brand's facts, one row per graded answer

`GET /v1/results/accounts/presence/accuracy/checks`

Lists every check of a brand's active facts over some dates: one row each time an assistant's answer was graded against a fact. Paused and deleted facts' checks are left out.

Rows are sorted newest first. `search` matches the fact, the rationale and the assistant's id.

## Request

### Query parameters

- `workspaceId` (integer, required, at least 1): Where the account's markets live. [Get the workspace](https://developers.silktide.com/v1/presence/setup/get-workspace.md) answers with it.
- `brand` (integer, required, at least 1): The brand whose facts' checks to list, by id. Left out, or a brand that is not in the account or in a market the API key's user can see, and there are no rows.
- `from` (integer, optional): Only checks made at or after this time, in Unix seconds. Defaults to 30 days before `to`.
- `to` (integer, optional): Only checks made at or before this time, in Unix seconds. Defaults to now.
- `platforms` (string, optional): Only these assistants, by id, comma-separated, such as `chatgpt,gemini`. Left out, all of them. An unknown id matches nothing.
- `columns` (string, optional): The columns to return, comma-separated, such as `url,pageViews`. Left out, the table's default columns. Send a string even in a JSON body: an array is ignored.
- `sort` (string, optional): The column to sort by, then `:a` for ascending or `:d` for descending, such as `pageViews:d`. Left out, the table's own order.
- `search` (string, optional): Only rows matching this text. What it searches depends on the table, most often the URL or title.
- `page` (integer, optional, at least 1): The page of rows to return, from `1`. Defaults to `1`.
- `rowsPerPage` (integer, optional, at least 1): How many rows a page holds. Defaults to `100`.
- `criteria` (string, optional): Filters on the table's columns, as `column:value`, joined with `;`. `grade` takes `answered` (every grade but `refused`, the default), `agree`, `partial`, `ambiguous`, `disagree`, `refused` or `all`, such as `grade:all`.

## Response

Status `200`.

- `result` (object, required): The answer.
  - `page` (integer, required, at least 1): The page returned. Not always the page asked for, when that was out of range.
  - `minPage` (integer, required, at least 1): The first page. Always `1`.
  - `maxPage` (integer, required): The last page at this `rowsPerPage`. With no rows, `0` or `1` depending on the table.
  - `numRows` (integer, required): How many rows there are across every page.
  - `rowsPerPage` (integer, required, at least 1): How many rows a page holds.
  - `rows` (list of objects, required): The rows on this page.
    - `resultId` (integer, required, at least 1): The check.
    - `factId` (integer, required, at least 1): The fact it checked. See [Get facts](https://developers.silktide.com/v1/presence/accuracy/get-facts.md).
    - `grade` (string, required): Whether the answer agrees with the fact: `agree`, `partial`, `ambiguous`, `disagree`, or `refused` when it would not say. One of: `agree`, `partial`, `ambiguous`, `disagree`, `refused`.
    - `platformId` (string, required): The assistant, by id, such as `chatgpt`. The ids are on [Presence](https://developers.silktide.com/v1/presence.md#assistants).
    - `factText` (string, required): The fact, as it was when checked.
    - `created` (integer, required): When it was checked.
    - `rationale` (string, optional): Why it was given that grade. Only when `columns` names it.
    - `expectedAnswer` (string, optional): What a right answer said when it was checked. Only when `columns` names it.
- `selector` (string, required): The query that answered, as its path: `/v1/results/scores`.
- `duration` (number, required): Seconds Silktide took to answer.

## Errors

| Status | Type | When |
| --- | --- | --- |
| 200 | `EditionNotAvailable` | The account does not have Silktide 5. Its `status` is `403`. The body is an error despite the status. |
| 200 | `Runtime` | No `workspaceId` was sent. Its `status` is `500`, and its message does not say why. The body is an error despite the status. |
| 200 | `AccessDenied` | No such workspace or market exists in the account, or the API key's user cannot see it. Its `status` is `403`. The body is an error despite the status. |
| 401 | `NotLoggedIn` | No API key was sent, or it is not a key for this region. |
| 429 | `TooManyRequests` | Too many requests to this path in five seconds. Retry after the number of seconds in the `Retry-After` header, which `properties.retryAfter` repeats. |
| 503 | - | Silktide is busy. Retry after the number of seconds in the `Retry-After` header. |

## Access

- Permission: Can see this market
- Plan feature: none
- Edition: Silktide 5 only
- Cost: free
- Stability: stable, since 1.2.0

## Example: The latest check, with why it was graded so

```bash
curl "https://api.eu.silktide.com/v1/results/accounts/presence/accuracy/checks?workspaceId=1&brand=4&columns=grade%2CplatformId%2CfactText%2Ccreated%2Crationale&rowsPerPage=1" \
  -H "Authorization: silktide token=$SILKTIDE_API_KEY"
```

Response:

```json
{
  "result": {
    "page": 1,
    "minPage": 1,
    "maxPage": 59,
    "numRows": 59,
    "rowsPerPage": 1,
    "rows": [
      {
        "resultId": 6358,
        "factId": 2,
        "grade": "disagree",
        "platformId": "copilot",
        "factText": "Fake Wine Barrel delivers within five working days.",
        "created": 1793610000,
        "rationale": "The answer says delivery takes two to three weeks."
      }
    ]
  },
  "selector": "/v1/results/accounts/presence/accuracy/checks",
  "duration": 0.02
}
```
