I’m about to send data from a webflow form to Klaviyo using the API.
Currently, the process is:
Using the create profile endpoint: https://a.klaviyo.com/api/profiles/ to create a profile with the data from the form.
That works perfectly.
Then I want to subscribe that profile to a list.
I then use the Subscribe Profiles endpoint https://a.klaviyo.com/api/profile-subscription-bulk-create-jobs/ to subscribe the profile with the data gathered from the create a profil API call.
I use the ID from the create a profile API call for the ID in the Subscribe Profiles API Call.
I do not get any errors, but the Subscribe to Profiles does not happen.
Here is the Create profile Body
{
"data": {
"type": "profile",
"attributes": {
"email": "Email
",
"first_name": "Name
",
"location": {
},
"properties": {
"newKey": "New Value"
}
}
}
}
Here is the subscribe profiles body:
{
"data": {
"type": "profile-subscription-bulk-create-job",
"attributes": {
"custom_source": "Marketing Event",
"profiles": {
"data": [
{
"type": "profile",
"id": "id
",
"attributes": {
"email": "Email
",
"phone_number": "+15005550006",
"subscriptions": {
"email": [
"MARKETING"
],
"sms": [
"MARKETING"
]
}
}
}
]
}
},
"relationships": {
"list": {
"data": {
"type": "list",
"id": "RenFTF"
}
}
}
}
}
Any idea why this is not working, or if there is an easier way?
Best