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

# List sites

`GET /v1/sites`

## Request

- Base URL: `https://api.getsitecontrol.com`
- URL: `https://api.getsitecontrol.com/v1/sites`
- Auth: HTTP bearer

Sites of the account that the API key or access token can open, in ascending order of id; `order=newest` gives the latest first. Call it first: almost every other operation takes a `site_id` from here. Each site comes with its name, address, time zone, whether it is suspended and whether the Getsitecontrol script was found on it. Deleted sites are not listed. To find a site by its name or address, pass part of it as `search`.

A page holds up to `limit` sites; while `next_cursor` is set, pass it as `cursor` for the next page.

## Query parameters

- `search` string: Part of the site name or URL, any case, e.g. `shop` or `example.com`; only matching sites are listed. Omit for all
- `cursor` string: `next_cursor` of the previous page, sent with the same `order`; omit for the first
- `limit` integer: Items per page
- `fields` string: Comma-separated fields to keep in each item, for example `id,name`; each item then carries only those fields and `id`. Omit for every field
- `order` 'oldest' | 'newest': Order of a list. oldest: the oldest item first; newest: the newest item first, for the latest items without paging through the history.

## Response `200`

Successful Response

- SitePage: One page of a list; `next_cursor` is null on the last page.
  - `items` Site[], required
    - `id` integer, required
    - `name` string, nullable: Name given in the admin; null when none was given
    - `url` string, nullable: Address of the site
    - `timezone` string, nullable: IANA time zone name, e.g. Europe/Berlin; null when not set
    - `is_suspended` boolean, nullable: true: the site is suspended and widgets cannot be turned on (`update_widgets` refuses to turn one on); false: not suspended
    - `is_script_installed` boolean, nullable: true: the Getsitecontrol script was found on the site, e.g. a widget was shown there; false: not found yet
    - `created_at` string, date-time, nullable
    - `updated_at` string, date-time, nullable
    - `access` object, nullable: In `list_sites`: your level in each section of the site, widgets, emails and contacts: none, view (read), edit (change), full (also turn widgets on and send); a change needs edit or full
  - `next_cursor` string, nullable

## Other responses

- `400`: Unsupported GSC-Version
- `401`: Missing or invalid API key or access token
- `403`: Access denied
- `404`: Not found
- `422`: Validation failed
- `429`: Rate limited
- `503`: Temporarily unavailable; retry later

---

[API](https://skmtc.dev/getsitecontrol/apis/getsitecontrol-public-api.md) - [All operations](https://skmtc.dev/getsitecontrol/apis/getsitecontrol-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/getsitecontrol/apis/getsitecontrol-public-api/revisions/084fcad80e75?raw)
