v1.0.0
OpenAPI 3.1.0
Update a collection
Client Libraries
US region
Update the name or replace the contents of a collection. Updating the data or url for your collection fully replaces the contents of the collection.
Note:
The identifier for a collection.
An array of data objects that you want to reference in this collection.
The name of the collection. This is how you'll reference your collection in messages—{{collection_name.data-property}}.
Your request was malformed.
Your request is over the 10-per-second limit.
curl https://api.customer.io/v1/collections/1 \
--request PUT \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"name": "events",
"data": [
{
"eventName": "christmas",
"eventDate": {},
"presents": {
"something_you_want": "toys",
"something_you_need": "socks",
"total": 2
}
},
{
"eventName": "birthday",
"eventDate": {},
"presents": {
"something_you_want": "video games",
"something_you_need": "books",
"total": 2
}
}
]
}'
{
"collection": {
"bytes": 296,
"created_at": 1552341937,
"updated_at": 1552341937,
"id": 1,
"name": "upcoming events",
"rows": 2,
"schema": [
"eventDate",
"eventName",
"presents"
]
}
}The collection was created successfully.