---
title: "List sites"
method: GET
path: "/v1/sites"
tags: ["Sites"]
---

# List sites

`GET /v1/sites`

## Request

- Base URL: `https://api.ironfang.com/analytics`
- URL: `https://api.ironfang.com/analytics/v1/sites`
- Auth: one of:
  - HTTP bearer
  - HTTP bearer

Returns the organisation's sites, newest first, as a bounded keyset page. Each row carries the counts a setup state is read from, so a page of sites is one request. `total` is the organisation's sites, independent of the page. With `external_id`, only the site that has it: the exact lookup an integration uses to find a site it created. Needs analytics.sites.read.

## Query parameters

- `cursor` string
- `limit` integer
- `external_id` string

## Response `200`

A page of sites

- object
  - `next_cursor` string, required: Opaque cursor for the next page; empty on the last page.
  - `sites` SiteListRow[], required
    - `config_version` integer, required: The configuration version in force.
    - `created_at` string, date-time, required
    - `disabled_at` string, date-time
    - `external_id` string, nullable, required: Your own identifier for the site, when one was given at creation.
    - `id` string, uuid, required
    - `name` string, required
    - `organisation_id` string, uuid, required
    - `retention_days` integer, required: Days a recording is kept.
    - `session_retention_days` integer, required: Days session history is kept, never fewer than retention_days. A session loses its IP address, user agent and visitor id after retention_days.
    - `status` 'active' | 'disabled', required
    - `timezone` string, required
    - `updated_at` string, date-time, required
    - `version` integer, required: Name this in a PATCH.
    - `summary` object, required: The site's setup state, counted for the list.
      - `analytics_enabled` boolean, required
      - `origins` integer, required
      - `recording_enabled` boolean, required
      - `verified_origins` integer, required
  - `total` integer, required: How many sites the organisation has.

## Other responses

- `400`: An unknown, repeated or malformed query parameter (`invalid_query`).
- `401`: No credential, an invalid one, an expired partner integration key, or a delegated token where none is accepted (`unauthorized`, `invalid_api_key`, `api_key_expired`, `delegated_not_allowed`).
- `403`: The credential lacks the permission or scope, names another organisation, or belongs to a partner integration that is not active (`forbidden`, `insufficient_scope`, `integration_inactive`).

---

[API](https://skmtc.dev/ironfang/apis/ironfang-analytics-api.md) · [All operations](https://skmtc.dev/ironfang/apis/ironfang-analytics-api/llms.txt) · [OpenAPI document](https://skmtc.dev/ironfang/apis/ironfang-analytics-api/revisions/08197080c3d7?raw)
