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

# Delete Org

> Delete an organization.

This endpoint permanently deletes an organization and all associated data including
organization members, conversations, billing data, and external LiteLLM team resources.
Access requires the DELETE_ORGANIZATION permission, which is granted only to owners.

Args:
    org_id: Organization ID to delete (UUID)
    user_id: Authenticated user ID (injected by require_permission dependency)

Returns:
    dict: Confirmation message with deleted organization details

Raises:
    HTTPException: 401 if user is not authenticated
    HTTPException: 403 if user lacks DELETE_ORGANIZATION permission
    HTTPException: 404 if organization not found
    HTTPException: 500 if deletion fails



## OpenAPI

````yaml /openapi/openhands-cloud.json delete /api/organizations/{org_id}
openapi: 3.1.0
info:
  title: OpenHands
  description: 'OpenHands: Code Less, Make More'
  version: 0.0.1
servers: []
security: []
paths:
  /api/organizations/{org_id}:
    delete:
      tags:
        - Orgs
      summary: Delete Org
      description: >-
        Delete an organization.


        This endpoint permanently deletes an organization and all associated
        data including

        organization members, conversations, billing data, and external LiteLLM
        team resources.

        Access requires the DELETE_ORGANIZATION permission, which is granted
        only to owners.


        Args:
            org_id: Organization ID to delete (UUID)
            user_id: Authenticated user ID (injected by require_permission dependency)

        Returns:
            dict: Confirmation message with deleted organization details

        Raises:
            HTTPException: 401 if user is not authenticated
            HTTPException: 403 if user lacks DELETE_ORGANIZATION permission
            HTTPException: 404 if organization not found
            HTTPException: 500 if deletion fails
      operationId: delete_org_api_organizations__org_id__delete
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Org Id
        - name: X-Org-Id
          in: header
          required: false
          schema:
            anyOf:
              - type: string
              - type: 'null'
            title: X-Org-Id
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                type: object
                additionalProperties: true
                title: Response Delete Org Api Organizations  Org Id  Delete
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    APIKeyHeader:
      type: apiKey
      in: header
      name: X-Access-Token

````