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": "[email protected]",
  "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>"
}
This operation uses a request body with the DELETE method, which is non-standard.

Rate Limit

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

Authorizations

Authorization
string
header
required

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 Campaign report/Business events/Custom templates/Catalog API/Inform Report tile.

For more information on authentication and getting your credentials, refer here.

Headers

MOE-APPKEY
string
required

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).

Body

application/json

You must provide either 'uid' or 'unique_id'.

Generating unique_id

The unique_id refers to the device identifier and is platform-specific.

  • Android
  • iOS: MoEngageSDKCore.getMoEngageDeviceId(completionHandler: @escaping UserInfoHandler)
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.