You can also add up to 1,000 coupon codes at a time from your Memberful dashboard without using the API.
Use the GraphQL API Explorer
You can make requests to our API in all the regular ways you’re used to, but the easiest method is through our GraphQL API Explorer. To access it, go to Settings → Custom applications in your Memberful dashboard. Queries and mutations that you execute in the API Explorer work the same as requests that come from elsewhere, so you can generate your coupons in bulk using the API Explorer.Create a base coupon
Start by creating a base coupon. Make sure to set the max redemption to “1” to ensure each code is single-use. All your new coupons inherit the same settings as this base coupon, and they’re grouped under it in your Memberful dashboard.Find the base coupon’s ID
From the Edit coupon page, take note of the coupon’s ID. You’ll find it under the label Coupon ID for generating bulk coupon codes.
Review a mutation example
Go to the API Explorer and run your mutation. Keep your coupon ID handy because you’re about to use it. This is the format you need to follow for this mutation:Generate a mutation for a large number of coupons
If you need to create a large number of coupons, use the following form to generate a mutation that assigns unique names to your coupons. Including random characters (letters and numbers) in your coupon codes ensures that members won’t be able to guess other codes based on the one they got. For example, if a member received the coupon code memberdiscount22, it would be easy for them to guess that memberdiscount21 and memberdiscount23 exist, and they might abuse that knowledge to get more discounts or to share those coupons with others who aren’t entitled to a discount.Review bulk coupon requirements and troubleshooting steps
If your coupon codes were created successfully, the result will show the successfully created codes inside the coupons array, and errors will show an empty array.- Maximum 255 characters
- Contains no symbols or spaces
- The code doesn’t already exist
- ✅ membersonly1
- ✅ membersonly987
- ✅ membersonlyA
- ✅ membersonlyxyz
- ✅ summersale (The new code doesn’t need to resemble the base coupon code)
- ❌ membersonly_1 (Symbols aren’t allowed)
- ❌ membersonly (Already exists - this is the same code as the base coupon)
- ❌ MembersOnly (Already exists - uppercase/lowercase doesn’t make a difference)
Manage your bulk coupon codes
After creating bulk coupon codes, you’ll see how many codes are associated with the base coupon when you edit it.