Skip to main content
DELETE
/
cards
/
delete
Delete Cards for User
curl --request DELETE \
  --url https://api-{dc}.moengage.com/v1/cards/delete \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'MOE-APPKEY: <moe-appkey>' \
  --data '
{
  "uid": "user@example.com",
  "campaign_ids": [
    "campaign_id1",
    "campaign_id2"
  ],
  "platforms": [
    "android",
    "ios"
  ]
}
'
{ "status": true, "request_id": "<string>", "data": { "android": { "success": [ "<string>" ], "failed": [ "<string>" ], "invalid": [ "<string>" ] }, "ios": { "success": [ "<string>" ], "failed": [ "<string>" ], "invalid": [ "<string>" ] }, "web": { "success": [ "<string>" ], "failed": [ "<string>" ], "invalid": [ "<string>" ] } }, "title": "<string>", "description": "<string>", "code": "<string>", "error": "<string>" }

Rate Limit

The rate limit is 50K RPM (Requests Per Minute) and is applicable at the DB (App) level.

Generating unique_id

The unique_id refers to the device identifier and is platform-specific. You can generate the unique id for Android and iOS using the methods listed below.
  1. Android
  2. iOS
MoEngageSDKCore.getMoEngageDeviceId(completionHandler: @escaping UserInfoHandler)

FAQs

What is the difference between unique_id and uid? The unique_id is the unique value that identifies the user to whom the cards need to be deleted. It is a platform-specific device identifier that can be generated, as mentioned in the Generating unique_id section. The uid is the unique MoEngage Standard ID that identifies the user.

Authorizations

Authorization
string
header
required

Uses Workspace ID as username and API Key (from Campaign report/Business events/Custom templates tile) as password. To generate the authentication header, refer to Authentication.

Headers

MOE-APPKEY
string
required

Your MoEngage Workspace ID. Found in Settings > Account > APIs.

Body

application/json

Must provide either 'uid' or 'unique_id'.

campaign_ids
string[]
required

List of campaign IDs whose cards should be deleted for the user. In the case of a periodic campaign, if the campaign ID of the parent campaign is specified, the cards will get deleted for the child campaigns as well.

uid
string

The uid is the unique MoEngage Standard ID (Email ID Standard or Mobile Number Standard) that identifies the user.

unique_id
string

The unique_id is the platform-specific device identifier. Refer to Generating unique_id for details.

platforms
enum<string>[]

Specify platforms to delete cards from. If omitted, the cards specified for deletion will be deleted from all the platforms they are associated with. Allowed Values: ANDROID, IOS, WEB

Available options:
ANDROID,
IOS,
WEB,
android,
ios,
web

Response

This response is returned when the request is processed successfully.

status
boolean

This field represents whether the request was successful and contains true when the request was successful and false otherwise.

request_id
string

Unique identifier that denotes the request.

data
object

This field contains the platform-specific results of the delete operation.

title
string | null

This field is present in the response body only when the request is unsuccessful and contains the error type.

description
string | null

This field is present in the response body only when the request is unsuccessful and contains the error description.

code
string | null

This field is present in the response body only when the request is unsuccessful and contains the error code.

error
string | null

Error message if status is false.