# Update many users at once

Applies one set of changes to many people and returns a token identifying
the queued job. The work happens in the background, so a `200` means the
request was accepted, not that every record has been updated.
Choose the people either explicitly or by filter. `applyTo` of `selected`
takes the ids in `selected`; `applyTo` of `all` takes everyone your token
may read, narrowed by `filter` if you send one and to a single group if you
send `group_id`.
**The fields you may change are the ones `PUT /user/{id}` accepts**,
including the account's custom attributes, sent the same way. Two rules
differ from the single update. Every field you send is applied to every
person selected, so a field left out of the body is the only way to leave it
alone - and if you are building a form that offers "keep existing value" per
field, send that field with a companion `<field>:use_default` of `true` and
it will be skipped.
Records that fail validation individually are reported against the job
rather than rejecting the whole request, so a token can come back for a
request that ends up changing nothing.

Endpoint: PUT /api/v2/user
Version: 2.0.0
Security: default

## Header parameters:

  - `Rosterfy-Platform` (string)

## Request fields (application/json):

  - `filter` (array)
    The filter structure the listing accepts. Used when `applyTo` is `all`.

  - `group_id` (integer)
    Narrows an `applyTo` of `all` to the members of one group. Not validated.

  - `applyTo` (string)
    Whether to update the ids in `selected`, or everyone the request matches. One of `selected` or `all`.

  - `selected` (array)
    IDs of the users to update. Required unless `applyTo` is `all`.

  - `custom_*` (string)
    A custom attribute, named by its code - custom_shirt_size, for example. The value follows the attribute's own type, so it may be a string, a number, a boolean or a list. See the custom attributes documentation.

## Response 200 fields (application/json):

  - `queue` (string)

## Response 422 fields (application/json):

  - `message` (string)

  - `errors` (object)

  - `errors.selected` (array)

