post https://a.klaviyo.com/api/campaign-message-assign-template
Creates a non-reusable version of the template and assigns it to the message.
Rate limits:
Burst: 10/s
Steady: 150/m
Scopes:
campaigns:write
Responses
Creates a non-reusable version of the template and assigns it to the message.
Rate limits:
Burst: 10/s
Steady: 150/m
Scopes:
campaigns:write
xxxxxxxxxx
20curl --request POST \
--url https://a.klaviyo.com/api/campaign-message-assign-template \
--header 'Authorization: Klaviyo-API-Key your-private-api-key' \
--header 'accept: application/vnd.api+json' \
--header 'content-type: application/vnd.api+json' \
--header 'revision: 2025-01-15' \
--data '
{
"data": {
"type": "campaign-message",
"relationships": {
"template": {
"data": {
"type": "template"
}
}
}
}
}
'
xxxxxxxxxx
58}
{
"data": {
"type": "campaign-message",
"id": "string",
"attributes": {
"label": "string",
"channel": "string",
"content": {
"subject": "Buy our product!",
"preview_text": "My preview text",
"from_email": "store@my-company.com",
"from_label": "My Company",
"reply_to_email": "reply-to@my-company.com",
"cc_email": "cc@my-company.com",
"bcc_email": "bcc@my-company.com"
},
"send_times": [
{
"datetime": "2022-11-08T00:00:00+00:00",
"is_local": true
}
],