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

# Delete Users

> This API deletes users in MoEngage. You cannot retrieve users once deleted. Users deleted (hard delete) using this API will be deleted after a default buffer of 24 hours. During this buffer period, the user will still be active in MoEngage and will be visible in Segments, Analytics, and Campaigns. You can update users in the buffer period. After the buffer elapses, the user is hard-deleted from MoEngage. If you create a user with the same unique identifiers as the deleted one in MoEngage (through APIs or imports), they will be created again in MoEngage.


#### Rate Limit

The rate limit is 1 user per payload per request. You can run 5000 requests per minute.


## OpenAPI

````yaml /api/data/data.yaml post /customer/delete
openapi: 3.0.3
info:
  title: MoEngage Data APIs
  version: '1.0'
  description: >-
    This is a comprehensive OpenAPI specification for MoEngage's Data APIs,
    including User, Event, and Device management.

    It's designed to power an interactive API playground on your new
    documentation site.
servers:
  - url: https://api-{dc}.moengage.com/v1
    description: MoEngage Core API Server
    variables:
      dc:
        default: '01'
        description: >-
          The ‘dc’ in the API Endpoint URL refers to the MoEngage Data Center
          (DC). MoEngage hosts each customer in a different DC. You can find
          your DC number and replace the value of ‘dc’ in the URL by referring
          to the DC and API endpoint mapping
          [here](/api/introduction#data-centers). Your MoEngage Data Center (DC)
          can be 01, 02, 03, 04, 05, 06, or 101. 
security:
  - Authentication: []
tags:
  - name: User
    description: Operations for creating, updating, retrieving, and managing user profiles.
  - name: Event
    description: Operations for tracking user events.
  - name: Device
    description: Operations for managing user devices.
  - name: Tracking
    description: Endpoints for tracking attribution and installs.
  - name: Utilities
    description: Utility endpoints for testing connections.
  - name: File Imports
    description: Operations for managing asynchronous file imports.
  - name: Bulk
    description: Operations for importing users and events in bulk.
  - name: Webhooks
    description: Incoming webhook specifications from MoEngage.
paths:
  /customer/delete:
    post:
      tags:
        - User
      summary: Delete Users
      description: >
        This API deletes users in MoEngage. You cannot retrieve users once
        deleted. Users deleted (hard delete) using this API will be deleted
        after a default buffer of 24 hours. During this buffer period, the user
        will still be active in MoEngage and will be visible in Segments,
        Analytics, and Campaigns. You can update users in the buffer period.
        After the buffer elapses, the user is hard-deleted from MoEngage. If you
        create a user with the same unique identifiers as the deleted one in
        MoEngage (through APIs or imports), they will be created again in
        MoEngage.
      parameters:
        - name: app_id
          in: query
          required: true
          description: >-
            This is the Workspace ID of your MoEngage account that must be
            passed with the request. You can find it in the MoEngage dashboard
            at **Settings** > **Account** > **APIs** > **Workspace ID (earlier
            app id)**.
          schema:
            type: string
            example: VJ0GSMESHMQA3L7WV1EEK3UR
        - name: X-Forwarded-For
          in: header
          required: false
          description: >-
            The 'X-Forwarded-For' header is used to specify the IP address of
            the client that made the request. This header may be added by proxy
            servers or load balancers. The header value must contain the IP
            address of the original client that initiated the request. Multiple
            IP addresses may be specified in the header value, separated by
            commas.
          schema:
            type: string
            example: 203.0.113.195
      requestBody:
        required: true
        content:
          application/json:
            schema:
              properties:
                identity_type:
                  type: string
                  enum:
                    - customer_id
                    - id
                  description: >-
                    This field specifies the identifier type. Identifier types
                    can either be customer_id (ID field in the User Profile) or
                    moengage_id (the MoEngageID of the user in the User
                    Profile). Allowed values are "moengage_id", "customer_id".
                  example: customer_id
                identity_value:
                  type: string
                  description: >-
                    This field specifies the unique identifier that identifies
                    the user.
                  example: 6416d1a318r98264512c0f89
      responses:
        '200':
          description: >-
            This response is returned when the request is processed
            successfully.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      This field contains the status of the request and
                      specifies whether the request was successful. Supported
                      values are success, fail
                    example: success
                  message:
                    type: string
                    description: >-
                      This field contains information about whether the response
                      is being processed, the user is deleted, and so on.
                    example: Your request has been accepted and will be processed soon
              examples:
                success_response:
                  summary: Successful request
                  value:
                    status: success
                    message: Your request has been accepted and will be processed soon.
        '400':
          description: >-
            This response is returned when the required parameters APP KEY,
            user_id, etc are missing from the request or when the provided
            params are invalid.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      This field contains the status of the request and
                      specifies whether the request was successful. Supported
                      values are success, fail
                    example: fail
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        description: >-
                          This field contains the error message and describes
                          the reason for the error.
                      type:
                        type: string
                        description: >-
                          The type or category of the error (e.g.,
                          Authentication Required, Invalid Params).
                      request_id:
                        type: string
                        description: >-
                          A unique identifier for the request, useful for
                          debugging.
              examples:
                bad_request:
                  summary: Bad Requests
                  value:
                    status: fail
                    error:
                      message: >-
                        User doesn't exists with customer id
                        b3XSJ7iXvqlCcrYGd5SB5m2m93eG9-9e9HPXd9GtufHvHueWm-mnuiAxUk7DGI1MKg==
                      type: Not Found
                      request_id: bYvNTyWb
        '401':
          description: >-
            This response is returned when the authorization fails due to
            incorrect values for the APP KEY/ HTTP Auth Header.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      This field contains the status of the request and
                      specifies whether the request was successful. Supported
                      values are success, fail
                    example: fail
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        description: >-
                          This field contains the error message and describes
                          the reason for the error
                      type:
                        type: string
                        description: >-
                          The type or category of the error (e.g.,
                          Authentication Required, Invalid Params).
                      request_id:
                        type: string
                        description: >-
                          A unique identifier for the request, useful for
                          debugging.
              examples:
                authorization_error:
                  summary: Authorization Errors
                  value:
                    status: fail
                    error:
                      message: >-
                        App Secret key mismatch. Please login to the dashboard
                        to verify key
                      type: Authentication required
                      request_id: pIvbWnGT
        '403':
          description: >-
            This response is returned when your MoEngage account has been
            blocked or suspended.
          content:
            application/json:
              schema:
                type: object
                properties:
                  status:
                    type: string
                    description: >-
                      This field contains the status of the request and
                      specifies whether the request was successful. Supported
                      values are success, fail
                    example: fail
                  error:
                    type: object
                    properties:
                      message:
                        type: string
                        description: >-
                          This field contains the error message and describes
                          the reason for the error
                      type:
                        type: string
                        description: >-
                          The type or category of the error (e.g.,
                          Authentication Required, Invalid Params).
                      request_id:
                        type: string
                        description: >-
                          A unique identifier for the request, useful for
                          debugging.
              examples:
                appid_invalid:
                  summary: Blocked/Suspended Accounts
                  value:
                    status: fail
                    error:
                      message: given app_id is invalid/blocked
                      type: InvalidParams
                      request_id: pIvbWnGT
        '429':
          description: >-
            This response is returned when the number of requests per minute has
            exceeded the rate limit.
          content:
            application/json:
              schema:
                type: object
                properties:
                  title:
                    type: string
                    description: >-
                      This field is present in the response in the case of 429
                      and 5xx errors and contains the type of error.
                  description:
                    type: string
                    description: >-
                      This field is present in the response in the case of 429
                      and 5xx errors and contains the error description.
              examples:
                rate_limit:
                  summary: Rate limit breach
                  value:
                    status: fail
                    title: Rate limit exceeded
                    description: Exceeded rate limit for this url
        '500':
          description: >-
            This response is returned when the system runs into an unexpected
            error.
          content:
            application/json:
              schema:
                type: object
                properties:
                  title:
                    type: string
                    description: >-
                      This field is present in the response in the case of 429
                      and 5xx errors and contains the type of error.
                  description:
                    type: string
                    description: >-
                      This field is present in the response in the case of 429
                      and 5xx errors and contains the error description.
              examples:
                unknown_error:
                  summary: Unknown errors
                  value:
                    status: fail
                    title: Internal Error
                    description: Please contact the MoEngage team.
components:
  securitySchemes:
    Authentication:
      type: http
      scheme: basic
      description: >
        Authentication is done via Basic Auth. This requires a base64-encoded
        string of your credentials in the format 'username:password'.


        - **Username**: Use your MoEngage workspace ID (also known as the App
        ID). You can find it in the MoEngage dashboard at **Settings** >
        **Account** > **APIs** > **Workspace ID (earlier app id)**.

        - **Password**: Use your API Key, which you can find within the **Data**
        tile.


        **Note**: After you generate and save the Data API Key, DO NOT generate
        a new key unless there is a security breach. After you generate a
        different Data API key and save it, the authentication will start
        failing. You must update your existing data tracking. 


        For more information on authentication and getting your credentials,
        refer
        [here](https://www.moengage.com/docs/api/introduction#getting-your-credentials).

````