> ## 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.

# Remove Team Member

> Removes a team member from the business. Cannot remove yourself or the business owner.

Remove a team member from your business. The member will lose access immediately.

## Example Request

```bash theme={null}
curl -X DELETE "https://api.rolla.xyz/api/v1/external/teams/members/a1b2c3d4-e5f6-7890-abcd-ef1234567890" \
  -H "X-API-Key: your_api_key_here"
```

## Example Response

```json theme={null}
{
  "status": 200,
  "success": true,
  "message": "Team member removed successfully",
  "data": {
    "userId": "a1b2c3d4-e5f6-7890-abcd-ef1234567890"
  }
}
```

<Warning>
  You cannot remove yourself or the business owner. Attempting to do so will return a `400 Bad Request` error.
</Warning>


## OpenAPI

````yaml DELETE /teams/members/{userId}
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}:
    delete:
      summary: Remove Team Member
      description: >-
        Removes a team member from the business. Cannot remove yourself or the
        business owner.
      operationId: removeTeamMember
      parameters:
        - name: userId
          in: path
          required: true
          description: User UUID of the team member to remove
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Team member removed successfully
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    example: true
                  message:
                    type: string
                    example: Team member removed successfully
        '400':
          description: Bad request - Cannot remove self or business owner
          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:
    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

````