Skip to content
API reference/Collections

Delete a collection

Try it

Deletes a collection and every record in it, for good. Their pages leave the live site at once; Collection sections showing it go empty.

DELETE/api/v1/sites/{site_id}/collections/{collection_id}

Authentication

An API key as Authorization: Bearer or x-api-key. It needs the collections:write scope — make collections and add, change and delete records (live at once).

collections:writeDeletesIdempotency-Key optionalMCP tool: delete_collection

Parameters

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

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

Response

200 with JSON on success (schema on the right). Errors use the standard envelope; a retry with the same Idempotency-Key gets the first answer back (how retries work).

curl
curl -X DELETE 'https://websites.workflowcorp.com/api/v1/sites/SITE_ID/collections/COLLECTION_ID' \
  -H "Authorization: Bearer $WEBSITEBUDDY_API_KEY"
Example arguments
{
  "site_id": "SITE_ID",
  "collection_id": "COLLECTION_ID"
}
Response schema
{
  "type": "object",
  "properties": {
    "id": {
      "type": "string"
    },
    "deleted": {
      "type": "boolean",
      "const": true
    },
    "records_deleted": {
      "type": "integer",
      "minimum": -9007199254740991,
      "maximum": 9007199254740991
    }
  },
  "required": [
    "id",
    "deleted",
    "records_deleted"
  ],
  "additionalProperties": false
}