Hello,
I’m trying to call “profile-subscription-bulk-create-job” exactly as it is recommended in https://developers.klaviyo.com/en/reference/subscribe_profiles :
{
"data": {
"type": "profile-subscription-bulk-create-job",
"attributes": {
"custom_source": "Marketing Event",
"profiles": {
"data": [
{
"type": "profile",
"id": "01HDPB6Q6FWBQH3T3CRYRFJJRZ",
"attributes": {
"email": "morag@fakeshop.co.uk",
"phone_number": "+15005550006",
"subscriptions": {
"email": {
"marketing": {
"consent": "SUBSCRIBED"
}
},
"sms": {
"marketing": {
"consent": "SUBSCRIBED"
}
}
}
}
}
]
}
},
"relationships": {
"list": {
"data": {
"type": "list",
"id": "Y9LmPZ"
}
}
}
}
}
But Klaviyo returns an error:
{
"errors": [{
"id": "58642876-4801-42d9-9698-bbcefbd12745",
"status": 400,
"code": "invalid",
"title": "Invalid input.",
"detail": "An invalid field type was passed in.",
"source": {
"pointer": "/data"
},
"meta": {}
}
]
}
Actually I’m not interested in SMS subscription and relationships and simply want to update subscription status from a 3rd party system but it returns same error.
{
"data": {
"type": "profile-subscription-bulk-create-job",
"attributes": {
"profiles": {
"data": [
{
"type": "profile",
"attributes": {
"email": "morag@fakeshop.co.uk",
"subscriptions": {
"email": {
"marketing": {
"consent": "SUBSCRIBED"
}
}
}
}
}
]
}
}
}
}