Skip to main content

Hi,

I am getting some strange error messages from Klaviyo API. My code used to work but started to fail today with messages like this: “+16xxxxxxxx could not be subscribed due to Phone number is valid but is not in a supported region for this account." I am trying to subscribe only for emails, why does Klaviyo check the phone number?

I use Python Klaviyo API and I try to call method klaviyo.Profiles.subscribe_profiles(payload)

This is the payload:

payload = { "data": {    "type": "profile-subscription-bulk-create-job",    "attributes": {        "custom_source": "Marketing Event",        "profiles": { "data": profiles_data}    },    "relationships": { "list": { "data": {        "type": "list",        "id": list_id    } } }} }

 

This is definition of profiles:

profiles_data = ]

data_profile = {    "type": "profile",    "id": profilei'id'],    "attributes": {        "email": profilei'email'],        "phone_number": ph_number,        "subscriptions": {            "email": { "marketing": { "consent": "SUBSCRIBED" } }        }    }}profiles_data.append(data_profile)

Can you please help me to understand what is wrong?

Hi @Evg7!

Just to clarify, you didn’t change anything about the code and it suddenly stopped working? I will reach out to the API team on this and get back to you ASAP.

 

Best,

Brian


Reply