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

# List the facts assistants are checked against, and whether they agree

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

Lists the facts your account has recorded about a brand, each with how far assistants' latest answers agree with it. Send `platforms` to judge every fact by those assistants alone.

Facts are sorted with the most disputed first. `search` matches the fact.

For every check over some dates rather than the latest, see [Get fact checks](https://developers.silktide.com/v1/presence/accuracy/get-fact-checks.md).

## 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 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.
- `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 `;`. `status` takes `current` (active and paused, the default), `active`, `paused`, `deleted` or `all`. `verdict` takes `agree`, `mixed` or `disagree`.

## 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.
    - `factId` (integer, required, at least 1): The fact.
    - `promptId` (integer, required): The prompt that checks it.
    - `text` (string, required): The fact, as your account states it.
    - `question` (string, optional): What assistants are asked, to check it.
    - `expectedAnswer` (string, optional): What a right answer says.
    - `status` (string, optional): `active` (being checked), `paused` or `deleted`. One of: `active`, `paused`, `deleted`.
    - `updated` (integer, optional): When the fact was last changed.
    - `agreement` (number, required, can be null, 0 to 100): How far assistants' latest answers agree with the fact, as a percentage to one decimal place. Null before it is checked.
    - `consensus` (string, required): What they say between them. Empty before it is checked. One of: `agree`, `mixed`, `disagree`.
    - `platformCount` (integer, optional, can be null): How many assistants that counts. Null before it is checked.
    - `lastCheckedAt` (integer, required): When it was last checked. `0` before it is.
    - `latestGrade` (string, required): The latest answer's grade, as `grade` in [Get fact checks](https://developers.silktide.com/v1/presence/accuracy/get-fact-checks.md). Empty before it is checked.
- `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: A brand's facts, the most disputed first

```bash
curl "https://api.eu.silktide.com/v1/results/accounts/presence/accuracy/table?workspaceId=1&brand=4&rowsPerPage=2" \
  -H "Authorization: silktide token=$SILKTIDE_API_KEY"
```

Response:

```json
{
  "result": {
    "page": 1,
    "minPage": 1,
    "maxPage": 5,
    "numRows": 9,
    "rowsPerPage": 2,
    "rows": [
      {
        "factId": 2,
        "promptId": 88,
        "text": "Fake Wine Barrel delivers within five working days.",
        "question": "How long does Fake Wine Barrel take to deliver?",
        "expectedAnswer": "Five working days or fewer.",
        "status": "active",
        "updated": 1793610000,
        "agreement": 12.5,
        "consensus": "disagree",
        "platformCount": 8,
        "lastCheckedAt": 1793610000,
        "latestGrade": "disagree"
      },
      {
        "factId": 9,
        "promptId": 95,
        "text": "Fake Wine Barrel was founded in 1987.",
        "question": "When was Fake Wine Barrel founded?",
        "expectedAnswer": "1987.",
        "status": "active",
        "updated": 1793610000,
        "agreement": null,
        "consensus": "",
        "platformCount": null,
        "lastCheckedAt": 0,
        "latestGrade": ""
      }
    ]
  },
  "selector": "/v1/results/accounts/presence/accuracy/table",
  "duration": 0.07
}
```
