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

# Delete customer

> Soft-deletes the customer. It stops appearing in the list and a later `GET` returns 404. The email is released, so it can be onboarded again.

A customer holding a balance cannot be deleted.



## OpenAPI

````yaml api-reference/endl-onboarding-api.json DELETE /api/v0/customer/{userId}
openapi: 3.1.0
info:
  title: Endl Partner Onboarding API
  version: '0'
  description: >-
    Onboard end customers for identity verification — individuals (KYC) and
    businesses (KYB) — through one uniform REST surface.


    Authentication is API-key only: every request carries a single `API-KEY`
    header. Unlike the Partner API, responses are **flat** — a successful body
    is the data object itself, with no `{ data, code, message, status }`
    envelope.
servers:
  - url: https://qa-api.endl.xyz
    description: QA
security:
  - apiKey: []
tags:
  - name: Customers
    description: Create, read, update and delete onboarding customers.
  - name: Documents
    description: Upload identity, company and beneficial-owner documents.
paths:
  /api/v0/customer/{userId}:
    parameters:
      - name: userId
        in: path
        required: true
        schema:
          type: string
          format: uuid
        description: Endl's customer id, returned by create.
    delete:
      tags:
        - Customers
      summary: Delete customer
      description: >-
        Soft-deletes the customer. It stops appearing in the list and a later
        `GET` returns 404. The email is released, so it can be onboarded again.


        A customer holding a balance cannot be deleted.
      responses:
        '200':
          description: Deleted.
          content:
            application/json:
              example:
                userId: 6c4ba9af-978a-45ff-953f-729c593f14af
                active: false
                deleted: true
        '400':
          description: The customer was already deleted.
        '401':
          $ref: '#/components/responses/Unauthorized'
        '403':
          $ref: '#/components/responses/Forbidden'
        '404':
          $ref: '#/components/responses/NotFound'
        '409':
          description: >-
            The customer holds a balance. The amount is never disclosed — clear
            it first.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              example:
                code: '409'
                message: Cannot delete a customer that holds a balance
                name: PartnerOnboardingDelete failed to process
components:
  responses:
    Unauthorized:
      description: Missing or invalid `API-KEY`.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: '401'
            message: Authentication Failed!
            name: PartnerOnboarding failed to process
    Forbidden:
      description: >-
        The key lacks the `onboarding` permission, the customer belongs to
        another partner, or onboarding is not permitted for that country.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: '403'
            message: Onboarding is not permitted for this country
            name: PartnerOnboardingCreate failed to process
    NotFound:
      description: Customer or owner not found. A deleted customer also returns 404.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            code: '404'
            message: Not found
            name: PartnerOnboardingGet failed to process
  schemas:
    Error:
      type: object
      description: >-
        A single problem. `code` is the HTTP status, `message` the specific
        reason, and `name` the operation that failed.
      properties:
        code:
          type: string
        message:
          type: string
        name:
          type: string
  securitySchemes:
    apiKey:
      type: apiKey
      in: header
      name: API-KEY
      description: Your partner API key. The key must carry the `onboarding` permission.

````