v1.0.0
OpenAPI 3.1.0
Create a collection
Client Libraries
US region
Create a new collection and provide the data that you'll access from the collection or the url that you'll download CSV or JSON data from.
Note: A collection cannot be more than 10 MB in size. No individual row in the collection can be more than 10 KB.
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 \
--request POST \
--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.