> ## Documentation Index
> Fetch the complete documentation index at: https://docs.genviral.io/llms.txt
> Use this file to discover all available pages before exploring further.

# List Analytics Targets

> List tracked analytics accounts in the authenticated key scope

Returns tracked analytics targets for the authenticated key scope (workspace or personal).

## Behavior

* Returns all targets scoped to the API key.
* Includes last snapshot/refresh status and `free_refresh_available`.
* This dataset is the source of account-level stats shown in the internal analytics UI.

<Note>
  Use [Create Analytics Target](/api-reference/create-analytics-target) to add a
  new account to track.
</Note>

## Response

<ResponseField name="workspace_id" type="string | null">
  Workspace tied to the API key (`null` for personal-scope keys).
</ResponseField>

<ResponseField name="targets" type="array">
  Analytics targets with status metadata and last snapshot totals. Each row
  includes canonical `id` and a backward-compatible `target_id` alias.
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl --request GET \
    --url https://www.genviral.io/api/partner/v1/analytics/targets \
    --header 'Authorization: Bearer <token>'
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "ok": true,
    "code": 200,
    "message": "Analytics targets retrieved",
    "data": {
      "workspace_id": "4cb5d3fd-8c8f-4ed7-a17c-4ffb52c7e6ac",
      "targets": [
        {
          "id": "e7a7f417-56db-4320-9e9a-fd6fdabda09d",
          "target_id": "e7a7f417-56db-4320-9e9a-fd6fdabda09d",
          "platform": "tiktok",
          "identifier": "@brand",
          "display_name": "Brand HQ",
          "free_refresh_available": true
        }
      ]
    }
  }
  ```
</ResponseExample>

## Error Responses

* `401`/`403` - authentication failed or key lacks workspace access
* `500` - unexpected database/analytics service error

All error responses from analytics endpoints include an `error_code` field.
