> ## 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 Profile

> Delete an LLM profile.

Blocked with 409 if any of the org's Agent Profiles still reference this LLM
profile by ``llm_profile_ref`` (the SDK ``find_referrers`` FK guard) — both
collections live on the same org row, so the ``SELECT ... FOR UPDATE`` lock
makes the referrer check and the delete atomic.



## OpenAPI

````yaml /openapi/openhands-cloud.json delete /api/organizations/{org_id}/profiles/{name}
openapi: 3.1.0
info:
  title: OpenHands
  description: 'OpenHands: Code Less, Make More'
  version: 0.0.1
servers: []
security: []
paths:
  /api/organizations/{org_id}/profiles/{name}:
    delete:
      tags:
        - Organization Profiles
      summary: Delete Profile
      description: >-
        Delete an LLM profile.


        Blocked with 409 if any of the org's Agent Profiles still reference this
        LLM

        profile by ``llm_profile_ref`` (the SDK ``find_referrers`` FK guard) —
        both

        collections live on the same org row, so the ``SELECT ... FOR UPDATE``
        lock

        makes the referrer check and the delete atomic.
      operationId: delete_profile_api_organizations__org_id__profiles__name__delete
      parameters:
        - name: org_id
          in: path
          required: true
          schema:
            anyOf:
              - type: string
                format: uuid
              - type: 'null'
            title: Org Id
        - name: name
          in: path
          required: true
          schema:
            type: string
            minLength: 1
            title: Name
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/server__routes__org_profiles__ProfileMutationResponse
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - APIKeyHeader: []
components:
  schemas:
    server__routes__org_profiles__ProfileMutationResponse:
      properties:
        name:
          type: string
          title: Name
        message:
          type: string
          title: Message
      type: object
      required:
        - name
        - message
      title: ProfileMutationResponse
      description: Response for profile mutations (save, delete, rename).
    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

````