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

# Update Member Role

> Changes a member's role. The team owner's role cannot be changed, and Owner cannot be assigned (ownership is transferred through a separate flow).



## OpenAPI

````yaml /openapi.json patch /api/v1/team/members/{email}
openapi: 3.1.0
info:
  title: Surfacd Public API
  version: 1.0.0
  description: >-
    Public API for Surfacd. Team-scoped operations live under
    `/api/v1/team/...`; project collections live under `/api/v1/projects`;
    project-scoped operations live under `/api/v1/projects/{project}/...`. All
    endpoints require a Bearer team API key created in Team Settings. The API
    key selects the team for team-level and collection endpoints.
servers:
  - url: https://app.surfacd.com
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Projects
    description: Project management endpoints. Reads only in this version.
  - name: Prompts
    description: Prompt management endpoints. Reads only in this version.
  - name: Team
    description: Team settings and plan details for the current team.
  - name: Reporting
    description: >-
      Read-only reporting endpoints for projects (brand rankings, mentions,
      visibility, matrix analysis, source data).
  - name: Reference
    description: Reference data used by create, update, and reporting filters.
  - name: Tags
    description: Project tag management endpoints.
paths:
  /api/v1/team/members/{email}:
    parameters:
      - name: email
        in: path
        required: true
        description: Email address of the team member.
        schema:
          type: string
          format: email
    patch:
      tags:
        - Team
      summary: Update Member Role
      description: >-
        Changes a member's role. The team owner's role cannot be changed, and
        Owner cannot be assigned (ownership is transferred through a separate
        flow).
      operationId: v1TeamMembersUpdate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMemberRoleRequest'
      responses:
        '200':
          description: The updated member.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/TeamMember'
        '404':
          description: Member not found in the current team.
          content:
            application/json:
              schema:
                type: object
                properties:
                  message:
                    type: string
                required:
                  - message
        '422':
          description: Validation error, or an attempt to change the owner's role.
          content:
            application/json:
              schema:
                oneOf:
                  - $ref: '#/components/schemas/ValidationError'
                  - type: object
                    properties:
                      message:
                        type: string
                    required:
                      - message
components:
  schemas:
    UpdateMemberRoleRequest:
      type: object
      properties:
        role:
          $ref: '#/components/schemas/AssignableTeamRole'
      required:
        - role
    TeamMember:
      type: object
      properties:
        email:
          type: string
          format: email
        name:
          type: string
        role:
          $ref: '#/components/schemas/TeamRole'
        status:
          type: string
          enum:
            - active
            - pending
          description: '`pending` until the member accepts their invitation.'
      required:
        - email
        - name
        - role
        - status
    ValidationError:
      type: object
      description: Returned when one or more request parameters fail validation.
      properties:
        message:
          type: string
        errors:
          type: object
          additionalProperties:
            type: array
            items:
              type: string
      required:
        - message
        - errors
    AssignableTeamRole:
      type: string
      enum:
        - admin
        - member
        - viewer
      description: >-
        Roles assignable via the API. `owner` is excluded — ownership is managed
        through a separate transfer flow.
    TeamRole:
      type: string
      enum:
        - owner
        - admin
        - member
        - viewer
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: token
      description: >-
        Team API key created in Team Settings. Use it with URLs for the same
        team.

````