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

# Remove Member

> ⚠️ SECURITY: Only OWNERS and ADMINS can remove members. The organization OWNER cannot be removed.

Removes a member from the organization.

## Permissions

User must be **owner** or **admin** to remove members.

## Restrictions

* **Owner cannot be removed** - This is enforced at the business logic layer
* Cannot remove yourself if you're the only admin
* Removed members lose all access to organization resources

## What Happens

* Member is removed from organization
* Access to organization resources is revoked
* Member's API keys and tokens are invalidated

## Example

```bash theme={null}
curl -X DELETE http://localhost:3001/api/organizations/550e8400-e29b-41d4-a716-446655440000/members/123 \
  -H "Authorization: Bearer <token>"
```

## Events Published

* `MemberRemovedEvent` - Triggers cleanup and audit log


## OpenAPI

````yaml DELETE /organizations/{id}/members/{memberId}
openapi: 3.1.0
info:
  title: Timbrix API
  description: >-
    REST API with OAuth2 server for managing organizations, members, and
    webhooks
  version: '1.0'
  contact: {}
servers:
  - url: http://sandbox.mintlify.com
    description: Sandbox environment
  - url: http://localhost:3001/api
    description: Local development
security: []
tags:
  - name: organizations
    description: Organization management endpoints
  - name: oauth
    description: OAuth2 authentication and authorization
  - name: webhooks
    description: Webhook configuration and delivery
  - name: users
    description: User information endpoints
  - name: api-keys
    description: API Keys management and validation
paths:
  /organizations/{id}/members/{memberId}:
    delete:
      tags:
        - organizations
      summary: Remove a member (owner/admin only)
      description: >-
        ⚠️ SECURITY: Only OWNERS and ADMINS can remove members. The organization
        OWNER cannot be removed.
      operationId: OrganizationsController_removeMember
      parameters:
        - name: id
          required: true
          in: path
          schema:
            type: string
        - name: memberId
          required: true
          in: path
          schema:
            type: string
      responses:
        '204':
          description: Member removed successfully from the organization.
        '401':
          description: Authentication required. Provide a valid bearer token.
        '403':
          description: >-
            Access denied. Either insufficient permissions or attempting to
            remove the owner.
        '404':
          description: Organization or member not found.
      security:
        - bearer: []
components:
  securitySchemes:
    bearer:
      scheme: bearer
      bearerFormat: JWT
      type: http

````