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

# Unlinks a user from a tenant

> Marks a user to be deleted from the tenant. It does not remove the user from other tenants or invalidate active sessions.



## OpenAPI

````yaml https://us-west-2.api.thenile.dev/v2/openapi delete /v2/databases/{database}/tenants/{tenantId}/users/{userId}/link
openapi: 3.0.0
info:
  title: Nile auth API
  version: '0.1'
servers: []
security: []
tags: []
paths:
  /v2/databases/{database}/tenants/{tenantId}/users/{userId}/link:
    delete:
      tags:
        - users
      summary: Unlinks a user from a tenant
      description: >-
        Marks a user to be deleted from the tenant. It does not remove the user
        from other tenants or invalidate active sessions.
      operationId: deleteTenantUser
      parameters:
        - name: database
          in: path
          required: true
          schema:
            type: string
        - name: tenantId
          in: path
          required: true
          schema:
            type: string
        - name: userId
          in: path
          required: true
          schema:
            type: string
      responses:
        '204':
          description: The user was deleted
          content: {}
        '401':
          description: Unauthorized
          content: {}
        '404':
          description: Not found
          content: {}
      security:
        - sessionCookie: []
components:
  securitySchemes:
    sessionCookie:
      type: apiKey
      in: cookie
      name: nile-auth.session-token
      description: >-
        Session token stored in a cookie after user signs in, prefixed with
        __Secure if on https

````