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

# Delete Customer by External ID

> Delete a customer by its commerce `external_id`.



## OpenAPI

````yaml delete /customers/external/{externalId}
openapi: 3.1.0
info:
  title: Customers API
  description: >-
    API for managing customers


    ### Resource identifier format


    Resource identifiers (the `id` field and related global-identifier fields)
    are returned as JSON

    integers by default. To receive them as strings instead, send the

    `X-Loop-Global-Identifier-Type: string` request header.
  version: v1
servers:
  - url: https://api.loopreturns.com/api/v1
security: []
tags:
  - name: Customers
paths:
  /customers/external/{externalId}:
    delete:
      tags:
        - Customers
      summary: Delete Customer by External ID
      description: Delete a customer by its commerce `external_id`.
      operationId: deleteCustomerByExternalId
      parameters:
        - in: path
          name: externalId
          schema:
            type: string
            maxLength: 64
            examples:
              - 71263csss-12uhsdfh-2138dja
          required: true
          description: The identifier used by an external source to identify the customer.
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/CustomerDeleteByExternalIdResponse'
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
      security:
        - write: []
components:
  schemas:
    CustomerDeleteByExternalIdResponse:
      type: object
      required:
        - id
        - external_id
        - success
      properties:
        id:
          type: integer
          format: int64
          description: The unique identifier for the customer, created by Loop.
          examples:
            - 9007199254740991
        external_id:
          type: string
          description: The identifier used by an external source to identify the customer.
          examples:
            - 71263csss-12uhsdfh-2138dja
        success:
          type: boolean
          description: Whether the customer was successfully deleted.
          examples:
            - true
    UnauthorizedResponse:
      type: object
      required:
        - errors
      properties:
        errors:
          type: string
          examples:
            - Unauthorized.
    NotFoundResponse:
      type: object
      required:
        - message
      properties:
        message:
          type: string
          examples:
            - Resource not found.
  securitySchemes:
    write:
      name: X-Authorization
      type: apiKey
      in: header
      description: 'API Scope: "Customers (write)"'

````