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

# Set a member's role

> Assigns a role to a member of the organization, identified by email, and returns the updated member. Role-based access control must be enabled for the organization (otherwise 409). The organization owner's role cannot be changed (403), and a management key can only assign roles limited to member management: roles granting organization or billing administration are refused (403). Requires the `manage:write` scope.



## OpenAPI

````yaml https://api.edenai.run/v2/info/splitted-schema/management_api/openapi.json patch /v3/manage/members/{email}/role/
openapi: 3.0.3
info:
  title: Organization Management
  version: '2.0'
  description: Your project description
servers:
  - url: https://api.edenai.run
security: []
paths:
  /v3/manage/members/{email}/role/:
    patch:
      tags:
        - Members
      summary: Set a member's role
      description: >-
        Assigns a role to a member of the organization, identified by email, and
        returns the updated member. Role-based access control must be enabled
        for the organization (otherwise 409). The organization owner's role
        cannot be changed (403), and a management key can only assign roles
        limited to member management: roles granting organization or billing
        administration are refused (403). Requires the `manage:write` scope.
      operationId: manage_members_role_partial_update
      parameters:
        - in: path
          name: email
          schema:
            type: string
          required: true
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/PatchedManageMemberRoleRequest'
          application/x-www-form-urlencoded:
            schema:
              $ref: '#/components/schemas/PatchedManageMemberRoleRequest'
          multipart/form-data:
            schema:
              $ref: '#/components/schemas/PatchedManageMemberRoleRequest'
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/OrganisationUsers'
          description: ''
      security:
        - ManagementKeyAuth: []
components:
  schemas:
    PatchedManageMemberRoleRequest:
      type: object
      description: The role to assign, by id.
      properties:
        role_id:
          type: integer
    OrganisationUsers:
      type: object
      description: >-
        A member of the organization: identity, role, rate limits, directory
        groups and the API keys

        attributed to them (never their secrets).
      properties:
        email:
          type: string
          format: email
          nullable: true
          maxLength: 500
        fullname:
          type: string
          pattern: ^[a-zA-Z\'\- ]+$
          maxLength: 60
        is_confirmed:
          type: boolean
        role:
          type: string
          readOnly: true
        guardrail:
          type: string
          readOnly: true
        effective_rate_limit:
          type: string
          readOnly: true
        tokens:
          type: string
          readOnly: true
        is_org_owner:
          type: boolean
          readOnly: true
        directory_groups:
          type: string
          readOnly: true
      required:
        - directory_groups
        - effective_rate_limit
        - fullname
        - guardrail
        - is_org_owner
        - role
        - tokens
  securitySchemes:
    ManagementKeyAuth:
      type: http
      scheme: bearer
      bearerFormat: opaque
      description: >-
        A management key (created from the organization dashboard or with `POST
        /v3/manage/auth-keys`), sent as `Authorization: Bearer
        <management_key>`. Inference API keys (`sk-eden...`) are not accepted on
        these endpoints.

````