Skip to main content
Add Entity to Collection
Saves an entity into the specified collection. This operation is idempotent — if the entity is already in the collection, it returns success without creating a duplicate.

Path Parameters

string
required
The ID of the collection to save the entity into.

Body Parameters

string
required
The ID of the entity to save.
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

boolean
Always true on success.
object
Updated collection metadata.

Error Responses

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: