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

# Update Member Status

> Activates or deactivates a team member. Only business owners can update member status.

Activate or deactivate a team member. Only business owners can update member status.

## Example Request

```bash theme={null}
curl -X PATCH "https://api.rolla.xyz/api/v1/external/teams/members/a1b2c3d4-e5f6-7890-abcd-ef1234567890/status" \
  -H "X-API-Key: your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "status": "inactive"
  }'
```

## Example Response

```json theme={null}
{
  "success": true,
  "message": "Member status updated successfully"
}
```

<Warning>
  The business owner's status cannot be changed, and pending invites cannot be activated or deactivated. Only `active` and `inactive` members can have their status updated.
</Warning>


## OpenAPI

````yaml PATCH /teams/members/{userId}/status
openapi: 3.1.0
info:
  title: Rolla Developer API
  description: >-
    API for programmatic transaction management on the Rolla platform. Monetary
    `amount` fields use the smallest unit of the referenced currency unless an
    endpoint says otherwise (e.g. NGN = kobo, USD = cents, where **100 cents =
    USD 1.00**).
  version: 1.0.0
servers:
  - url: https://api.rolla.xyz/api/v1/external
    description: Production server
security:
  - apiKeyAuth: []
paths:
  /teams/members/{userId}/status:
    patch:
      summary: Update Member Status
      description: >-
        Activates or deactivates a team member. Only business owners can update
        member status.
      operationId: updateTeamMemberStatus
      parameters:
        - name: userId
          in: path
          required: true
          description: User UUID of the team member
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateMemberStatusRequest'
      responses:
        '200':
          description: Member status updated successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Member status updated successfully
        '400':
          description: Bad request - Cannot update owner status or pending invites
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '401':
          description: Unauthorized - Invalid or missing API key
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '404':
          description: Team member not found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
components:
  schemas:
    UpdateMemberStatusRequest:
      type: object
      required:
        - status
      properties:
        status:
          type: string
          enum:
            - active
            - inactive
          description: New status for the team member
    Error:
      type: object
      properties:
        success:
          type: boolean
          example: false
        message:
          type: string
  securitySchemes:
    apiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: Your Rolla API key

````