Solved

Is there a way to allow a user to subscribe to a list using my own signup form?

  • 22 July 2023
  • 3 replies
  • 202 views

Badge
  • Contributor I
  • 2 replies

I just want to have my own email subscribe form post to a klaviyo page that facilitates the subscription. I don’t want to use a pre-built klaviyo form. They don’t work (at least not easily) and they don’t match the the styles on my site. I don’t need a whole klaviyo js frontend loading on my site. This should be really simple. Does it exist?

icon

Best answer by msl 22 July 2023, 21:43

View original

3 replies

Badge

Alright the forms do work, but still, I don’t want the extra fluff for something so simple. My pages went from about 7 files being download to 20+. I will just backwards engineer the json being posted to klaviyo if there’s not an easier way to do this. It’s pretty silly if this simple functionality isn’t available to implement. 

Badge

Here’s the magic incantation from the server side for any future readers. Just replace the three variables indicated by angle brackets. Still annoying that you can’t just do this through an html form without some client side javascript! It’d be so easy!

 

curl --request POST \
--url 'https://a.klaviyo.com/client/subscriptions/?company_id=<COMPANY_ID>' \
--header 'content-type: application/json' \
--header 'revision: 2023-07-15' \
--data '
{
"data": {
"type": "subscription",
"attributes": {
"profile": {
"data": {
"type": "profile",
"attributes": {
"email": "<EMAIL>"
}
}
}
},
"relationships": {
"list": {
"data": {
"type": "list",
"id": "<LIST_ID>"
}
}
}
}
}
'

 

Userlevel 4
Badge +10

Hey @msl there are plenty of other form solutions that have pre-built integrations into Klaviyo. For example Typeforms and Justuno Forms, where you can sync the submissions into Klaviyo. You also could build on their API if you’re so included.

 

Also I just did a little digging and found this previous community thread that may answer your q as well? 

https://klaviyo-en.insided.com/sign-up-forms-38/how-to-link-my-custom-form-back-to-a-klaviyo-list-8518

 

Reply