Skip to content
API reference/Collections

List collections

Try it

A site's content collections (homes for sale, menu items, people …) with their fields and how many records each holds.

GET/api/v1/sites/{site_id}/collections

Authentication

An API key as Authorization: Bearer or x-api-key. It needs the collections:read scope — read content collections and their records.

collections:readRead onlyMCP tool: list_collections

Parameters

Named placeholders go in the path; the rest in the query string.

site_idstringPath · required
The site's id.1 to 100 characters

Response

200 with JSON on success (schema on the right). Errors use the standard envelope.

curl
curl -X GET 'https://websites.workflowcorp.com/api/v1/sites/SITE_ID/collections' \
  -H "Authorization: Bearer $WEBSITEBUDDY_API_KEY"
Example arguments
{
  "site_id": "SITE_ID"
}
Response schema
{
  "type": "object",
  "properties": {
    "data": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string"
          },
          "name": {
            "type": "string"
          },
          "slug": {
            "type": "string",
            "description": "The web address: /{slug} lists the records, /{slug}/{record} is one."
          },
          "item_name": {
            "type": "string",
            "description": "What ONE record is called (\"Home\")."
          },
          "description": {
            "type": "string"
          },
          "fields": {
            "type": "array",
            "items": {
              "type": "object",
              "properties": {
                "key": {
                  "type": "string",
                  "description": "Stable key the record's values use."
                },
                "label": {
                  "type": "string"
                },
                "kind": {
                  "type": "string",
                  "enum": [
                    "text",
                    "number",
                    "price",
                    "date",
                    "link"
                  ],
                  "description": "text, number, price (integer cents), date (YYYY-MM-DD) or link."
                },
                "in_list": {
                  "type": "boolean",
                  "description": "Shown on the cards and in lists, not only on the record's page."
                }
              },
              "required": [
                "key",
                "label",
                "kind",
                "in_list"
              ],
              "additionalProperties": false
            }
          },
          "records": {
            "type": "integer",
            "minimum": -9007199254740991,
            "maximum": 9007199254740991
          },
          "url": {
            "type": "string",
            "description": "The list on the live site (a site page with the same address wins)."
          },
          "is_sample": {
            "type": "boolean"
          },
          "created_at": {
            "type": "string"
          },
          "updated_at": {
            "type": "string"
          }
        },
        "required": [
          "id",
          "name",
          "slug",
          "item_name",
          "description",
          "fields",
          "records",
          "url",
          "is_sample",
          "created_at",
          "updated_at"
        ],
        "additionalProperties": false
      }
    }
  },
  "required": [
    "data"
  ],
  "additionalProperties": false
}