curl --request GET \
--url https://api.privy.com/v1/coupons \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.privy.com/v1/coupons"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.privy.com/v1/coupons', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.privy.com/v1/coupons",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.privy.com/v1/coupons"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.privy.com/v1/coupons")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.privy.com/v1/coupons")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "Xk2fW9qLpV",
"title": "Welcome 10%",
"kind": "unique",
"platform": "shopify",
"master_code": null,
"prefix_code": "VIP",
"coupon_codes_remaining": null,
"coupon_codes_issued": 4210,
"healthy": true,
"failure_message": null,
"attached_to": {
"displays": [
{
"id": "gk2P8Zw1Lq",
"title": "Welcome Popup"
}
],
"campaigns": []
}
},
{
"id": "Bn7dR4mTzC",
"title": "Free shipping master",
"kind": "master",
"platform": "manual",
"master_code": "FREESHIP",
"prefix_code": null,
"coupon_codes_remaining": null,
"coupon_codes_issued": null,
"healthy": true,
"failure_message": null,
"attached_to": {
"displays": [],
"campaigns": [
{
"id": "Nw8K2rT5xY",
"title": "Cart Reminder",
"type": "flow",
"channel": "sms"
}
]
}
}
],
"note": "Coupon pool inventory and health only. Privy does not track coupon redemptions, so usage counts are only available when you look up a single coupon by id.",
"pagination": {
"page": 1,
"per_page": 40,
"total_count": 2,
"total_pages": 1
}
}{
"error": {
"code": "unauthorized",
"message": "Bearer token is missing or invalid"
}
}{
"error": {
"code": "insufficient_scope",
"message": "Token does not have the required scope"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid",
"details": [
{
"field": "email",
"message": "is required"
}
]
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded"
}
}List coupons
Retrieve a paginated list of your coupon pools with their code inventory and health status.
This is inventory and health only. Privy does not track coupon
redemptions — check an individual code’s store-side usage counter with
GET /v1/coupons/{id}/codes/{code} — and every response carries an
in-band note saying so. Two code counters, each null where it
doesn’t apply: coupon_codes_remaining is a manual unique pool’s
unused inventory; coupon_codes_issued is how many codes any unique
pool has generated for contacts (approximate, and counted only since
the field was introduced).
Master pools have a single shared code and carry neither.
attached_to lists every display and message campaign currently
pointing at each pool, so “is this pool actually wired to my
abandoned-cart flow?” needs no dashboard spot-check.
Required scope: coupons_read
curl --request GET \
--url https://api.privy.com/v1/coupons \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.privy.com/v1/coupons"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.privy.com/v1/coupons', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.privy.com/v1/coupons",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.privy.com/v1/coupons"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.privy.com/v1/coupons")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.privy.com/v1/coupons")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"data": [
{
"id": "Xk2fW9qLpV",
"title": "Welcome 10%",
"kind": "unique",
"platform": "shopify",
"master_code": null,
"prefix_code": "VIP",
"coupon_codes_remaining": null,
"coupon_codes_issued": 4210,
"healthy": true,
"failure_message": null,
"attached_to": {
"displays": [
{
"id": "gk2P8Zw1Lq",
"title": "Welcome Popup"
}
],
"campaigns": []
}
},
{
"id": "Bn7dR4mTzC",
"title": "Free shipping master",
"kind": "master",
"platform": "manual",
"master_code": "FREESHIP",
"prefix_code": null,
"coupon_codes_remaining": null,
"coupon_codes_issued": null,
"healthy": true,
"failure_message": null,
"attached_to": {
"displays": [],
"campaigns": [
{
"id": "Nw8K2rT5xY",
"title": "Cart Reminder",
"type": "flow",
"channel": "sms"
}
]
}
}
],
"note": "Coupon pool inventory and health only. Privy does not track coupon redemptions, so usage counts are only available when you look up a single coupon by id.",
"pagination": {
"page": 1,
"per_page": 40,
"total_count": 2,
"total_pages": 1
}
}{
"error": {
"code": "unauthorized",
"message": "Bearer token is missing or invalid"
}
}{
"error": {
"code": "insufficient_scope",
"message": "Token does not have the required scope"
}
}{
"error": {
"code": "validation_failed",
"message": "One or more fields are invalid",
"details": [
{
"field": "email",
"message": "is required"
}
]
}
}{
"error": {
"code": "rate_limited",
"message": "Rate limit exceeded"
}
}Authorizations
Send either an API token or an OAuth access token as
Authorization: Bearer <token>. See the Authentication page for details.
Headers
Target a subaccount instead of the main connected account.
Pass a subaccount id from get_account's subaccounts list. Only direct subaccounts
of the connected account are reachable — omit this for the main account itself.
Query Parameters
Only pools of this kind.
master, unique Only pools on this platform.
manual, shopify, bigcommerce, woocommerce Case-insensitive substring match on the pool title.
Page number (starts at 1).
x >= 1Number of results per page. Values outside 10–100 are clamped to the nearest bound.
10 <= x <= 100Was this page helpful?