Skip to main content
POST
/
coupon-list
Create a Coupon List
curl --request POST \
  --url https://api-0{dc}.moengage.com/v1/coupon-list \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "label": "<string>",
  "expires_at": "2023-12-25",
  "created_by": "<string>",
  "email_alert_subscribers": [
    "[email protected]"
  ],
  "alert_conditions": {
    "success_alert": true,
    "failure_alert": true,
    "coupon_shortage_alert": {
      "alert": true,
      "threshold_count": 123
    },
    "expiry_alert": {
      "alert": true,
      "days_before": 123
    }
  }
}
'
{
"name": "Example Name",
"label": "Sample Label",
"expires_at": "2024-10-31T18:29:00",
"created_by": "John",
"email_alert_subscribers": [
"[email protected]"
],
"alert_conditions": {
"success_alert": true,
"failure_alert": true,
"expiry_alert": {
"alert": true,
"days_before": 1
},
"coupon_shortage_alert": {
"alert": true,
"threshold_count": 10
}
},
"status": "ACTIVE",
"_id": "6721d00eefc476c0f67e0d05"
}
InformationThis API creates the coupon list with basic specifications only. The coupons should be added using Upload the Coupons API to this coupon list before utilizing it in campaigns.

Rate Limit

You can create 100 coupon lists per day.

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.

Body

application/json
name
string
required

This field consists of the coupon list's unique name.

label
string
required

This field consists of the label name for the coupon list.

expires_at
string<date>
required

This field consists of the date the coupon list expires in yyyy-mm-dd format.

created_by
string
required

This field consists of the user name who requests to create the coupon list.

email_alert_subscribers
string<email>[]

This field consists of the email address of the coupon list subscriber. The subscriber will receive all the alerts on the coupon list in the email provided in this field.

alert_conditions
object

This object contains the details and types of alert conditions.

Response

Success Indicates that the request is successful and the coupon list creation request is accepted.

name
string

This field consists of the unique name of the coupon list corresponding to a successful coupon list creation request.

label
string

This field consists of the label name for the coupon list corresponding to a successful coupon list creation request.

expires_at
string

This field consists of the expiry date of the coupon list in yyyy-mm-dd format corresponding to a successful coupon list creation request.

created_by
string

This field consists of the user name who created the coupon list corresponding to a successful coupon list creation request.

email_alert_subscribers
string[]

This field consists of the email address of the coupon list subscriber corresponding to a successful coupon list creation request.

alert_conditions
object

This field consists of the alert conditions and the statuses specified while creating the coupon list.

status
string

Once the coupon list creation request is accepted, the list status will show ACTIVE.

_id
string

This field contains the unique ID corresponding to a successful coupon list creation request. This ID is used as a parameter for fetching, updating, or archiving coupon lists.