# Set an account roles

Update an account roles using accountId.

Endpoint: POST /api/v2/accounts/{accountId}/roles
Version: 2.0.0
Security: mms

## Path parameters:

  - `accountId` (string, required)

## Request fields (application/json):

  - `trainer` (boolean)
    If trainer is true, assign trainer right for account, otherwise remove trainer rights.

  - `gymOwner` (boolean)
    If gymOwner is true, assign gymOwner right for account, otherwise remove gymOwner rights.

## Response 400 fields (application/json):

  - `timestamp` (string)
    The timestamp of the request.

  - `path` (string)
    The path requested.

  - `requestId` (string)
    The request ID.
    Example: "de625cf1-1"

  - `status` (integer)
    The http status code.

  - `error` (string)
    The error.

  - `errorCode` (string)
    The static error code.

  - `message` (string)
    The message to describe the error.

  - `fieldErrors` (array)
    The constraint violations.

  - `fieldErrors.name` (string)
    The field name.
    Example: "age"

  - `fieldErrors.message` (string)
    The error message.
    Example: "Must be greater than 10."

  - `fieldErrors.rejectedValue` (any)
    The rejected value.
    Example: 3

  - `metadata` (object)
    Additional information of the error context


## Response 204 fields
