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

# Remove a physical eSIM (owner-facing, both sources)

> Removes a physical eSIM. Idempotent — returns 204 for a fresh removal or a replay of an already-removed eSIM. An eSIM currently installed on a device is uninstalled first, then removed. An eSIM in an intermediate install state returns 409 `operator_resolution_required` and requires manual resolution. Returns 404 if the eSIM doesn't exist or isn't owned by the caller.



## OpenAPI

````yaml /api-reference/mobilerun-numbers.yaml delete /numbers/esims/{id}
openapi: 3.1.0
info:
  title: Mobilerun Numbers
  version: v1
servers:
  - description: Droidrun Cloud API
    url: https://api.mobilerun.ai/v1
security:
  - bearerAuth: []
paths:
  /numbers/esims/{id}:
    delete:
      tags:
        - Esims
      summary: Remove a physical eSIM (owner-facing, both sources)
      description: >-
        Removes a physical eSIM. Idempotent — returns 204 for a fresh removal or
        a replay of an already-removed eSIM. An eSIM currently installed on a
        device is uninstalled first, then removed. An eSIM in an intermediate
        install state returns 409 `operator_resolution_required` and requires
        manual resolution. Returns 404 if the eSIM doesn't exist or isn't owned
        by the caller.
      operationId: deleteEsim
      parameters:
        - in: path
          name: id
          required: true
          schema:
            example: 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
      responses:
        '204':
          description: >-
            eSIM retired (fresh retire, or an idempotent replay of an
            already-retired row)
        '401':
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                required:
                  - error
                type: object
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EsimErrorResponse'
          description: Conflict — see `reason` for the stable, machine-readable cause
        '500':
          description: Internal Server Error
        '503':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/EsimErrorResponse'
          description: >-
            Service Unavailable — esims are disabled for this deployment (see
            `reason`)
      x-codeSamples:
        - lang: JavaScript
          source: |-
            import Mobilerun from '@mobilerun/sdk';

            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });

            await client.esims.delete('550e8400-e29b-41d4-a716-446655440000');
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            client.esims.delete(
                "550e8400-e29b-41d4-a716-446655440000",
            )
components:
  schemas:
    EsimErrorResponse:
      properties:
        message:
          type: string
        reason:
          enum:
            - out_of_stock
            - owner_esim_cap
            - byo_disabled
            - byo_esim_cap
            - byo_daily_import_limit
            - byo_failed_limit
            - esim_not_owned
            - device_pool_empty
            - device_claim_cap
            - operator_resolution_required
            - idempotency_conflict
            - byo_awaiting_payment_cap
            - operator_review_required
            - byo_not_reassignable
            - product_disabled
          type: string
        success:
          enum:
            - false
          type: boolean
      required:
        - success
        - reason
        - message
      type: object
  securitySchemes:
    bearerAuth:
      bearerFormat: Opaque
      description: Bearer token via Authorization header
      scheme: bearer
      type: http

````