> ## Documentation Index
> Fetch the complete documentation index at: https://docs.fynn.eu/llms.txt
> Use this file to discover all available pages before exploring further.

# Update account role

> Update the role of an account. The changes will apply immediately after the next page navigation of the user. You cannot change the role of your own account.

<sup>Required permissions: `account:role:write`</sup>



## OpenAPI

````yaml put /accounts/{id}/role
openapi: 3.1.0
info:
  title: Fynn API
  description: ''
  termsOfService: https://www.fynn.eu/tos
  contact:
    name: Fynn UG (haftungsbeschränkt)
    url: https://www.fynn.eu
    email: hi@fynn.eu
  license:
    name: Proprietary
    url: https://www.fynn.eu/license
  version: 0.0.0
servers:
  - url: https://coreapi.io
    description: Production
  - url: https://preview.coreapi.io
    description: Sandbox
security:
  - JWT: []
tags: []
paths:
  /accounts/{id}/role:
    parameters: []
    put:
      tags:
        - Account
      summary: Update account role
      description: >-
        Update the role of an account. The changes will apply immediately after
        the next page navigation of the user. You cannot change the role of your
        own account.


        <sup>Required permissions: `account:role:write`</sup>
      operationId: updateAccountRole
      parameters:
        - name: id
          in: path
          description: Account identifier
          required: true
          deprecated: false
          schema:
            type: string
          style: simple
          explode: false
      requestBody:
        description: The updated Account resource
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/Account.SetAccountRole'
          text/html:
            schema:
              $ref: '#/components/schemas/Account.SetAccountRole'
        required: true
      responses:
        '200':
          description: Account resource updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Account-AccountDetailsRole'
            text/html:
              schema:
                $ref: '#/components/schemas/Account-AccountDetailsRole'
          links: {}
        '400':
          description: Invalid input
        '404':
          description: Resource not found
        '422':
          description: Unprocessable entity
      deprecated: false
      security:
        - JWT:
            - account:role:write
      x-codeSamples:
        - lang: bash
          label: cURL
          source: |-
            curl -X PUT \
             /accounts/{id}/role \
             --header "Content-Type: application/json" \
             --header "Authorization: Bearer <token>" \
             --data '[]'
components:
  schemas:
    Account.SetAccountRole:
      type: object
      description: ''
      deprecated: false
      required:
        - role
      properties:
        role:
          description: The role to set for the account.
          enum:
            - read-only
            - administrator
            - account
    Account-AccountDetailsRole:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          example: 01F9Z3ZJXZQZJZJZJZJZJZJZJZ
          type: string
        user:
          $ref: '#/components/schemas/User-AccountDetailsRole'
          readOnly: true
        role:
          readOnly: true
          default: administrator
          example: administrator
          type: string
          enum:
            - administrator
            - account
            - read-only
        createdAt:
          type: string
          format: date-time
        deactivated:
          readOnly: true
          type: boolean
    User-AccountDetailsRole:
      type: object
      description: ''
      deprecated: false
      properties:
        id:
          readOnly: true
          example: 01F9Z3ZJXZQZJZJZJZJZJZJZJZ
          type: string
        firstName:
          minLength: 2
          maxLength: 255
          readOnly: true
          description: The firstname of the user
          example: John
          type: string
        lastName:
          minLength: 2
          maxLength: 255
          readOnly: true
          description: The lastname of the user
          example: Doe
          type: string
        email:
          format: email
          externalDocs:
            url: https://schema.org/email
          type: string
      required:
        - firstName
        - lastName
        - email
  securitySchemes:
    JWT:
      type: http
      scheme: bearer

````