{"_id":"55e7339e2d0d3021000db052","user":"5554788cb450630d00041dbc","category":{"_id":"55e58d1bd101191900f30b1d","version":"55e58b63d101191900f30b16","__v":13,"pages":["55e58d27191aa90d0052b52f","55e58d56191aa90d0052b531","55e58d6ff493c11700584315","55e58d81f493c11700584318","55e59b9bd101191900f30b75","55e59c1ff11ba80d003238f1","55e7325f2d0d3021000db050","55e732ca58e25f35001437a6","55e7339e2d0d3021000db052","55e734aa7991b92100b209ed","55f7028ba7ceef0d00251c19","56669144ce8caf0d006018b6","56d04587376b040b005b2f7d"],"project":"55e58b63d101191900f30b13","sync":{"url":"","isSync":false},"reference":false,"createdAt":"2015-09-01T11:33:47.501Z","from_sync":false,"order":2,"slug":"rest-api","title":"REST API"},"parentDoc":null,"version":{"_id":"55e58b63d101191900f30b16","__v":3,"project":"55e58b63d101191900f30b13","createdAt":"2015-09-01T11:26:27.668Z","releaseDate":"2015-09-01T11:26:27.668Z","categories":["55e58b65d101191900f30b17","55e58d16f493c11700584314","55e58d1bd101191900f30b1d"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"","version_clean":"1.0.0","version":"1.0"},"__v":14,"project":"55e58b63d101191900f30b13","githubsync":"","updates":[],"next":{"pages":[],"description":""},"createdAt":"2015-09-02T17:36:30.530Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"results":{"codes":[{"code":"{\n    \"status\": \"success\"\n}","language":"json","status":200,"name":""},{"name":"","code":"{\n    \"status\": \"success\",\n    \"message\": \"Invalid Segment ID\"\n}","language":"json","status":400},{"code":"{\n    \"message\": \"You are not authorized\"\n}","language":"json","status":401},{"code":"{\n    \"status\": \"failure\",\n    \"message\": \"Oops. Something snapped. Please try again after some time\"\n}","language":"json","status":500},{"code":"{\n    \"status\": \"failure\",\n    \"message\": \"JSON malformed\"\n}","language":"json","status":400},{"code":"{\n    \"status\": \"failure\",\n    \"message\": \"No object named 'delete_list' found in JSON Object\"\n}","language":"json","status":400},{"code":"{\n    \"status\": \"failure\",\n    \"message\": \"No subscriber IDs found in delete_list object\"\n}","language":"json","status":400},{"code":"{\n    \"status\": \"failure\",\n    \"message\": \"Invalid subscriber IDs present in list.\"\n}","language":"json","status":400}]},"settings":"","examples":{"codes":[{"language":"text","code":"// To remove subscribers from a segment with id as 5, you will need to issue a PUT request to the following URL:\n\n// https://pushcrew.com/api/v:version/segments/5/subscribers\n\n//Request body needs to the contain a JSON object in the following format:\n\n{  \n   \"delete_list\":[  \n      \"8fcd1d68c82dd39d65ef8ea9a7948bbe\",\n      \"8bca1d68c92dd39d65ef8ea9a7948bbe\",\n      \"8bca1d69c82d939d65ef8ea9a7948bbe\",\n      \"8bca1d69c82d939d65ef8ea9a7947bbe\"\n   ]\n}"},{"language":"curl","code":"curl -X \"PUT\" -H \"Authorization: key=<insert api token here>\" --data \"{\\\"delete_list\\\":[\\\"2169a28b2fcb0174eea0e6c771dbf754\\\",\\\"346108e3e9d361c1ee10ebdb2e8bb98d\\\"]}\" https://pushcrew.com/api/v1/segments/15/subscribers"}]},"method":"put","auth":"required","params":[],"url":"/segments/:segmentId/subscribers"},"isReference":false,"order":15,"body":"[block:api-header]\n{\n  \"type\": \"basic\",\n  \"title\": \"Response Description\"\n}\n[/block]\nStatus: To denote whether the request succeeded or not. Values can be 'success' or 'failure'.\n\nMessage: Present in case of failure. Used to denote reason of failure.","excerpt":"This endpoint is used to remove subscribers from a segment. The request method of this call needs to be \"PUT\". This will not delete the subscribers permanently. They can be added to a different segment later on.\n\nThe segment id of the segment is passed in the URL and the list of subscribers to be removed from the segment is passed in JSON format in the request body.","slug":"remove-subscribers-from-a-segment","type":"endpoint","title":"Remove Subscribers from a Segment"}

putRemove Subscribers from a Segment

This endpoint is used to remove subscribers from a segment. The request method of this call needs to be "PUT". This will not delete the subscribers permanently. They can be added to a different segment later on. The segment id of the segment is passed in the URL and the list of subscribers to be removed from the segment is passed in JSON format in the request body.

Definition

{{ api_url }}{{ page_api_url }}

Examples


Result Format


Documentation

[block:api-header] { "type": "basic", "title": "Response Description" } [/block] Status: To denote whether the request succeeded or not. Values can be 'success' or 'failure'. Message: Present in case of failure. Used to denote reason of failure.