List tags

List every tag on the site, with page counts and any metadata (display casing, description).

GET https://sitepaste.com/api/v1/public/sites/{siteId}/tags

Requires the content scope.

Usage

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

Authorizations

HeaderTypeRequiredDescription
AuthorizationstringYesBearer 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

{ "tags": [ { "slug": "guides", "title": "Guides & Tips", "description": "How-to posts", "pageCount": 4 } ] }

tags is always an array, and holds every tag a page carries and every tag given a title or description. A tag with neither comes back with title and description as empty strings.

FieldTypeDescription
slugstringThe tag, lowercased, with spaces as hyphens.
titlestringDisplay casing, empty when unset.
descriptionstringTag page description, empty when unset.
pageCountnumberHow many pages carry the tag.