Skip to main content
POST
/
:projectId
/
api
/
v7
/
collections
/
:collectionId
/
entities
Add Entity to Collection
curl --request POST \
  --url https://api.replyke.com/api/v6/:projectId/api/v7/collections/:collectionId/entities \
  --header 'Content-Type: application/json' \
  --data '
{
  "entityId": "<string>"
}
'
{
  "success": true,
  "collection": {
    "id": "<string>",
    "entityCount": 123
  }
}
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

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

Body Parameters

entityId
string
required
The ID of the entity to save.

Response

success
boolean
Always true on success.
collection
object
Updated collection metadata.

Error Responses

{ "error": "Collection not found", "code": "collection/not-found" }
{ "error": "Entity not found", "code": "entity/not-found" }
{ "error": "Internal server error.", "code": "collection/server-error" }