Feature request: Add optin_process field to List object, and allow it to be mutated


Userlevel 3
Badge +4

First off, thank you for you this forum community! Just found it and joined today.

We built a lead capture app and allow our users to select the Klaviyo list they want to send all their leads to. However, there are times we only want to show lists that have their Opt-in Process set to “Double opt-in” so that lead quality remains high during lead capture campaigns, and to alert if this setting were to change during an active campaign.

 

 

It’s currently not possible to update or even read this setting via the API. Ideally, I think apps should be able to do both (given the API key in use has all required permissions).

Are there others out there who would benefit from this, and if so, what’s your use case?

The only workaround we have at the moment is to say “Please open your Klaviyo List settings and verify that the Opt-in Process setting is correct”. Then hope they actually did. Not a great flow.

 

 Get Lists

curl --request GET \
--url 'https://a.klaviyo.com/api/lists/?fields[list]=name,optin_process' \
--header 'Authorization: Klaviyo-API-Key your-private-api-key' \
--header 'accept: application/json' \
--header 'revision: 2023-02-22'


== RESPONSE ==

{
"data": [
{
"type": "list",
"id": "Y6nRLr",
"attributes": {
"name": "Newsletter"
"optin_process": "DOUBLE"
},
"links": {
"self": "https://a.klaviyo.com/api/lists/Y6nRLr/"
}
}
]
}

 

Update List

curl --request PATCH \
     --url https://a.klaviyo.com/api/lists/Y6nRLr/ \
     --header 'Authorization: Klaviyo-API-Key your-private-api-key' \
     --header 'accept: application/json' \
     --header 'content-type: application/json' \
     --header 'revision: 2023-02-22' \
     --data '
{
     "data": {
          "type": "list",
          "id": "Y6nRLr",
          "attributes": {
               "optin_process": "SINGLE"
          }
     }
}
'

 


2 replies

Badge +6

You could use Tags and pull those via the API. Not a foolproof solution, but better than having to open Klaviyo and check each time. Just need to make sure new lists are tagged correctly.

Userlevel 3
Badge +4

Thanks for the suggestion, @Mineral-CR! Our app doesn’t create Lists though, it selects existing Lists and we can’t see what the opt-in process is via the API.

Reply