# Set an account roles

Update an account roles using accountId.

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

## Security:

  - `mms` (unknown)
    apiKey in header x-api-key

## 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 204:

  - `204` (unknown)
    No Content

## Response 400:

  - `400` (unknown)
    Bad Request

## 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 401:

  - `401` (unknown)
    Unauthorized

## Response 401 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 403:

  - `403` (unknown)
    Forbidden

## Response 403 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 404:

  - `404` (unknown)
    Not Found

## Response 404 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 500:

  - `500` (unknown)
    Internal Server Error

## Response 500 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

