Skip to main content
Update Collection
Updates the name of a sub-collection. The root collection cannot be renamed (it has parentCollectionId: null, which this endpoint rejects).

Path Parameters

string
required
The ID of the collection to update.

Body Parameters

string
required
The new name for the collection. Trimmed; must be 1 to 255 characters after trimming.
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 the updated Collection object, with its entityCount.

Error Responses

Returned when name is missing, blank after trimming, or longer than 255 characters. The error message names the offending field.
Returned when the collection doesn’t exist, doesn’t belong to the user, or is the root collection (which cannot be renamed).
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: