Update the contents of a collection
Replace the contents of a collection (the data from when you created or updated a collection). The request is a free-form object containing the keys you want to reference from the collection and the corresponding values. This request replaces the current contents of the collection entirely.
If you don't want to update the contents directly—you want to change the name or data url for your collection, use the update a collection endpoint.
Note: A collection cannot be more than 10 MB in size. No individual row in the collection can be more than 10 KB.
- Type: integercollection
_id requiredThe identifier for a collection.
Your request is a free form object representing the contents of your collection. This request replaces the contents of the collection entirely, so include all contents that you want to remain in the collection—whether they change or not.
- Type: anythingcollection contents
- application/json
- 404
The collection
iddoes not exist. - 429
Your request is over the 10-per-second limit.
curl https://api.customer.io/v1/collections/1/content \
--request PUT \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"eventName": "christmas",
"eventDate": {},
"presents": {
"something_you_want": "toys",
"something_you_need": "socks",
"total": 2
}
}'
{
"collection": {
"bytes": 296,
"created_at": 1552341937,
"updated_at": 1552341937,
"id": 1,
"name": "upcoming events",
"rows": 2,
"schema": [
"eventDate",
"eventName",
"presents"
]
}
}Returns your collection metadata and the updated schema.