Skip to main content
Contributor I
Jul 30, 2025 7:35 PM UTC
Solved

Supplying data for template when sending campaign

I want to sent out an email to a specific list via the API, using a template. This is already working, but:
My templates has variables such as {{ intro_text }}, {{ offer_title }} etc.. Where do i supply this data? I cant find any information in the docs, and i tried adding it to attributes to both the campaign and the campaign-message. What am i missing?


Here is my api call as of now:

I created a campaign, and included the list id in audiences.
I have assigned a template via the /campaign-message-assign-template endpoint

I send out the campaign with the /campaign-send-jobs endpoint

​​​​​​​

Can you help?

Best regards,

Lars

Byrne C
Byrne CAnswer
Community Manager
Aug 4, 2025 1:13 PM UTC

Thanks for confirming. Unfortunately, at this time, Klaviyo templates only support Klaviyo variables, and not custom template variables that would work for templates outside of Klaviyo. You can take a look at our message personalization reference article here, which goes into more detail on the type of variables that Klaviyo supports.

3 replies

Byrne C
Community Manager
Community Manager
Jul 31, 2025 9:02 PM UTC

Hi ​@larsu,

The variables {{ intro_text }} and {{ offer_title }} don’t appear to be Klaviyo variables, so our templates won’t display them. If you were to use a variable like {{ person.email }}, you’d see the profile property populate in the template. 

Let me know if I’m missing something. Also, a screenshot of the API call would be helpful as well! Thanks.

larsuAuthor
Contributor I
Aug 4, 2025 8:42 AM UTC

That is my question, how do i supply custom template variables when sending out a campaign with a template?

Byrne C
Community Manager
Byrne CAnswer
Community Manager
Aug 4, 2025 1:13 PM UTC

Thanks for confirming. Unfortunately, at this time, Klaviyo templates only support Klaviyo variables, and not custom template variables that would work for templates outside of Klaviyo. You can take a look at our message personalization reference article here, which goes into more detail on the type of variables that Klaviyo supports.