Create a Coupon List
curl --request POST \
--url https://api-{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"
}
Create a Coupon List
This API creates single-use coupon codes. You can use this API to create and organize distinct lists for different coupon code categories.
POST
/
coupon-list
Create a Coupon List
curl --request POST \
--url https://api-{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
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 > API keys.
- Password: Use the Campaign report/Business events/Custom templates/Catalog API/Inform Report key from Settings > Account > API keys. Its auth type is Basic Auth (Legacy). This API accepts only this legacy key, so a key you create with + Create new key doesn't work with it.
For the key that each MoEngage API accepts, refer to API Keys by Feature.
Body
application/json
Response
Success Indicates that the request is successful and the coupon list creation request is accepted.