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

# Update Team User Role

> Update a user's role on a team.

Works for people who haven't signed up yet too.

Requirements:
- Requires FULL_ACCESS on the team
- Cannot update team role for workspace owners
- Role must be a valid team role: full_access, editor, commenter, downloader, viewer, no_access

Setting `no_access` removes the person's access to the team, the same as `DELETE`,
and succeeds even if they had none. They stay in the workspace.



## OpenAPI

````yaml /api-reference/openapi.json patch /teams/{team_id}/users/{user_id}
openapi: 3.1.0
info:
  title: Aspect API
  description: Manage and search media in Aspect.
  version: 1.0.0
servers:
  - url: https://api.aspect.inc
security:
  - ApiKeyAuth: []
tags:
  - name: Users
  - name: API Keys
  - name: Workspaces
  - name: Teams
  - name: Directories
  - name: Assets
  - name: Attachments
  - name: Filesystem Items
  - name: Collections
  - name: Canvases
  - name: Comments
  - name: Search
  - name: Transcription
  - name: Metadata
  - name: Shares
  - name: Share Templates
  - name: Watermarks
paths:
  /teams/{team_id}/users/{user_id}:
    patch:
      tags:
        - Teams
      summary: Update Team User Role
      description: >-
        Update a user's role on a team.


        Works for people who haven't signed up yet too.


        Requirements:

        - Requires FULL_ACCESS on the team

        - Cannot update team role for workspace owners

        - Role must be a valid team role: full_access, editor, commenter,
        downloader, viewer, no_access


        Setting `no_access` removes the person's access to the team, the same as
        `DELETE`,

        and succeeds even if they had none. They stay in the workspace.
      operationId: update_team_user_role
      parameters:
        - name: team_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: Team Id
        - name: user_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
            title: User Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/TeamUpdateRoleRequest'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamUserResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
components:
  schemas:
    TeamUpdateRoleRequest:
      properties:
        role:
          $ref: '#/components/schemas/TeamRole'
          description: >-
            The person's new role on the team. `no_access` removes their access
            to the team; they stay in the workspace.
      type: object
      required:
        - role
      title: TeamUpdateRoleRequest
      description: Change a person's role on a team.
    TeamUserResponse:
      properties:
        id:
          type: string
          format: uuid
          title: Id
          description: User ID
        first_name:
          type: string
          title: First Name
          description: User's first name
        last_name:
          type: string
          title: Last Name
          description: User's last name
        email:
          type: string
          title: Email
          description: User's email address
        avatar_url:
          anyOf:
            - type: string
            - type: 'null'
          title: Avatar Url
          description: User's avatar URL
        role:
          $ref: '#/components/schemas/TeamRole'
          description: User's effective role on this team
        workspace_role:
          $ref: '#/components/schemas/WorkspaceRole'
          description: User's workspace role
        has_explicit_permission:
          type: boolean
          title: Has Explicit Permission
          description: >-
            True when the person was added to this team. False for workspace
            owners, who have full access to every team.
      type: object
      required:
        - id
        - first_name
        - last_name
        - email
        - role
        - workspace_role
        - has_explicit_permission
      title: TeamUserResponse
      description: API response schema for a user with team access.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    TeamRole:
      type: string
      enum:
        - full_access
        - editor
        - commenter
        - downloader
        - viewer
        - no_access
      title: TeamRole
      description: Role on a team.
    WorkspaceRole:
      type: string
      enum:
        - owner
        - member
        - member_limited
      title: WorkspaceRole
      description: >-
        Role in a workspace. `member_limited` is deprecated: it is accepted as
        `member` and never returned.
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: Authorization
      description: Aspect API key (sk_...) in Authorization header. 'Bearer ' optional.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.