Solved

Delete a profile via API

  • 22 February 2021
  • 16 replies
  • 816 views

Badge +1

Hey is there a way to delete a profile via an API call ?

i am able to unsubscribe the profile from the list but i still dont know how to delete the user profile. 

and the api page doesnt give me any information regarding that part. 

 

icon

Best answer by Paul S 23 February 2021, 14:37

View original

16 replies

Userlevel 5
Badge +10

Hi @Dikshit,

 

It is not currently possible to delete profiles via API at this moment which means this work will need to be handled manually in the account. Linking two articles from our help center in case others see this post and are not sure how to delete profiles.

How to Delete, Merge, and Export a Profile

How to Bulk Delete or Suppress Contacts in Klaviyo

 

Userlevel 5
Badge +8

Hi there,

To add onto Paul’s answer, one way that you can streamline this process if you need to delete a large number of profiles programmatically is to create a list of profiles that you want to delete and add users to that list via API. You can then delete the users in that list via the UI, rather than deleting all of them individually.

Best,

Caroline

Badge +1

Hi there,

To add onto Paul’s answer, one way that you can streamline this process if you need to delete a large number of profiles programmatically is to create a list of profiles that you want to delete and add users to that list via API. You can then delete the users in that list via the UI, rather than deleting all of them individually.

Best,

Caroline

Dear Caroline,

 

I cannot find that delete functionality in the UI of the list

Can you give me some guidance please?

 

Thanks in advance,

Spyros

 

Userlevel 7
Badge +55

Hi @spyroslina2,

Question, are you not seeing the functionality at all? 

You should be able to request the DELETE function within your API calls itself. This deletes a list from an account. This is a destructive operation and cannot be undone. It will also remove flow triggers associated with the list.

curl --request DELETE \

      --url 'https://a.klaviyo.com/api/v2/list/LIST_ID?api_key=PRIVATE_KEY'

I would also refer to Paul’s linked articles as they also provide insight.

 

Best,

Alex

 

Badge +1

Hi @spyroslina2,

Question, are you not seeing the functionality at all? 

You should be able to request the DELETE function within your API calls itself. This deletes a list from an account. This is a destructive operation and cannot be undone. It will also remove flow triggers associated with the list.

curl --request DELETE \

      --url 'https://a.klaviyo.com/api/v2/list/LIST_ID?api_key=PRIVATE_KEY'

I would also refer to Paul’s linked articles as they also provide insight.

 

Best,

Alex

 

Dear Alex,

 

This thread is how to delete Profiles not Lists.

So I assumed the solution proposed by Caroline above was valid.

Caroline’s solution was : if you need to delete a large number of profiles programmatically is to create a list of profiles that you want to delete and add users to that list via API. You can then delete the users in that list via the UI, rather than deleting all of them individually. Unfortunately I cannot find that kind of functionality.

I’m searching a way on how to delete large amount on profiles.

Kind Regards,

Spyros

 

Userlevel 7
Badge +55

Hi @spyroslina2,

The method of deleting all profiles found within a list is how you can delete a large amount at once. As mentioned in our How to Bulk Delete or Suppress Contacts in Klaviyo, once you click into the Settings tab and navigate to Profile Maintenance. Here, you will see a Remove Profiles section where you choose the list or segment you wish to delete from a dropdown menu. Then, click Delete People.

This is the built in Klaviyo method to bulk deleting profiles.

 

Best,
Alex

Badge +1

It’s been 8 months, is there now a delete function in the API?

If not, what is the time line on such a feature?

In the meantime we’ll see what we can do from the client side.

Userlevel 7
Badge +55

Hey there @mac,

Thanks for inquiring about this! 

Currently there has been a request made in our team’s backend for this feature but we cannot offer a timeline right now on an exact release date.

At present I don’t believe there is a way to delete profiles via API as we typically try to keep anything destructive and permanent as manual as possible for precautions sake. This is due to the fact that deleting profiles will also remove a suppression marker from that profile. Hypothetically, if you accidentally delete a profile/contact via API it would be a negative experience for the contact and is a violation of GDPR/Can-Spam. For those reasons I believe such a feature has not been implemented directly into Klaviyo.

I hope to present an update here in the future as well.


Best,

Alex

Badge +1

Thank you for the extra info Alex, one last request and then I shall leave y’all alone for a bit.

Please clarify how deleting a profile would be a violation of the Can-Spam Act.

Userlevel 7
Badge +55

Hey there @mac!

Haha it’s no bother at all! That’s what the community is here for :)

Pretty much, when you remove a profile via API it removes the suppression marker from their profile. This takes away from their ability to have you stop emailing them, and spells out tough penalties for violations. What if someone were to opt out of emails, you delete that data from their profile, and manually add them back into a mailing list? That would cause a lot of errors and issues down the line.

 

Hope that helped!
Alex

Badge +1

That would be why we track such details on our end. ;-)

Userlevel 7
Badge +55

If only that applied to everyone who ever used our product @mac then we’d have a perfect world right haha. So for the larger scenario to be safe, this isn’t currently a feature we have but again we do have it on the roadmap so I am sure there will be some eyes on this as an idea for the future.

Badge +1

I understand completely, our team is pretty used to being the outlier, and, if I were on the hook for a potential avalanche of Can-Spam penalties I would make the same decision. :-)

Badge

We also would like to see this functionality =)

@alex.hong  If there a way how I can delete few test dummy profiles with one api requests? For example remove all profile which in email contains “test_emerj”?

Badge

We also would like to see this functionality =)

@alex.hong  If there a way how I can delete few test dummy profiles with one api requests? For example remove all profile which in email contains “test_emerj”?

I thought i can add those test profile to some test list like “Tempo” and then delete it with

curl --request DELETE \      --url 'https://a.klaviyo.com/api/v2/list/LIST_ID?api_key=PRIVATE_KEY'

But It will not delete profile it self… 

Userlevel 7
Badge +55

Hi there @faggella,

If you are looking to bulk remove test profiles from your Klaviyo account, I would recommend checking out our documentation guide that will walk you through bulk deleting profiles.

My recommendation would be to create a segment of profiles that you can then follow the below guide to delete. 
Here is a guide for creating a segment for future segmenting.

 

Hopefully we can also provide updates with bulk delete API calls as well.

Reply