Skip to main content
PUT/users/mass_update_standard_attributes/

Mass update standard attributes

HTTP PUT request enabling you to update chosen standard attribute for users in bulk.

Allowed attributes: assigned_to, city, company_id, country, email, facebook_url, first_name, gender, google_url, gravatar_url, last_name, linkedin_url, notifications, phone_number, region, score, status, timezone, twitter_url, unsubscribed, custom_id.

Attributes

Optional unless marked required

idslist(integers)required
List of users' ids (unique identifiers for the user which are given by User automatically).
attributestringrequired
A name of your attribute. It must a be a standard and allowed for update attribute.
valuedepending on the attribute typerequired
A value for the attribute

Request​

curl -X PUT "https://<your_app_subdomain>.user.com/api/public/users/mass_update_standard_attributes/" \
-H "Authorization: Token <your_64_char_api_key>" \
-H "Accept: */*; version=2" \
-H "Content-Type: application/json" \
-d '{
"ids": [
1924,
1925,
1926
],
"attribute": "country",
"value": "Poland"
}'

Response examples​

{
"status": "ok"
}

A 400 names the fields that were rejected. The messages you're most likely to see:

MessageWhen
This field is required.ids, attribute or value is missing (each missing field is listed).
<name> is not a valid user attribute.No contact attribute has that name.
Enter a valid email address. (in non_field_errors)value doesn't fit the attribute, here email.

IDs in ids that aren't contacts are skipped: the other contacts are updated and the response is 200 as usual.

Response fields​

Fields returned in the 200 OK response body.

statusstring
ok when the update was accepted.
note

Errors that can come from any endpoint (401, 429, 500, 502, 504) are described in HTTP response codes.