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

# Delete Tenant

> Delete a tenant by passing it's ID. Deletion does not affect in-flight notifications, which complete with the settings that were in effect at trigger time. When the tenant has sub-tenants, use `children_action` in the request body to control what happens to them.



## OpenAPI

````yaml DELETE /v1/tenant/{tenant_id}/
openapi: 3.1.1
info:
  title: SuprSend API
  description: APIs supported on suprsend platform
  version: 1.2.2
servers:
  - url: https://hub.suprsend.com
security:
  - sec0: []
  - BearerAuth: []
paths:
  /v1/tenant/{tenant_id}/:
    delete:
      summary: Delete Tenant
      description: >-
        Delete a tenant by passing it's ID. Deletion does not affect in-flight
        notifications, which complete with the settings that were in effect at
        trigger time. When the tenant has sub-tenants, use `children_action` in
        the request body to control what happens to them.
      operationId: delete-tenant
      parameters:
        - name: tenant_id
          in: path
          description: unique identifier of the tenant to delete
          schema:
            type: string
          required: true
      requestBody:
        required: false
        content:
          application/json:
            schema:
              type: object
              properties:
                children_action:
                  type: string
                  enum:
                    - orphan
                    - reassign
                    - delete
                  description: >-
                    Only applies when the tenant has
                    [sub-tenants](/docs/sub-tenants). `orphan` (default)
                    promotes sub-tenants to root tenants. `reassign` moves
                    sub-tenants under `reassign_to` tenant. `delete` deletes
                    every sub-tenant in the subtree. Ignored for tenants with no
                    sub-tenants.
                  default: orphan
                  example: reassign
                reassign_to:
                  type: string
                  description: >-
                    Target parent when `children_action = reassign`. Required in
                    that case; must reference an existing tenant. See
                    [sub-tenants](/docs/sub-tenants).
                  example: acme-corp
      responses:
        '204':
          description: 204 - No Content
        '400':
          description: >-
            400 - Bad Request. Returned when `reassign_to` is missing on a
            reassign, sent on a delete, references a non-existent tenant, or
            when the resulting move would exceed the 5-level limit.
          content:
            application/json:
              examples:
                MissingReassignTo:
                  value:
                    code: 400
                    error_code: error
                    type: ValidationError
                    message: '{"reassign_to": ["This field may not be blank."]}'
                    detail:
                      reassign_to:
                        - This field may not be blank.
              schema:
                type: object
                description: error code and message detailing the error
        '404':
          description: 404 - Not Found
          content:
            application/json:
              examples:
                Result:
                  value:
                    code: 404
                    error_code: not_found
                    type: NotFound
                    message: No tenant found for tenant_id 12
                    detail: No tenant found for tenant_id 12
              schema:
                type: object
                description: error code and message detailing the error
      deprecated: false
      security:
        - BearerAuth: []
components:
  securitySchemes:
    sec0:
      type: apiKey
      in: header
      name: Authorization
      x-bearer-format: bearer
      description: >-
        Bearer authentication header of the form `Bearer <token>`, where <token>
        is your auth token.
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API_Key
      description: >-
        Pass as `Bearer <API_KEY>`. Get API Key from SuprSend dashboard
        Developers -> API Keys section.

````