Skip to main content
July 23, 2024
Solved

What is a valid choice for 'consent' for sms?

  • July 23, 2024
  • 4 replies
  • 190 views

Hi

 

I am using the Subscribe profile api but I am getting this error:

Array ( [errors] => Array ( [0] => Array ( [id] => 29986cec-6e3b-4455-a06f-aaaa376e76e1 [status] => 400 [code] => invalid [title] => Invalid input. [detail] => 'Never subscribed' is not a valid choice for 'consent'. [source] => Array ( [pointer] => /data/attributes/profiles/data/0/attributes/subscriptions/sms/marketing/consent ) [links] => Array ( ) [meta] => Array ( ) ) ) )

 

Thanks.

Adrian (Tudsy)

    This topic has been closed for replies.
    Best answer by

    Hi

    I tried ‘soft-opt-in’ but it did not work. I tried ‘true’ and ‘false’ but it did not work.

    Thanks.

     

    Adrian (tudsy)

    4 replies

    Taylor Tarpley
    Community Manager
    Community Manager
    July 27, 2024

    Hi there @Tudsy

     

    I wonder if any of our API experts @retention or @DavidV could help! 

     

    Thanks for participating in the Community! 

    -Taylor 

    ArpitBanjara
    Principal User II
    Principal User II
    July 27, 2024

    Hey @Tudsy 

    Can you try and let me know if this works?

    Replace 'Never subscribed' with a valid consent value like explicit, implicit, or soft-opt-in.

    I think the value 'Never subscribed' is not valid for the consent attribute in the Subscribe Profile API request for Klaviyo.

    let me know if this helps

    Cheers

    Arpit

    Arpit Banjara - Lead Email Marketing Specialist at Flowium
    Answer
    July 27, 2024

    Hi

    I tried ‘soft-opt-in’ but it did not work. I tried ‘true’ and ‘false’ but it did not work.

    Thanks.

     

    Adrian (tudsy)

    DavidV
    Partner - Platinum
    2025 Champion
    July 29, 2024

    Hi @Tudsy,

    Thank you for your question and thanks for the tag @Taylor Tarpley!

    The correct value for sms→marketing-->consent = SUBSCRIBED

     

    If you are doing a historical import (ie. consent provided outside of Klaviyo) - take note of the below from the documentation:

    This endpoint now supports a historical_import flag. If this flag is set true, profiles being subscribed will bypass double opt-in emails and be subscribed immediately. They will also bypass any associated "Added to list" flows. This is useful for importing historical data where you have already collected consent. If historical_import is set to true, the consented_at field is required and must be in the past.

    I hope that helps - let me know if you have any questions!

    Thanks
    David

    Zyber is New Zealand's leading Shopify Premier & Klaviyo Master Platinum Partner passionate about helping merchants succeed. www.zyber.co.nz & www.unlocked.co.nz