List sites
List every site in the workspace, with the site limit.
GET https://sitepaste.com/api/v1/public/sites
Requires the settings scope.
Usage
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. |
Query parameters
This collection is returned whole. It takes no limit or offset, and sending
either answers 422.
Response
{
"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. |
| limit | number | How many sites the plan and any extra-site purchases allow. |
POST /sites succeeds while sites holds fewer than limit, and answers 402 once it holds limit.