v1.0.0
OpenAPI 3.1.0
Update snippets
Client Libraries
US region
In your payload, you'll pass a name and value. Snippet names are unique. If the snippet name does not exist, we'll create a new snippet. If the name exists, we'll update the existing snippet.
Request body for creating or updating a snippet. Only name and value are accepted; updated_at is returned in responses only.
The name of the snippet, must be unique. Trimmed of leading and trailing whitespace before storage.
The contents of the snippet (plain text or Liquid). Trimmed of leading and trailing whitespace before storage. Max length is environment-specific (default 16000).
The request is malformed.
Your request is over the 10-per-second limit.
curl https://api.customer.io/v1/snippets \
--request PUT \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
--data '{
"name": "address",
"value": "<strong>My Company</strong></br>1234 Fake St<br/>Fake,NY<br/>10111"
}'
{
"snippet": {
"name": "address",
"value": "<strong>My Company</strong></br>1234 Fake St<br/>Fake,NY<br/>10111",
"updated_at": 1582500000
}
}Returns an array of snippets.