Update the contents of a collection
Replace the contents of a collection (the data from when you created or updated a collection). Send the rows as a JSON array of objects, or as CSV with a Content-Type of text/csv. This request replaces the current contents of the collection entirely, and Customer.io responds once the change is done.
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 that you upload or send in an API request can be up to 10 MB. A collection that you load from files, with write requests or a sync, can be larger: each file can be up to 500 MB and 1,000,000 rows. Each top-level field in a row can hold up to 10,000 characters. The total size of all collections in your account can't exceed 5 GB. Customer.io rejects a request that would take your account over that limit.
- Type: integercollection
_id requiredThe identifier for a collection.
The rows of your collection. This request replaces the contents of the collection entirely, so include every row that you want to keep, whether it changes or not.
- Type: array object[]
- application/json
- 404
The collection
iddoes not exist. - application/json
[
{
"eventName": "christmas",
"eventDate": {},
"presents": {
"something_you_want": "toys",
"something_you_need": "socks",
"total": 2
}
}
]
{
"collection": {
"bytes": 296,
"created_at": 1552341937,
"delete_field": "deleted",
"id": 1,
"key_field": "sku",
"name": "upcoming events",
"rows": 2,
"schema": [
"eventDate",
"eventName",
"presents"
],
"updated_at": 1552341937
}
}Returns your collection metadata and the updated schema.