Returns every promo the deployment offers with its live counters: how many orgs…
Returns every promo the deployment offers with its live counters: how many orgs have redeemed it and how many redemptions remain under the cap.
GET /v1/marketing/promos
| Address | https://api.hanzo.ai/v1/marketing/promos |
| Method | GET |
| Operation | get_marketing_promos |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Returns every promo the deployment offers with its live counters: how many orgs have redeemed it and how many redemptions remain under the cap. The promos are fleet-wide, not per-org — only the counters move.
Request
GET /v1/marketing/promos takes no parameters and no body — the credential is the whole request.
Response
| Status | Body | Meaning |
|---|---|---|
200 | PromoList | ok |
200 body — 12 fields.
| Field | In | Type | Always | Description |
|---|---|---|---|---|
data | body | PromoStatus[] | — | Data is every promo in the deployment, oldest first, each with its live counters. The list is fleet-wide rather than per-org. |
data[].promo | body | Promo | — | |
data[].promo.active | body | boolean | — | Active is false for a promo that is no longer offered; an inactive promo quotes as ineligible and refuses to redeem. |
data[].promo.code | body | string | — | Code is the promo id, e.g. |
data[].promo.createdAt | body | integer | — | CreatedAt is unix seconds. |
data[].promo.description | body | string | — | Description is the human-readable offer. |
data[].promo.maxRedemptions | body | integer | — | MaxRedemptions is the hard fleet-wide cap; the redemption past it is declined. |
data[].promo.percentOff | body | integer | — | PercentOff is the discount applied to ONE month's list price. |
data[].promo.plans | body | string | — | Plans is the csv of eligible plan ids ("pro,max,team"). |
data[].promo.teamSeatCap | body | integer | — | TeamSeatCap is how many Team seats bill at the promo rate; seats beyond it bill at list. |
data[].redeemed | body | integer | — | Redeemed is how many orgs have taken it, Remaining how many are left under the fleet-wide cap. |
data[].remaining | body | integer | — | Remaining is MaxRedemptions minus Redeemed, floored at 0. |
Failure carries the platform error shape — see Errors.
Examples
hanzo marketing promos listimport { Configuration, MarketingApi } from 'hanzoai';
const api = new MarketingApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getMarketingPromos();from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import MarketingApi
client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = MarketingApi(client).get_marketing_promos()cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.MarketingAPI.GetMarketingPromos(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::apis::{configuration::Configuration, marketing_api};
let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();
let result = marketing_api::get_marketing_promos(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.MarketingApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new MarketingApi(client).getMarketingPromos();curl https://api.hanzo.ai/v1/marketing/promos \
-H "Authorization: Bearer $HANZO_API_KEY"The door reaches marketing through the marketing tool, which names its 35 operations with its own verbs — this one among them, under a name only the door declares. describe explains any of them:
curl -X POST https://api.hanzo.ai/v1/mcp \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "describe",
"arguments": {
"op": "list_marketing_audiences"
}
}
}'How is this guide?