When using the following code its creating two profiles instead of combining them. Any idea why?# configuring sms_consent mapping to boolean value
sms_consent = True
# configuring $consent mapping to list value
#consent = input_data["$consent"].split(",")
payload = {"profiles": [
{"email": input_data["email"]},
{
"first_name": input_data["name"],
"phone_number": input_data["phone_number"],
"sms_consent": sms_consent,
"$consent": ["sms","email"]
}
]}
headers = {
"Accept": "application/json",
"Content-Type": "application/json"
}
response = requests.request("POST", url, json=payload, headers=headers, params=querystring)
# Zapier requires an 'output' object
output = {"response text": response.text}
Best answer by JeffV.klaviyo
View original