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

# Update a member

> Needs an organization admin and an active paid subscription, and never buys seats. Turning a seat off does not remove access to cubic. To remove someone, remove them from the GitHub organization.

Updates need an organization admin and an active Team or Pro subscription billed through cubic.
Requests in the playground change the member in your organization. See the
[Members API guide](/account/members-api#update-a-member) for expected values and seat capacity rules.


## OpenAPI

````yaml PATCH /api/v1/organizations/{org}/members/{githubUserId}
openapi: 3.1.0
info:
  title: cubic API
  version: 1.0.0
servers:
  - url: https://www.cubic.dev
security:
  - apiKey: []
externalDocs:
  url: https://docs.cubic.dev/account/members-api
paths:
  /api/v1/organizations/{org}/members/{githubUserId}:
    patch:
      summary: Turn a seat on or off, or change a role
      description: >-
        Needs an organization admin and an active paid subscription, and never
        buys seats. Turning a seat off does not remove access to cubic. To
        remove someone, remove them from the GitHub organization.
      operationId: updateMember
      parameters:
        - name: org
          in: path
          required: true
          description: GitHub organization login, such as acme.
          schema:
            type: string
            minLength: 1
            maxLength: 255
        - name: githubUserId
          in: path
          required: true
          description: Numeric GitHub user ID of the member.
          schema:
            type: string
            pattern: ^\d{1,20}$
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/MemberUpdate'
      responses:
        '200':
          description: OK
          headers:
            X-RateLimit-Limit:
              description: Requests allowed per 15-minute window.
              schema:
                type: integer
            X-RateLimit-Remaining:
              description: Requests left in the current window.
              schema:
                type: integer
            X-RateLimit-Reset:
              description: When the window resets, in Unix epoch seconds.
              schema:
                type: integer
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/MemberUpdateResult'
        '400':
          description: The request is invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: The API key is missing or invalid.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '403':
          description: Your cubic access does not allow this.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: The organization or member was not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '409':
          description: >-
            The change conflicts with the current member, seat, or billing
            state.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '422':
          description: This change is not allowed for this member.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '429':
          description: The rate limit is exhausted. Retry after the Retry-After header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Unexpected error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '503':
          description: Temporarily unavailable. Retry shortly.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    MemberUpdate:
      type: object
      properties:
        seat:
          description: Desired seat state. Send with expectedSeat.
          type: boolean
        role:
          description: Desired role. Send with expectedRole.
          type: string
          enum:
            - member
            - admin
            - viewer
        expectedSeat:
          description: Current seat state from your latest read; send only with seat.
          type: boolean
        expectedRole:
          description: Current role from your latest read; send only with role.
          type: string
          enum:
            - member
            - admin
            - viewer
      additionalProperties: false
    MemberUpdateResult:
      type: object
      properties:
        githubUserId:
          type: string
        before:
          type: object
          properties:
            seat:
              type: boolean
            role:
              type: string
              enum:
                - member
                - admin
                - viewer
          required:
            - seat
            - role
          additionalProperties: false
        after:
          type: object
          properties:
            seat:
              type: boolean
            role:
              type: string
              enum:
                - member
                - admin
                - viewer
          required:
            - seat
            - role
          additionalProperties: false
        changed:
          type: boolean
        availableSeats:
          type: number
        purchasedQuantityChanged:
          type: boolean
          const: false
      required:
        - githubUserId
        - before
        - after
        - changed
        - availableSeats
        - purchasedQuantityChanged
      additionalProperties: false
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Stable error code. Branch on this, not on the message.
            message:
              type: string
            retriable:
              type: boolean
              description: Whether the same request can succeed if you send it again.
            correlationId:
              description: Quote this ID when you contact support.
              type: string
            details:
              type: array
              items:
                type: object
                properties:
                  path:
                    type: string
                  message:
                    type: string
                required:
                  - path
                  - message
                additionalProperties: false
          required:
            - code
            - message
            - retriable
          additionalProperties: false
      required:
        - error
      additionalProperties: false
  securitySchemes:
    apiKey:
      type: http
      scheme: bearer
      description: >-
        Your personal cubic API key from Settings > Integrations > cubic API. It
        starts with cbk_.

````

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