---
title: "List agent activity"
description: "The writes agents made to this store, newest first: which client (Claude, ChatGPT, Quinn, an API key), when, which action and path, the target object, whether it succeeded, and the records it changed with a before/after "
url: https://docs.stoqapp.com/v2-reference/account-agent-activity/list-agent-activity/
api: "API v2 reference"
method: GET
path: "/account/agent_activity"
---

# List agent activity

`GET https://app.stoqapp.com/api/v2/external/account/agent_activity`

The writes agents made to this store, newest first: which client (Claude, ChatGPT, Quinn, an API key), when, which action and path, the target object, whether it succeeded, and the records it changed with a before/after of their fields. Filter by client, surface (api, mcp, quinn), status, target (target_type + target_id) or time (since/until, ISO 8601).

**Note:** The log is being turned on store by store; until it is on for a store, nothing is recorded and the list is empty. A failed write changed nothing, so it has no changes. Each change names every changed field in fields, and keeps before/after values only for the fields the log shows for that kind of record, never credentials or customer contact details. Changes are recorded for offers, offer options, enrolled products, variants, settings, templates and theme integrations, when the action writes them itself; work it hands to a background job is not. Other writes (signups, customers, batches, feature flags, bulk adds, count resets) and changes made only in Shopify are listed as the action and target alone.

## Query parameters

- `client` (string): Only writes by this client, as entries name it (e.g. Claude, ChatGPT, Quinn, API key).
- `surface` (string): Only writes made through this surface, the REST API (api), MCP (mcp) or Quinn (quinn). One of: `api`, `mcp`, `quinn`.
- `status` (string): Only writes with this outcome. One of: `succeeded`, `failed`, `error`.
- `target_type` (string): Only writes to this kind of resource, as entries name it (e.g. preorders/offers). Use with target_id.
- `since` (string): Only writes at or after this time, ISO 8601 (e.g. 2026-11-01T00:00:00Z).
- `until` (string): Only writes at or before this time, ISO 8601.
- `target_id` (string): Only writes to the resource with this id, with target_type.
- `page` (integer): Page of results, from 1.
- `per_page` (integer): Entries per page, at most 100.

## Returns

- `entries` (array of objects)
  - `id` (integer): e.g. `1`
  - `created_at` (string): e.g. `2026-01-15T09:30:00Z`
  - `client` (string): e.g. `string`
  - `surface` (string): e.g. `string`
  - `action` (string): e.g. `string`
  - `verb` (string): e.g. `string`
  - `path` (string): e.g. `string`
  - `target` (object, nullable)
    - `type` (string): e.g. `string`
    - `id` (string): e.g. `string`
  - `status` (string): e.g. `string`
  - `changes` (array of objects)
    - `model` (string): e.g. `string`
    - `id` (string): e.g. `string`
    - `op` (string): e.g. `string`
    - `fields` (array of strings)
    - `before` (object)
      - `preorder_button_text` (string)
    - `after` (object)
      - `preorder_button_text` (string)
- `meta` (object): Pagination for the list.
  - `total_count` (integer): Items matching the filters, across all pages.
  - `page` (integer): Page returned, starting at 1.
  - `per_page` (integer): Most items per page.
  - `total_pages` (integer): Pages available at this per_page; 0 when nothing matches.

Rate limit: this call costs 1 point ([rate limits](https://docs.stoqapp.com/docs/rate-limits/)).

## Examples

### List agent activity

```sh
curl "https://app.stoqapp.com/api/v2/external/account/agent_activity" \
  -H "X-Auth-Token: $STOQ_API_KEY"
```

### List agent activity filtered by surface and status

```sh
curl "https://app.stoqapp.com/api/v2/external/account/agent_activity?surface=api&status=succeeded" \
  -H "X-Auth-Token: $STOQ_API_KEY"
```

## 200

Success: the requested resource.

```json
{
  "entries": [
    {
      "id": 1,
      "created_at": "2026-01-15T09:30:00Z",
      "client": "string",
      "surface": "string",
      "action": "string",
      "verb": "string",
      "path": "string",
      "target": {
        "type": "string",
        "id": "string"
      },
      "status": "string",
      "changes": [
        {
          "model": "string",
          "id": "string",
          "op": "string",
          "fields": [
            null
          ],
          "before": {
            "preorder_button_text": null
          },
          "after": {
            "preorder_button_text": null
          }
        }
      ]
    }
  ],
  "meta": {
    "total_count": 1,
    "page": 1,
    "per_page": 1,
    "total_pages": 1
  }
}
```

## 401

Missing or invalid `X-Auth-Token`.

```json
{
  "errors": [
    "Invalid API key"
  ],
  "code": "auth_invalid",
  "details": [
    {
      "code": "auth_invalid",
      "message": "Invalid API key",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

## 422

The request failed validation.

```json
{
  "errors": [
    "name is required"
  ],
  "code": "validation_failed",
  "details": [
    {
      "code": "validation_failed",
      "message": "name is required",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

## 429

Rate limited: cost-weighted per token (read 1, write 2; 360 points / 60s). Check `Retry-After`.

```json
{
  "errors": [
    "Rate limit exceeded"
  ],
  "code": "rate_limited",
  "details": [
    {
      "code": "rate_limited",
      "message": "Rate limit exceeded",
      "path": null,
      "value": null,
      "expected": null
    }
  ]
}
```

