Coupon collections
Coupons are unique coupon codes that users redeem through email. They are sent in email campaigns or transactional emails as external feeds to contacts. See the API reference for Coupons at Brevo API > Coupons.
How to declare a coupon collection?
A coupon collection holds a set of coupon codes (for example, a batch of discount codes). First, create a coupon collection through the API, then add the coupon codes to it. Create a coupon collection by calling https://api.brevo.com/v3/couponCollections with the POST method.
To create a coupon collection, you need two attributes: a name for the collection and a default coupon to add to it. Use the cURL request below.
After sending this request, you receive a collection ID in the response. Use this collection ID when importing or uploading coupons into the coupon collection.
How to import coupon codes?
To upload or import coupon codes into the coupon collection, call the endpoint https://api.brevo.com/v3/coupons with the POST method.
This endpoint takes two attributes: the collection ID returned by Creating a coupon collection, and the set of coupons to import. The cURL request is below.
A 204 response code with no body indicates the coupons have been imported into your collection.
Embedding the external coupon feed
There are two ways to embed coupons as external feeds: through the drag-and-drop editor, or through HTML code that references the coupon variables. Both are covered below.
Using the drag-and-drop editor
Embed the external feed into your email campaigns using the new drag-and-drop editor. In the Brevo UI, go to email campaigns and create a new campaign. In the Design tab, enable developer mode (top right). Use a reference variable in the code, as in the example below.
name is the reference variable used to include the coupons, and source is the external feed the coupon is retrieved from. Reference unique in the email campaign as feed.unique.coupon. Steps for using the drag-and-drop editor:
- Navigate to Campaigns in your Brevo UI. You’ll see all sent and draft email campaigns, as in the image below.

- Create a new campaign with Create a campaign at the top. The next page lets you add your campaign name, as below.

Enter your campaign name and click Create campaign.
- After entering the campaign name, add the email subject, sender, and recipient, and set the design for your email campaign.

- Next, go to Design and choose a template or build your own design for the email campaign. For external coupon feeds, enable developer mode (top right). If you can’t see developer mode, contact support to have it enabled.

- In developer mode, define your feeds as shown below.
nameis the variable you reference, andsourceis the external feed the data is retrieved from.

- After creating the design, save and schedule your email campaign. Send a test email to verify it works as expected. View the status of your email campaigns in the Campaigns dashboard, as shown below.

- After sending the campaign, the email will look like the example below, with the coupon code included.

Using an HTML template
Use HTML in your email campaigns to embed external coupon feeds. You don’t need to change the feed — reference the variable in the HTML code. See the template below.
Add HTML code to your email campaign design by selecting the HTML block in the drag-and-drop editor.