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

# Delete Customer

> Delete a customer.

This action cannot be undone and will immediately:
- Cancel any active subscriptions for the customer
- Revoke all their benefits
- Clear any `external_id`

Use it only in the context of deleting a user within your
own service. Otherwise, use more granular API endpoints to cancel
a specific subscription or revoke certain benefits.

Note: The customers information will nonetheless be retained for historic
orders and subscriptions.

Set `anonymize=true` to also anonymize PII for GDPR compliance.

**Scopes**: `customers:write`



## OpenAPI

````yaml /openapi.json delete /v1/customers/{id}
openapi: 3.1.0
info:
  title: Polar API
  summary: Polar HTTP and Webhooks API
  description: Read the docs at https://polar.sh/docs/api-reference
  version: 2026-04
servers:
  - url: https://api.polar.sh
    description: Production environment
    x-speakeasy-server-id: production
    x-polar-environment: production
  - url: https://sandbox-api.polar.sh
    description: Sandbox environment
    x-speakeasy-server-id: sandbox
    x-polar-environment: sandbox
security: []
tags:
  - name: public
    description: >-
      Endpoints shown and documented in the Polar API documentation and
      available in our SDKs.
  - name: private
    description: >-
      Endpoints that should appear in the schema only in development to generate
      our internal JS SDK.
paths:
  /v1/customers/{id}:
    delete:
      tags:
        - customers
        - public
      summary: Delete Customer
      description: >-
        Delete a customer.


        This action cannot be undone and will immediately:

        - Cancel any active subscriptions for the customer

        - Revoke all their benefits

        - Clear any `external_id`


        Use it only in the context of deleting a user within your

        own service. Otherwise, use more granular API endpoints to cancel

        a specific subscription or revoke certain benefits.


        Note: The customers information will nonetheless be retained for
        historic

        orders and subscriptions.


        Set `anonymize=true` to also anonymize PII for GDPR compliance.


        **Scopes**: `customers:write`
      operationId: customers:delete
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid4
            description: The customer ID.
            title: Id
          description: The customer ID.
        - name: anonymize
          in: query
          required: false
          schema:
            type: boolean
            description: >-
              If true, also anonymize the customer's personal data for GDPR
              compliance. This replaces email with a hashed version, hashes name
              and billing name (name preserved for businesses with tax_id),
              clears billing address, and removes OAuth account data.
            default: false
            title: Anonymize
          description: >-
            If true, also anonymize the customer's personal data for GDPR
            compliance. This replaces email with a hashed version, hashes name
            and billing name (name preserved for businesses with tax_id), clears
            billing address, and removes OAuth account data.
      responses:
        '204':
          description: Customer deleted.
        '404':
          description: Customer not found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ResourceNotFound'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - oidc:
            - customers:write
        - pat:
            - customers:write
        - oat:
            - customers:write
      x-codeSamples:
        - lang: Python (New SDK)
          source: |
            from polar.v2026_04 import Polar

            polar = Polar("polar_oat_xxx")

            polar.customers.delete(
                '00000000-0000-4000-8000-000000000000',
                anonymize=False,
            )
        - lang: TypeScript (New SDK)
          source: |
            import { createPolar } from "@polar-sh/sdk/2026-04";

            const polar = createPolar({
              accessToken: "polar_oat_xxx",
            });

            await polar.customers.delete(
              "00000000-0000-4000-8000-000000000000",
              {
                "anonymize": false
              },
            );
components:
  schemas:
    ResourceNotFound:
      properties:
        error:
          type: string
          const: ResourceNotFound
          title: Error
          examples:
            - ResourceNotFound
        detail:
          type: string
          title: Detail
      type: object
      required:
        - error
        - detail
      title: ResourceNotFound
    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:
    oidc:
      type: openIdConnect
      openIdConnectUrl: /.well-known/openid-configuration
    pat:
      type: http
      description: >-
        You can generate a **Personal Access Token** from your
        [settings](https://polar.sh/settings).
      scheme: bearer
    oat:
      type: http
      description: >-
        You can generate an **Organization Access Token** from your
        organization's settings.
      scheme: bearer

````