Skip to main content
Delete Collection
Deletes a sub-collection, every collection under it at any depth, and the saves they hold. The root collection cannot be deleted. The saved entities themselves are not deleted.

Path Parameters

string
required
The ID of the collection to delete.

Query Parameters

string
Service key only, and required with one: the user this request acts as. Must own the collection. A user token always acts as its own user and must not send it (400 collection/acting-user-not-allowed).

Response

Returns 200 with the IDs of every collection the request deleted.
string[]
The deleted collection first, then every collection under it at any depth, in no particular order. An entity that listed any of these in saved.collections no longer does.

Error Responses

Returned when the collection doesn’t exist, doesn’t belong to the authenticated user, or is the root collection (which cannot be deleted).
A service key sent no actingUserId.
A user token sent actingUserId, even naming its own user. Only a service key names the user it acts as; a user token always acts as its own user.
Returned when a service key names an actingUserId that isn’t a user in this project.
The request sent userId. On this route the user a service key acts as is actingUserId.With a service key:
With a user token, or with no credentials: