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

# Delete Team Member

> Delete a team member using member email

Remove a member from your team workspace, revoking their access to all team resources including scans, assets, vulnerabilities, and configurations. This endpoint immediately terminates the member's access to the team.

## Use Cases

* **Employee Offboarding**: Remove access when team members leave the organization
* **Access Revocation**: Immediately remove unauthorized or compromised accounts
* **Project Completion**: Remove temporary members after project-specific work concludes
* **Security Incidents**: Quickly revoke access during security investigations
* **Team Restructuring**: Remove members during organizational changes

## What Happens When You Delete a Member

**Immediate Effects:**

* ✅ Member loses all access to team workspace
* ✅ Cannot view scans, assets, or vulnerabilities
* ✅ Cannot create or modify team resources
* ✅ Removed from team member list
* ✅ Cannot access team API keys or integrations

**What is Preserved:**

* 📝 Audit logs showing member's historical actions
* 📝 Scans and assets they created remain in the team
* 📝 Their user account (outside the team) remains active

<Note>
  The member's email must be provided to identify who should be removed. You cannot remove the team owner through this endpoint.
</Note>

## Important Considerations

<Warning>
  **Immediate Access Revocation:** This action takes effect immediately. The member will lose access to all team resources without warning. Consider communicating with the member before removal if appropriate.
</Warning>

<Warning>
  **Cannot Remove Owner:** The team owner cannot be removed through this endpoint. To change team ownership, you must transfer ownership first, then the previous owner can be removed.
</Warning>

## Best Practices

1. **Timely Removal**: Remove access promptly when no longer needed
2. **Documentation**: Maintain records of who was removed and why
3. **Transfer First**: Ensure critical work is transferred before removal
4. **Audit Trail**: Review member's activity before removal for compliance
5. **Communication**: When appropriate, inform the member of pending removal
6. **Verify**: Confirm removal was successful and access is revoked

## Re-Adding Members

If you need to re-add a member after removal:

* They must be invited again using the "Add Team Member" endpoint
* They will need to accept a new invitation
* Their previous role and permissions are not automatically restored
* Consider their historical context when assigning new role

<Tip>
  Instead of removing and re-adding members, consider temporarily changing their role to "Viewer" if they might need access again in the future.
</Tip>


## OpenAPI

````yaml delete /v1/user/team/member
openapi: 3.1.0
info:
  title: PDCP API
  version: '1.0'
  summary: ProjectDiscovery Cloud Platform
  description: >-
    For more details, checkout
    https://docs.projectdiscovery.io/api-reference/editor/scan
servers:
  - url: https://api.projectdiscovery.io
    description: Production
  - url: https://api.dev.projectdiscovery.io
    description: Development
  - url: http://localhost:8085
    description: Localhost
security:
  - X-API-Key: []
paths:
  /v1/user/team/member:
    delete:
      tags:
        - internal
      summary: Delete Team Member
      description: Delete a team member using member email
      operationId: delete-v1-user-team-member
      parameters:
        - schema:
            type: string
          in: header
          description: >-
            Retrieve the Team ID from:
            https://cloud.projectdiscovery.io/settings/team
          name: X-Team-Id
      requestBody:
        $ref: '#/components/requestBodies/DeleteTeamMemberRequest'
      responses:
        '200':
          $ref: '#/components/responses/MessageResponse'
        '400':
          $ref: '#/components/responses/MessageResponse'
        '401':
          $ref: '#/components/responses/MessageResponse'
        '403':
          $ref: '#/components/responses/MessageResponse'
        '500':
          $ref: '#/components/responses/MessageResponse'
        default:
          $ref: '#/components/responses/ErrorResponse'
      security:
        - X-API-Key: []
components:
  requestBodies:
    DeleteTeamMemberRequest:
      content:
        application/json:
          schema:
            type: object
            properties:
              email:
                type: string
            required:
              - email
  responses:
    MessageResponse:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            properties:
              message:
                type: string
            required:
              - message
    ErrorResponse:
      description: Example response
      content:
        application/json:
          schema:
            type: object
            required:
              - message
            properties:
              message:
                type: string
              kind:
                type: string
              code:
                type: string
              error:
                type: string
              error_id:
                type: string
              param:
                type: string
              status:
                type: integer
  securitySchemes:
    X-API-Key:
      name: X-API-Key
      type: apiKey
      in: header

````