
# List sites

List every site in the workspace, with the site limit.

```sh
GET https://sitepaste.com/api/v1/public/sites
```

Requires the `settings` scope.

## Usage

```bash
curl "https://sitepaste.com/api/v1/public/sites" \
  -H "Authorization: Bearer $TOKEN"
```

## Authorizations

| Header | Type | Required | Description |
|--------|------|----------|-------------|
| Authorization | string | Yes | Bearer token (`Authorization: Bearer sp_...`). Created in the dashboard under Account > Tokens. See [authentication](/api/authentication). |

## Query parameters

This collection is returned whole. It takes no `limit` or `offset`, and sending
either answers 422.

## Response

```json
{
  "sites": [
    { "id": "s7k2m0dq1p3z", "name": "docs", "displayName": "Docs Site", "protectionType": "public" }
  ],
  "limit": 2
}
```

| Field | Type | Description |
|-------|------|-------------|
| sites | array | Every site in the workspace. `displayName` appears only when the site has one. The default site is `defaultSiteId` on [GET /workspace](/api/workspace/get-workspace). |
| limit | number | How many sites the plan and any extra-site purchases allow. |

[POST /sites](/api/sites/post-sites) succeeds while `sites` holds fewer than `limit`, and answers 402 once it holds `limit`.