{"info":{"_postman_id":"b2c8b408-09ca-4678-b3fd-5b1b742bf792","name":"User Hub Bulk APIs","description":"<html><head></head><body><p>Use the User Hub Bulk APIs to import your end users' data into Helpshift, and export current end user data from Helpshift.</p>\n<p>To use this Postman collection, you will need to know your Helpshift domain and the API key, which is available on the admin dashboard under Settings -&gt; APIs.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"14405739","collectionId":"b2c8b408-09ca-4678-b3fd-5b1b742bf792","publishedId":"2sAYkKGwzQ","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-03-25T03:59:10.000Z"},"item":[{"name":"Create Bulk Action Task","event":[{"listen":"test","script":{"exec":["pm.test(\"Successful POST request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([201]);","});","if (pm.response.code != 201) {","    return;","}","","var jsonData = pm.response.json();","// if the bulk task was created, save the task-id for future requests","pm.environment.set(\"task_id\", jsonData.task_id);","console.log(\"Setting task_id to \" + jsonData.task_id);"],"type":"text/javascript","packages":{},"id":"47a8b43d-6758-49c3-b283-01f1e33cc342"}}],"id":"35a739dd-d1b1-4589-845c-def4304c7eda","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"action","value":"create_core_profiles","type":"text"},{"key":"payload","value":"[{\"identities\":[{\"uid\":\"uid-1\"}],\"last_country\":\"India\",\"last_city\":\"Pune\"},{\"identities\":[{\"uid\":\"uid-2\"}],\"last_country\":\"Pakistan\",\"last_city\":\"Karachi\"},{\"identities\":[{\"uid\":\"uid-3\"}],\"last_country\":\"Sri Lanka\",\"last_city\":\"Colombo\"}]","type":"text"}]},"url":"https://api.helpshift.com/v2/{{domain}}/identity/bulk_actions","description":"<p>Create a new Bulk Import task to import end user data into Helpshift, or export end user data from Helpshift.</p>\n<p>The following task types are supported -</p>\n<ul>\n<li><p>create_core_profiles - Create new core profiles (domain level profiles corresponding to an end user)</p>\n</li>\n<li><p>update_core_profiles - Update existing core profiles</p>\n</li>\n<li><p>update_app_profiles - Update existing app profiles (end user profiles for a specific app)</p>\n</li>\n<li><p>get_core_profiles - Export existing core profiles as JSON</p>\n</li>\n<li><p>get_app_profiles - Export existing app profiles as JSON</p>\n</li>\n</ul>\n<p>The payload for each task type varies, and consists of an array of individual requests for the given task type. See <a href=\"https://developers.helpshift.com/rest-api/user-hub-bulk-apis/\">https://developers.helpshift.com/rest-api/user-hub-bulk-apis/</a> for details.</p>\n<p>The response will contain the Task ID, which can be used to query for task status, and fetch the results (or errors, if any) once the task is completed.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{api-key}}"}]},"isInherited":true,"source":{"_postman_id":"b2c8b408-09ca-4678-b3fd-5b1b742bf792","id":"b2c8b408-09ca-4678-b3fd-5b1b742bf792","name":"User Hub Bulk APIs","type":"collection"}},"urlObject":{"path":["identity","bulk_actions"],"host":["https://api.helpshift.com/v2/{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"d920c8ab-b8a5-40f7-886c-e36f3f01c68d","name":"Create Bulk Action Task","originalRequest":{"method":"POST","header":[],"body":{"mode":"urlencoded","urlencoded":[{"key":"action","value":"create_core_profiles","type":"text"},{"key":"payload","value":"[{\"identities\":[{\"uid\":\"uid-1\"}],\"last_country\":\"India\",\"last_city\":\"Pune\"},{\"identities\":[{\"uid\":\"uid-2\"}],\"last_country\":\"Pakistan\",\"last_city\":\"Karachi\"},{\"identities\":[{\"uid\":\"uid-3\"}],\"last_country\":\"Sri Lanka\",\"last_city\":\"Colombo\"}]","type":"text"}]},"url":"https://api.helpshift.com/v2/domain/identity/bulk_actions"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.27.0"},{"key":"Date","value":"Mon, 24 Mar 2025 05:00:48 GMT"},{"key":"Content-Type","value":"application/json;charset=utf-8"},{"key":"Content-Length","value":"46"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Accept,Authorization,Content-Type,Keep-Alive,Origin,User-Agent,X-Requested-With,X-Hs-Access-Token"},{"key":"Access-Control-Max-Age","value":"86400"},{"key":"X-Rate-Limit-Remaining","value":"59"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"x-hs-request-id","value":"deffcb5b-f630-4c5f-8e6f-606daebdc7a7"},{"key":"X-Rate-Limit-Reset","value":"1742792447182"},{"key":"X-Rate-Limit-Limit","value":"60"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, PUT, DELETE, OPTIONS"}],"cookie":[],"responseTime":null,"body":"{\n    \"task_id\": 2537897885211136,\n    \"state\": \"created\"\n}"}],"_postman_id":"35a739dd-d1b1-4589-845c-def4304c7eda"},{"name":"Get Task Status","id":"9ddfac59-dca9-4c0b-af48-f503e5940a81","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://api.helpshift.com/v2/{{domain}}/identity/bulk_actions/{{task_id}}","description":"<p>Get the current status of a previoiusly created Bulk Action task.</p>\n<p>The response will contain the current state of the task, which can be one of -</p>\n<ul>\n<li><p>created - task has been created, but not picked for execution yet</p>\n</li>\n<li><p>queued - task has been validated, and queued for processing</p>\n</li>\n<li><p>processing - the task is currentl;y being processed</p>\n</li>\n<li><p>completed - the task has finished, either successfully, or with errors</p>\n</li>\n</ul>\n<p>The response will also contain a progress percentage, and two boolean flags -</p>\n<ul>\n<li><p>errors - when true, the task result had one or more errors</p>\n</li>\n<li><p>results - when true, the task results are available for download</p>\n</li>\n</ul>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{api-key}}"}]},"isInherited":true,"source":{"_postman_id":"b2c8b408-09ca-4678-b3fd-5b1b742bf792","id":"b2c8b408-09ca-4678-b3fd-5b1b742bf792","name":"User Hub Bulk APIs","type":"collection"}},"urlObject":{"path":["identity","bulk_actions","{{task_id}}"],"host":["https://api.helpshift.com/v2/{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"0bfc551d-41e2-4c53-8433-67f6b55db043","name":"Get Task Status","originalRequest":{"method":"GET","header":[],"url":"https://api.helpshift.com/v2/domain/identity/bulk_actions/"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Server","value":"nginx/1.27.0"},{"key":"Date","value":"Mon, 24 Mar 2025 05:00:57 GMT"},{"key":"Content-Type","value":"application/json;charset=utf-8"},{"key":"Content-Length","value":"74"},{"key":"Connection","value":"keep-alive"},{"key":"Access-Control-Allow-Headers","value":"Accept,Authorization,Content-Type,Keep-Alive,Origin,User-Agent,X-Requested-With,X-Hs-Access-Token"},{"key":"Access-Control-Max-Age","value":"86400"},{"key":"X-Rate-Limit-Remaining","value":"58"},{"key":"Access-Control-Allow-Credentials","value":"true"},{"key":"x-hs-request-id","value":"9bd3a975-fb7c-4487-9eb4-ed1de4cbc430"},{"key":"X-Rate-Limit-Reset","value":"1742792507462"},{"key":"X-Rate-Limit-Limit","value":"60"},{"key":"Access-Control-Allow-Methods","value":"GET, POST, PUT, DELETE, OPTIONS"}],"cookie":[],"responseTime":null,"body":"{\n    \"state\": \"created\",\n    \"progress_percentage\": 0,\n    \"errors\": false,\n    \"results\": false\n}"}],"_postman_id":"9ddfac59-dca9-4c0b-af48-f503e5940a81"},{"name":"Get Task Results","id":"6cd34e76-8996-4fc9-a427-aca5618613dd","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://api.helpshift.com/v2/{{domain}}/identity/bulk_actions/{{task_id}}/results","description":"<p>Get the results of the given bulk action task.</p>\n<p>The API response will be a compressed file containing JSON data. The format of the JSON data will vary based on the task type.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{api-key}}"}]},"isInherited":true,"source":{"_postman_id":"b2c8b408-09ca-4678-b3fd-5b1b742bf792","id":"b2c8b408-09ca-4678-b3fd-5b1b742bf792","name":"User Hub Bulk APIs","type":"collection"}},"urlObject":{"path":["identity","bulk_actions","{{task_id}}","results"],"host":["https://api.helpshift.com/v2/{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"e5caa7ec-ca63-4d2c-8a5f-ff2c94bdab3c","name":"Get Task Results","originalRequest":{"method":"GET","header":[],"url":"https://api.helpshift.com/v2/domain/identity/bulk_actions//results"},"status":"OK","code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"<zip file containing results of bulk actions>"}],"_postman_id":"6cd34e76-8996-4fc9-a427-aca5618613dd"},{"name":"Get Task Errors","id":"5b39fd3e-267d-4341-b805-d853250465a1","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"method":"GET","header":[],"url":"https://api.helpshift.com/v2/{{domain}}/identity/bulk_actions/{{task_id}}/errors","description":"<p>Get details of any errors encountered while processing the given bulk action task.</p>\n<p>The API response will be a compressed file containing JSON data. The format of the JSON data will vary based on the task type. If there were no errors, the file will be empty.</p>\n","auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{api-key}}"}]},"isInherited":true,"source":{"_postman_id":"b2c8b408-09ca-4678-b3fd-5b1b742bf792","id":"b2c8b408-09ca-4678-b3fd-5b1b742bf792","name":"User Hub Bulk APIs","type":"collection"}},"urlObject":{"path":["identity","bulk_actions","{{task_id}}","errors"],"host":["https://api.helpshift.com/v2/{{domain}}"],"query":[],"variable":[]}},"response":[{"id":"2438cb5b-fda8-4d06-9ba1-58d732b5698a","name":"Get Task Errors","originalRequest":{"method":"GET","header":[],"url":"https://api.helpshift.com/v2/domain/identity/bulk_actions//errors"},"code":200,"_postman_previewlanguage":"Text","header":[],"cookie":[],"responseTime":null,"body":"<zip file containing errors encountered during bulk action processing>"}],"_postman_id":"5b39fd3e-267d-4341-b805-d853250465a1"}],"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"{{api-key}}"}]}},"event":[{"listen":"prerequest","script":{"type":"text/javascript","packages":{},"exec":[""],"id":"868167ce-1fa6-4eac-84f8-8942f7aca259"}},{"listen":"test","script":{"type":"text/javascript","packages":{},"exec":[""],"id":"27b7ff03-057f-4c9d-b395-b325cdd19e6b"}}],"variable":[{"key":"base_url","value":"https://api.helpshift.com/v2/{{domain}}","type":"string"}]}