{"_id":"587768c9511a4e2500f91c5e","version":{"_id":"55781fe25129590d003ff4f7","project":"54aa7f773b56130b0056c86e","forked_from":"54aa7f773b56130b0056c871","__v":6,"createdAt":"2015-06-10T11:30:42.700Z","releaseDate":"2015-06-10T11:30:42.700Z","categories":["55781fe35129590d003ff4f8","55781fe35129590d003ff4f9","55781fe35129590d003ff4fa","55781fe35129590d003ff4fb","55781fe35129590d003ff4fc","55781fe35129590d003ff4fd","55781fe35129590d003ff4fe","564bbc7e8841060d00abb2ee","565b66c446118c0d00dcb0bb","56898269f8dc340d00308c13","582318b23b961a0f009516a1","594a848c9f4771001a43c959"],"is_deprecated":false,"is_hidden":false,"is_beta":false,"is_stable":true,"codename":"Developers","version_clean":"2.0.0","version":"2.0"},"parentDoc":null,"project":"54aa7f773b56130b0056c86e","__v":4,"user":"5874dcd9edcf9f2f00f9e0af","category":{"_id":"564bbc7e8841060d00abb2ee","__v":10,"pages":["564bbf454bf5c80d0020901e","564bc1b08b1c5521002bb914","564c387b9baa330d00faa622","564c3a7b61008d17006ffa3a","564c3e4083b72c2b00b36fb6","564c431b61008d17006ffa46","564c4bc9b9cdb41700a0eae7","564c4e955f9d102b00fc3b4a","564c5f32c241881700d85981","564c68a93eb8f81700838a25"],"project":"54aa7f773b56130b0056c86e","version":"55781fe25129590d003ff4f7","sync":{"url":"","isSync":false},"reference":true,"createdAt":"2015-11-17T23:47:10.058Z","from_sync":false,"order":1,"slug":"pulsate-cms-api","title":"Pulsate CMS API"},"githubsync":"","updates":[],"next":{"pages":[],"description":""},"createdAt":"2017-01-12T11:30:17.517Z","link_external":false,"link_url":"","sync_unique":"","hidden":false,"api":{"examples":{"codes":[{"code":"curl -X PUT \"https://control.pulsatehq.com/api/v1/apps/$APP_ID/users/batch\"\n  -H \"Authorization: Token token=$MY_ADMIN_API_TOKEN\"\n  -d '{\n    \"aliases\": [\"sample_alias\"],\n    \"custom_attributes\": [\n      {\n        \"name\": \"firstName\",\n        \"value\": \"John\",\n        \"type\": \"String\",\n        \"action\": \"Update\"\n      }\t\n    ]\n  }'","name":"","language":"shell"}]},"method":"put","results":{"codes":[{"status":200,"language":"json","code":"{\n  \"batch_id\": \"sample_batch_id\"\n}","name":""},{"language":"text","code":""}]},"settings":"564bbbf80cbcc91700b8171c","auth":"required","params":[{"_id":"57ff831b159c7e0e003c4827","ref":"","in":"path","required":true,"desc":"App ID. It can be fetched by using \"Apps: Get All (Index)\" or \"Apps: Get One (Show)\" endpoints.","default":"","type":"string","name":"app_id"},{"_id":"58776acbb8e8fb1900608eb6","ref":"","in":"body","required":true,"desc":"User unique alias-es within the App. Endpoint operates on first 500 entries in the array.","default":"","type":"array_string","name":"aliases"},{"_id":"58776acbb8e8fb1900608eb7","ref":"","in":"body","required":false,"desc":"Webhook for updating user","default":"","type":"string","name":"webhook"},{"_id":"58776acbb8e8fb1900608eb5","ref":"","in":"body","required":false,"desc":"Attributes to be updated for all given users","default":"","type":"array_object","name":"custom_attributes"},{"_id":"58776acbb8e8fb1900608eb4","ref":"","in":"body","required":false,"desc":"User attribute name","default":"","type":"string","name":"custom_attributes[].name"},{"_id":"58776acbb8e8fb1900608eb3","ref":"","in":"body","required":false,"desc":"User attribute value","default":"","type":"string","name":"custom_attributes[].value"},{"_id":"58776acbb8e8fb1900608eb2","ref":"","in":"body","required":false,"desc":"User attribute type, can be one of: ['Boolean', 'Date', 'Float', 'Integer', 'Numeric', 'String']","default":"","type":"string","name":"custom_attributes[].type"}],"url":"/apps/:app_id/users/batch"},"isReference":true,"order":61,"body":"[block:callout]\n{\n  \"type\": \"danger\",\n  \"title\": \"API Limits\",\n  \"body\": \"A single request can update maximum 500 users at once. If a request payload contains more than 500 aliases only first 500 aliases will be processed and only 500 users will be updated.\\nUpdates of 501 users and above can be achieved by performing more than one API request.\\n\\nAPI allows up to 100 requests per minute. When updating more than 50,000 users at a time calls to the API has to be spread in time to avoid breaching the limit. Calls are counted cumulatively for each user's IP address across all API endpoints.\"\n}\n[/block]","excerpt":"","slug":"users-update-batch","type":"endpoint","title":"Users: Update Batch"}

putUsers: Update Batch


Definition

{{ api_url }}{{ page_api_url }}

Parameters

Path Params

app_id:
required
string
App ID. It can be fetched by using "Apps: Get All (Index)" or "Apps: Get One (Show)" endpoints.

Body Params

aliases:
required
array of strings
User unique alias-es within the App. Endpoint operates on first 500 entries in the array.
webhook:
string
Webhook for updating user
custom_attributes:
array of objects
Attributes to be updated for all given users
custom_attributes[].name:
string
User attribute name
custom_attributes[].value:
string
User attribute value
custom_attributes[].type:
string
User attribute type, can be one of: ['Boolean', 'Date', 'Float', 'Integer', 'Numeric', 'String']

Examples


Result Format


Documentation

[block:callout] { "type": "danger", "title": "API Limits", "body": "A single request can update maximum 500 users at once. If a request payload contains more than 500 aliases only first 500 aliases will be processed and only 500 users will be updated.\nUpdates of 501 users and above can be achieved by performing more than one API request.\n\nAPI allows up to 100 requests per minute. When updating more than 50,000 users at a time calls to the API has to be spread in time to avoid breaching the limit. Calls are counted cumulatively for each user's IP address across all API endpoints." } [/block]

User Information

Try It Out

put
{{ tryResults.results }}
Method{{ tryResults.method }}
Request Headers
{{ tryResults.requestHeaders }}
URL{{ tryResults.url }}
Request Data
{{ tryResults.data }}
Status
Response Headers
{{ tryResults.responseHeaders }}