List promos

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

Addresshttps://api.hanzo.ai/v1/marketing/promos
MethodGET
Operationget_marketing_promos
AuthAuthorization: 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

StatusBodyMeaning
200marketing.PromoListok
defaultproblem-detailsrefused

200 body — 12 fields.

FieldInTypeAlwaysDescription
databodymarketing.PromoStatus[]—Data is every promo in the deployment, oldest first, each with its live counters.
data[].promobodymarketing.Promo—
data[].promo.activebodyboolean—Active is false for a promo that is no longer offered; an inactive promo quotes as ineligible and refuses to redeem.
data[].promo.codebodystring—Code is the promo id, e.g. "first1000".
data[].promo.createdAtbodyinteger (int64)—CreatedAt is unix seconds.
data[].promo.descriptionbodystring—Description is the human-readable offer.
data[].promo.maxRedemptionsbodyinteger (int64)—MaxRedemptions is the hard fleet-wide cap; the redemption past it is declined.
data[].promo.percentOffbodyinteger (int64)—PercentOff is the discount applied to ONE month's list price.
data[].promo.plansbodystring—Plans is the csv of eligible plan ids ("dev,max-5x,max-20x,team").
data[].promo.teamSeatCapbodyinteger (int64)—TeamSeatCap is how many Team seats bill at the promo rate; seats beyond it bill at list.
data[].redeemedbodyinteger (int64)—Redeemed is how many orgs have taken it, Remaining how many are left under the fleet-wide cap.
data[].remainingbodyinteger (int64)—Remaining is MaxRedemptions minus Redeemed, floored at 0.

Failure carries the platform error shape — see Errors.

Examples

hanzo marketing promos list
import { 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 := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.MarketingAPI.GetMarketingPromos(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::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.setBearerToken(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"

MCP reaches marketing through the marketing tool, which names its 35 operations with its own verbs — this one among them, under a name only MCP 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"
         }
       }
     }'

Marketing API · All Hanzo APIs · Interactive reference

Was this page useful?