{"info":{"_postman_id":"c2ba923a-e500-4068-958c-220ba62ddf1c","name":"Klaviyo Example API","description":"<html><head></head><body><p><em>Disclaimer: This is provided as is in a way to help the community to be able to mass remove users from a list. Use at your own risk. I'm / we're in no way responsible if something goes wrong. Always make sure you have a backup (export CSV).</em></p>\n<p><strong>An easy way to remove subscribers from a Klaviyo list</strong></p>\n<p>Klaviyo does not provide an option to delete users from a list without manually removing them one by one.</p>\n<p>Using the information found in the <a href=\"https://developers.klaviyo.com/en/reference/remove-members\">klaviyo development documentation</a> I've created this as a way to remove contacts from a list by using a CSV file with all email addresses in the header Email.</p>\n<p>Use case:<br>While having to split up a main list in seperate sub-lists I encountered an issue that we could create a segment, export those and import them to a new list but we couldn't do the same for removing subscriber from a list.</p>\n<p>The API does provide an option so we've created this workaround where you can delete users from a list.</p>\n<p>What is needed:</p>\n<p><strong>From Klaviyo</strong></p>\n<ol>\n<li>Create a separate API key using the following link: <a href=\"https://www.klaviyo.com/account#api-keys-tabGet\">https://www.klaviyo.com/account#api-keys-tab</a></li>\n<li>Get the list id by opening up the list you want to remove people from and go to the settings page. (Top left you'll find the list ID).</li>\n<li>Have a CSV of email addresses you'd like to remove from a list with the header having Email for the email field. Tip: use a CSV file with 1 or 2 emailaddresses (your own) for a test first.</li>\n</ol>\n<p><strong>In Postman</strong></p>\n<ol>\n<li>Click on Klaviyo Example API collection and click on variables and fill in your API_Key and ListID and hit save.</li>\n<li>Now Click on Run and on the left side select the action you'd like to perform (Add or Delete members)</li>\n<li>On the righthand side select the CSV file you want to use and hit the Run button.</li>\n</ol>\n<p>If all goes well you should have removed or added members from/to a list.</p>\n<p>Omar Lovert<br>Polaris Growth - Klaviyo Gold Partner<br><a href=\"https://www.polarisgrowth.com\">https://www.polarisgrowth.com</a></p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"21332608","collectionId":"c2ba923a-e500-4068-958c-220ba62ddf1c","publishedId":"Uz5Kjtqz","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"EF5B25"},"publishDate":"2022-06-07T13:14:45.000Z"},"item":[{"name":"Delete members","event":[{"listen":"prerequest","script":{"id":"83491e3c-11bd-4af8-a10e-3db5ab782a89","exec":[""],"type":"text/javascript"}}],"id":"9641a08d-f0e4-4a18-b9a0-90ca263fa60f","protocolProfileBehavior":{"disableBodyPruning":true,"disabledSystemHeaders":{"content-type":true}},"request":{"method":"DELETE","header":[{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"\n{\n     \"emails\": [\n          \"{{Email}}\"\n     ]\n}\n"},"url":"https://a.klaviyo.com/api/v2/list/1234567/members?api_key=pk_1234567890123456789","description":"<p>Delete from list</p>\n","urlObject":{"protocol":"https","path":["api","v2","list","1234567","members"],"host":["a","klaviyo","com"],"query":[{"key":"api_key","value":"pk_1234567890123456789"}],"variable":[]}},"response":[],"_postman_id":"9641a08d-f0e4-4a18-b9a0-90ca263fa60f"},{"name":"Add members","id":"c48dc1cf-c1e9-44ff-9a4b-c06617871429","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[{"key":"Accept","value":"application/json"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"\n{\n     \"profiles\": [\n          {\n               \"email\": \"{{Email}}\"\n          }\n     ]\n}\n"},"url":"https://a.klaviyo.com/api/v2/list/1234567/members?api_key=pk_1234567890123456789","urlObject":{"protocol":"https","path":["api","v2","list","1234567","members"],"host":["a","klaviyo","com"],"query":[{"key":"api_key","value":"pk_1234567890123456789"}],"variable":[]}},"response":[],"_postman_id":"c48dc1cf-c1e9-44ff-9a4b-c06617871429"}],"event":[{"listen":"prerequest","script":{"id":"2c62c55f-919d-4bb7-bbf5-0a23de7690f0","type":"text/javascript","exec":[""]}},{"listen":"test","script":{"id":"676a4ac1-5e61-412e-a5e5-119a5f72e952","type":"text/javascript","exec":[""]}}],"variable":[{"key":"ListID","value":"1234567"},{"key":"API_Key","value":"pk_1234567890123456789"}]}