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

# Update Website Member Role

> Updates a website member's role. Accepts a global API key, or a website-scoped key if the website is included in the key's allowlist. Cannot be used to modify the API key's owning user or the organization owner.



## OpenAPI

````yaml /api-reference/openapi.json patch /api/v1/websites/{website_id}/members/{user_id}
openapi: 3.1.0
info:
  title: AthenaHQ API
  description: >-
    AthenaHQ API provides programmatic access to manage your websites and
    prompts for AI-powered content optimization.
  version: 1.0.0
  contact:
    email: support@athenahq.ai
servers:
  - url: https://api.athenahq.ai
    description: Production server
security:
  - apiKey: []
tags:
  - name: Basics
    description: Core API operations for managing websites and prompts
  - name: Metrics
    description: Metrics and analytics endpoints for tracking AI visibility
  - name: Billing
    description: Billing and credits endpoints for managing usage
  - name: Team Management
    description: Endpoints for managing team members and invitations
  - name: Groups
    description: Endpoints for managing groups of websites
  - name: Content
    description: >-
      Endpoints for accessing Content Hub data — tabs, tracked URLs, and per-URL
      prompt breakdowns.
  - name: Pitch Workspace
    description: >-
      Endpoints for accessing pitch workspace reports — org-scoped pitch runs
      with competitors, prompts, attributes, and aggregate metrics.
paths:
  /api/v1/websites/{website_id}/members/{user_id}:
    parameters:
      - name: website_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: The unique identifier of the website
      - name: user_id
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: The unique identifier of the target user
    patch:
      tags:
        - Team Management
      summary: Update Website Member Role
      description: >-
        Updates a website member's role. Accepts a global API key, or a
        website-scoped key if the website is included in the key's allowlist.
        Cannot be used to modify the API key's owning user or the organization
        owner.
      operationId: updateWebsiteMemberRole
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMemberRoleRequest'
      responses:
        '200':
          description: Member role updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  member:
                    $ref: '#/components/schemas/WebsiteMember'
                required:
                  - success
                  - member
        '400':
          description: Bad request - Invalid body or path parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: >-
            Forbidden - Unauthorized website access, self-modification, or owner
            modification
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Not found - Website member does not exist
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Internal server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - apiKey: []
components:
  schemas:
    UpdateMemberRoleRequest:
      type: object
      description: Request body for updating a member's role
      required:
        - role
      properties:
        role:
          type: string
          enum:
            - admin
            - viewer
          description: The new role to assign to the member
          example: admin
    WebsiteMember:
      type: object
      description: A user's membership in a specific website
      required:
        - user_id
        - website_id
        - role
      properties:
        user_id:
          type: string
          format: uuid
          description: Unique identifier of the user
        website_id:
          type: string
          format: uuid
          description: Unique identifier of the website
        role:
          type: string
          enum:
            - admin
            - viewer
          description: The member's role on this website
    Error:
      type: object
      description: Error response object
      required:
        - error
      properties:
        error:
          type: string
          description: Error message describing what went wrong
          example: Unauthorized
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: x-api-key
      description: >-
        API key for authentication. You can create one
        [here](https://app.athenahq.ai/organization?tab=api).

````