Skip to main content
POST
/
coupon-list
/
{coupon_list_id}
/
files
Upload a Coupon File to the Coupon List
curl --request POST \
  --url https://api-0{dc}.moengage.com/v1/coupon-list/{coupon_list_id}/files \
  --header 'Authorization: Basic <encoded-value>' \
  --header 'Content-Type: application/json' \
  --header 'MOE-APPKEY: <moe-appkey>' \
  --data '
{
  "file_url": "<unknown>",
  "name": "<unknown>",
  "file_url_auth_username": "<string>",
  "file_url_auth_password": "<string>",
  "created_by": "<unknown>",
  "callback_url": "<unknown>"
}
'
{
"name": "<string>",
"file_url": "<string>",
"created_by": "<string>",
"status": "<string>",
"coupons_list_id": "<string>",
"_id": "<string>"
}
InformationUpon API request, file processing begins, and the file status will be PENDING by default.
  • For convenience, you can set up a callback URL to trigger when the file’s processing is completed.
  • You can check the processing status using the Fetch a Coupon File API to get the status separately.

Rate Limit

You can upload:
  • 5 coupon files to a coupon list per minute or
  • 50 coupon files to a coupon list per day
Note:
  • Payload size limit: 64 MB for manual uploads or 100 MB for URL uploads.
  • Additional limits: The maximum number of coupons per coupon list is 100 million.

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

Path Parameters

coupon_list_id
string
required

The unique identifier for the coupon list.

Body

application/json
file_url
any
required

This field consists of the file path of the coupon list.

name
any

This field consists of the file name of the coupon list.

file_url_auth_username
string

This field consists of the coupon file username.

file_url_auth_password
string

This field consists of the coupon file password.

created_by
any

This field consists of the name of the subscriber who uploaded the coupon file.

callback_url
any

This field consists of the coupon file callback URL.

Response

Success The request was successful, and the coupon URL upload request was accepted.

Note: The status of the URL upload is always PENDING.

name
string

This field contains the coupon file name.

file_url
string

This field consists of the file path of the coupon list.

created_by
string

This field consists of the name of the subscriber who uploaded the coupon file.

status
string

Once the coupon URL upload request is accepted, the response displays the following status:

  • PENDING - The URL is waiting for approval.

Note: To know the status of the coupon upload, you need to trigger the Fetch a Coupon File API.

coupons_list_id
string

This field contains the coupon list ID that you have requested to upload the coupon file to.

_id
string

This field contains the coupon file ID.