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

# Delete Customer Permanently

> The organization user can remove consumer data permanently from the Voucherify system by using this API method. It deletes all customer data and connected resources. It makes the customer profile forgotten by Voucherify.



## OpenAPI

````yaml /openapi/customers.json post /v1/customers/{customerId}/permanent-deletion
openapi: 3.0.1
info:
  title: Voucherify API - Customers
  version: v2018-08-01
  description: >-
    Voucherify promotion engine REST API. Please see
    https://docs.voucherify.io/docs for more details.
  contact:
    name: Voucherify Team
    url: https://www.voucherify.io/contact-support
    email: support@voucherify.io
  termsOfService: https://www.voucherify.io/legal/subscription-agreement
  license:
    name: MIT
    url: https://github.com/voucherifyio/voucherify-js-sdk/blob/main/LICENSE
servers:
  - url: https://{cluster}.voucherify.io
    description: Base URL
    variables:
      cluster:
        default: api
        enum:
          - api
          - us1.api
          - as1.api
          - download
          - us1.download
          - as1.download
security: []
paths:
  /v1/customers/{customerId}/permanent-deletion:
    parameters:
      - schema:
          $ref: '#/components/schemas/ParameterCustomerId'
        name: customerId
        in: path
        required: true
        description: A Voucherify customer's `id` or `source_id`.
    post:
      tags:
        - Customers
      summary: Delete Customer Permanently
      description: >-
        The organization user can remove consumer data permanently from the
        Voucherify system by using this API method. It deletes all customer data
        and connected resources. It makes the customer profile forgotten by
        Voucherify.
      operationId: customer-permanently-deletion
      parameters: []
      responses:
        '200':
          description: Returns a permanent deletion object and status of the deletion.
          content:
            application/json:
              schema:
                $ref: >-
                  #/components/schemas/CustomersPermanentDeletionCreateResponseBody
              examples:
                Example:
                  value:
                    id: del_7k3buMvBsJuXiLRmdh1WZvZs
                    created_at: '2022-09-02T17:50:29.302Z'
                    related_object_id: cust_XI8sPLvznzVpNI1BMIWGcUJa
                    related_object: customer
                    status: DONE
                    data_json:
                      events: 16
                      customer_events: 28
                      daily_events: 0
                      segments: 0
                      orders: 9
                      order_events: 5
                      customer: 1
                    object: pernament_deletion
        '404':
          description: >-
            Returns an error indicating that a customer with given ID was not
            found.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
              examples:
                Not Found:
                  value:
                    code: 404
                    key: not_found
                    message: Resource not found
                    details: Cannot find customer with id cust_W8n9I8pJDXlM69j49iKJeYp
                    request_id: v-0b4c62635a154e96f1
                    resource_id: cust_W8n9I8pJDXlM69j49iKJeYp
                    resource_type: customer
      security:
        - X-App-Id: []
          X-App-Token: []
        - X-Voucherify-OAuth:
            - api
            - customers
components:
  schemas:
    ParameterCustomerId:
      type: string
      example: cust_nk0N1uNQ1YnupAoJGOgvsODC
    CustomersPermanentDeletionCreateResponseBody:
      type: object
      title: Customers Permanent Deletion Create Response Body
      description: >-
        Response body schema for **POST**
        `v1/customers/{customerId}/permanent-deletion`.
      properties:
        id:
          type: string
          description: Unique permanent deletion object ID.
          example: del_mgzqZNwUnwnt1Ddw6phEG90Q
        created_at:
          type: string
          example: '2022-09-02T17:55:47.865Z'
          description: >-
            Timestamp representing the date and time when the customer was
            requested to be deleted in ISO 8601 format.
          format: date-time
        related_object_id:
          type: string
          example: cust_m557pDDl4IGXexkU6KOQ2Dwi
          description: Unique customer ID that is being deleted.
        related_object:
          type: string
          description: Object being deleted.
          default: customer
        status:
          type: string
          description: Deletion status.
          default: DONE
        data_json:
          type: object
          description: >-
            Statistics summarizing the number of related information that was
            deleted.
          required:
            - events
            - customer_events
            - daily_events
            - segments
            - orders
            - order_events
            - customer
          properties:
            events:
              type: integer
              description: Number of events deleted.
            customer_events:
              type: integer
              description: Number of customer events deleted.
            daily_events:
              type: integer
              description: Number of daily events deleted.
            segments:
              type: integer
              description: Number of segments deleted.
            orders:
              type: integer
              description: Number of orders deleted.
            order_events:
              type: integer
              description: Number of order events deleted.
            customer:
              type: integer
              description: Number of customers deleted.
              default: 1
        object:
          type: string
          description: The type of the object represented by JSON.
          default: pernament_deletion
      required:
        - id
        - created_at
        - related_object_id
        - related_object
        - status
        - data_json
        - object
    Error:
      title: Error Object
      type: object
      description: Error details
      properties:
        code:
          type: integer
          description: Error's HTTP status code.
        key:
          type: string
          description: Short string describing the kind of error which occurred.
        message:
          type: string
          description: A human-readable message providing a short description of the error.
        details:
          type: string
          description: A human-readable message providing more details about the error.
        request_id:
          type: string
          example: v-0a885062c80375740f
          description: >-
            This ID is useful when troubleshooting and/or finding the root cause
            of an error response by our support team.
        resource_id:
          type: string
          description: >-
            Unique resource ID that can be used in another endpoint to get more
            details.
          example: rf_0c5d710a87c8a31f86
        resource_type:
          type: string
          description: The resource type.
          example: voucher
        error:
          type: object
          description: Includes additional information about the error.
          properties:
            message:
              type: string
              description: The message configured by the user in a validation rule.
      required:
        - code
        - message
  securitySchemes:
    X-App-Id:
      type: apiKey
      name: X-App-Id
      in: header
    X-App-Token:
      type: apiKey
      name: X-App-Token
      in: header
    X-Voucherify-OAuth:
      type: oauth2
      flows:
        implicit:
          authorizationUrl: https://api.voucherify.io/v1/oauth/token
          scopes:
            api: Gives access to whole server-side API.
            vouchers: >-
              Gives access to all endpoints and methods starting with
              `v1/vouchers`.
            client_api: Gives access to whole client-side API.
            client_vouchers: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/vouchers`.
            promotions: >-
              Gives access to all endpoints and methods starting with
              `/v1/promotions`.
            client_promotions: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/promotions`
            campaigns: >-
              Gives access to all endpoints and methods starting with
              `v1/campaigns`.
            client_publish: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/publish`.
            exports: >-
              Gives access to all endpoints and methods starting with
              `/v1/exports`.
            publications: >-
              Gives access to all endpoints and methods starting with
              `/v1/publications`.
            client_validate: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/validate`.
            validations: >-
              Gives access to all endpoints and methods starting with
              `/v1/validations`.
            client_validations: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/validations`.
            qualifications: >-
              Gives access to all endpoints and methods starting with
              `/v1/qualifications`.
            client_qualifications: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/qualifications`.
            client_redeem: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/redeem
            redemptions: >-
              Gives access to all endpoints and methods starting with
              `/v1/redemptions`.
            client_redemptions: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/redemptions`
            customers: >-
              Gives access to all endpoints and methods starting with
              `/v1/customers`.
            client_customers: >-
              Gives access to all endpoints and methods starting with
              `/client/v1/customers`.
            orders: >-
              Gives access to all endpoints and methods starting with
              `/v1/orders`.
            products: >-
              Gives access to all endpoints and methods starting with
              `/v1/products`.
            skus: >-
              Gives access to all endpoints and methods starting with
              `/v1/SKUs`.
            validation-rules: >-
              Gives access to all endpoints and methods starting with
              `/v1/validation-rules`.
            validation-rules-assignments: >-
              Gives access to all endpoints and methods starting with
              `/v1/validation-rules-assignments
            segments: >-
              Gives access to all endpoints and methods starting with
              `/v1/segments`.
            events: >-
              Gives access to all endpoints and methods starting with
              `/v1/events`.
            client_events: >-
              Gives access to all endpoints and methods starting with
              `client/v1/events`.
            rewards: >-
              Gives access to all endpoints and methods starting with
              `/v1/rewards`.
            assets: >-
              Gives access to all endpoints and methods starting with
              `/v1/assets`.
            task-results: >-
              Gives access to all endpoints and methods starting with
              `/v1/task-results`.
            loyalties: >-
              Gives access to all endpoints and methods starting with
              `/v1/loyalties`.
            client_consents: >-
              Gives access to all endpoints and methods starting with
              `client/v1/consents`.
            consents: >-
              Gives access to all endpoints and methods starting with
              `/v1/consents`.
            async-actions: >-
              Gives access to all endpoints and methods starting with
              `/v1/async-actions`.
            product-collections: >-
              Gives access to all endpoints and methods starting with
              `/v1/product-collections`.
            categories: >-
              Gives access to all endpoints and methods starting with
              `/v1/categories`.
            metadata-schemas: >-
              Gives access to all endpoints and methods starting with
              `/v1/metadata-schemas`.
            locations: >-
              Gives access to all endpoints and methods starting with
              `/v1/locations`.
            referrals: >-
              Gives access to all endpoints and methods starting with
              `/v1/referrals`.
            trash-bin: >-
              Gives access to all endpoints and methods starting with
              `/v1/trash-bin`.
            templates: >-
              Gives access to all endpoints and methods starting with
              `/v1/templates`.

````