<!-- https://developers.silktide.com/v1/presence/answers/get-responses | Presence / Answers -->

# List the answers assistants gave, one row per answer

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

Lists the answers assistants gave: one row each time a prompt was put to one assistant. A row says which prompt, which assistant, when, and how many names the answer mentioned. It does not carry the answer's text: for that, with its mentions and sources, use [Get answers in full](https://developers.silktide.com/v1/presence/answers/get-answers.md).

Rows are the answers asked for between `from` and `to`, the last 30 days unless you say otherwise. An answer can arrive hours after it was asked for, and keeps the time it was asked for, so read recent days again to pick up late ones.

Only answers are listed unless `criteria` says otherwise. `status:all` adds the times an assistant showed nothing (`not_shown`, which Presence counts as an answer naming nobody) and the times nothing was measured (`unavailable` and `failed`, which it does not count).

Rows are sorted newest first. `search` matches the prompt. Sort by `requestedAt`, and give a `to` in the past, when you read every page: answers that arrive while you read would otherwise move rows between pages.

## 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.
- `marketId` (integer, optional, at least 1): Only this market: the number after `/presence/` in the market's address in Silktide. Left out, every market the API key's user can see.
- `from` (integer, optional): Only answers asked for at or after this time, in Unix seconds. Defaults to 30 days before `to`.
- `to` (integer, optional): Only answers asked for 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.
- `excludePlatforms` (string, optional): Leave out these assistants, by id, comma-separated, such as `google-search,bing-search`.
- `topics` (string, optional): Only these topics, by id, comma-separated. Left out, all of them.
- `brands` (string, optional): Only answers that name at least one of these brands, by id, comma-separated. Ids of brands the account does not track are ignored.
- `arena` (string, optional): Which prompts' answers to list: `market` for prompts about a subject, `reputation` for prompts about a brand itself, `all` for both, or `fact` for fact checks, which the others leave out. Defaults to `all`. Any other value answers with an error. `fact` ignores `topics`, and with `marketId` lists the fact checks about that market's brands. One of: `all`, `market`, `reputation`, `fact`.
- `prompt` (integer, optional, at least 1): Only answers to this prompt, by id.
- `url` (string, optional): Only answers that cite this page.
- `host` (string, optional): Only answers that cite this host exactly, such as `blog.fakewinebarrel.com`.
- `domain` (string, optional): Only answers that cite this domain or any host under it, such as `fakewinebarrel.com`.
- `ad` (string, optional): Only answers that carried this ad: a `creativeKey` from [Get ads](https://developers.silktide.com/v1/presence/ads/get-ads.md).
- `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 `ok` (the default), `not_shown`, `unavailable`, `failed` or `all`, such as `status: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.
    - `responseId` (integer, required, at least 1): The answer. One prompt put to one assistant, once.
    - `promptId` (integer, required, at least 1): The prompt. See [Get prompts](https://developers.silktide.com/v1/presence/setup/get-prompts.md).
    - `topicId` (integer, required): The prompt's topic. `0` for a fact check.
    - `platformId` (string, required): The assistant, by id, such as `chatgpt`. The ids are on [Presence](https://developers.silktide.com/v1/presence.md#assistants).
    - `promptText` (string, optional): The prompt, as it was put to this assistant. Always sent, except with `prompt` and a `columns` that does not name it.
    - `status` (string, optional): `ok` when the assistant answered, `not_shown` when it showed no answer to this prompt, `unavailable` when its service returned nothing usable, or `failed`. Always sent, except with `status:all` and one of `url`, `host`, `domain` or `ad`.
    - `mentionCount` (integer, required): How many names of brands, companies and products the answer mentions.
    - `requestedAt` (integer, required): When the answer was asked for. Prompts asked together share it.
    - `yourPortrayal` (string, optional): How the answer speaks of your brand, or of the one brand in `brands`. Empty when it does not name it other than in passing. Left out with `url`, `host`, `domain` or `ad`, and when the account has no brand of its own. One of: `positive`, `mixed`, `neutral`, `negative`.
    - `topicName` (string, optional, can be null): The topic's name. Only when `columns` names it.
    - `citations` (integer, optional): How many times the answer cites what `url`, `host` or `domain` names. Only with one of them.
- `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, or `arena` is not one of its values. 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: One day's answers in one market

```bash
curl "https://api.eu.silktide.com/v1/results/accounts/presence/responses/table?workspaceId=1&marketId=3&from=1793577600&to=1793663999&rowsPerPage=2" \
  -H "Authorization: silktide token=$SILKTIDE_API_KEY"
```

Response:

```json
{
  "result": {
    "page": 1,
    "minPage": 1,
    "maxPage": 240,
    "numRows": 480,
    "rowsPerPage": 2,
    "rows": [
      {
        "responseId": 83810,
        "promptId": 12,
        "topicId": 7,
        "platformId": "chatgpt",
        "promptText": "Who sells used oak barrels to small wineries?",
        "status": "ok",
        "mentionCount": 4,
        "yourPortrayal": "positive",
        "requestedAt": 1793610000
      },
      {
        "responseId": 83811,
        "promptId": 12,
        "topicId": 7,
        "platformId": "gemini",
        "promptText": "Who sells used oak barrels to small wineries?",
        "status": "ok",
        "mentionCount": 3,
        "yourPortrayal": "",
        "requestedAt": 1793610000
      }
    ]
  },
  "selector": "/v1/results/accounts/presence/responses/table",
  "duration": 0.31
}
```

## Example: Answers that cite one website

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

Response:

```json
{
  "result": {
    "page": 1,
    "minPage": 1,
    "maxPage": 96,
    "numRows": 96,
    "rowsPerPage": 1,
    "rows": [
      {
        "responseId": 83811,
        "promptId": 12,
        "topicId": 7,
        "platformId": "gemini",
        "promptText": "Who sells used oak barrels to small wineries?",
        "status": "ok",
        "mentionCount": 3,
        "citations": 2,
        "requestedAt": 1793610000
      }
    ]
  },
  "selector": "/v1/results/accounts/presence/responses/table",
  "duration": 0.4
}
```
