Delete User API

Last updated:2024-07-10

Prerequisite

Once a user is deleted, it cannot be restored. Deleted users can only receive messages again in the following scenarios:

  • Web: Clear browser cookies and then return to your website.
  • Mobile: Open the app again or uninstall and reinstall the app to reinitialize the SDK. It is recommended to update to the latest version of the SDK in your app.

Recommendations Before Deletion

  1. Query Tag and Alias Information: Use the tag alias API to query the aliases and tags currently bound to the registration_id to be deleted.

  2. Check Audience: Carefully check the audience to be deleted.

    ❗️Warning: Do not delete all users. Be very careful when performing these steps to ensure that not all users are deleted.

Delete User API Description

This API is used to delete an existing user (registration_id). It will delete all related data, bound tags, aliases, device information, and timezone information. This deletion is performed asynchronously.

Endpoint

DELETE /v4/devices/{registration_id}
          DELETE /v4/devices/{registration_id}

        
This code block in the floating window

Request Header

DELETE /v4/devices/{registration_id} Authorization: Basic (base64 auth string) Accept: application/json
          DELETE /v4/devices/{registration_id}
Authorization: Basic (base64 auth string)
Accept: application/json

        
This code block in the floating window

Request Parameters

Name Required Description
Registration ID Yes The unique identifier of the device in the engagelab system. Batch deletion is not supported.

Request Example

DELETE /v4/devices/abc123 Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l Accept: application/json
          DELETE /v4/devices/abc123
Authorization: Basic YWxhZGRpbjpvcGVuc2VzYW1l
Accept: application/json

        
This code block in the floating window

Response Example

Successful Response

HTTP/1.1 200 OK Content-Type: application/json; charset=utf-8 { "success": true }
          HTTP/1.1 200 OK 
Content-Type: application/json; charset=utf-8
{
  "success": true
}

        
This code block in the floating window

Error Response

{ "error":{ "code":27002, "message":"unknown error" } }
          {
  "error":{
    "code":27002, 
    "message":"unknown error"
    }
}

        
This code block in the floating window
在文档中心打开
icon
Contact Sales