v1.0.0
OpenAPI 3.1.0

Update the contents of a collection

US region

Client Libraries

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.

Path Parameters
  • collection_id
    Type: integer
    required

    The identifier for a collection.

Body
application/json

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.

  • collection contents
    Type: anything
Responses
  • application/json
  • 404

    The collection id does not exist.

  • 429

    Your request is over the 10-per-second limit.

Request Example for put/v1/collections/{collection_id}/content
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"
    ]
  }
}