(DELETE) Delete collections

Delete one or more collections using soft delete.

Endpoint

DELETE /api/collections

Delete one or more collections using soft delete. Soft delete marks collections as deleted without permanently removing them from the database.

Accepts an array of collection IDs to delete. All specified collections must belong to your workspace.

Endpoint text
DELETE /api/collections

Authentication

Requires authentication with an API key that has the collectionsWrite scope.

Request Body

The request body must be an array of collection IDs (UUIDs) to delete.

You can delete up to 10,000 collections in a single request. Requests above 10,000 IDs are rejected.

ParameterTypeRequiredDescription
body (body)array<string>YesArray of collection IDs (UUIDs) to delete. All IDs must be valid and belong to your workspace.

Request Size

Ensure the request body contains at least one valid collection ID.

Examples

Request cURL
curl -X DELETE "https://hoko.to/api/collections" \
  -H "Authorization: Bearer <API_KEY>" \
  -H "Content-Type: application/json" \
  -d '[
    "550e8400-e29b-41d4-a716-446655440000"
  ]'
Request JavaScript
const response = await fetch("https://hoko.to/api/collections", {
  method: "DELETE",
  headers: {
    "Authorization": "Bearer <API_KEY>",
    "Content-Type": "application/json"
  },
  body: JSON.stringify([
    "550e8400-e29b-41d4-a716-446655440000"
  ])
});
const result = await response.json();
Response json
{
  "deletedIds": ["550e8400-e29b-41d4-a716-446655440000"]
}

Important Note

Deleted collections cannot be restored through the API. Links that belong to deleted collections will still exist but may need to be moved to active collections for proper organization.