Campaign

One go-to-market push across paid, organic and email at once.

Also for this capability: API · CLI · MCP · SDKs

One go-to-market push across paid, organic and email at once.

Base URLhttps://api.hanzo.ai
Operations11
AuthAuthorization: Bearer $HANZO_API_KEY

Specification

Specification pending — no HIP in hanzoai/hips declares capability: campaign yet. What this capability serves is below, from the API document; what it is — the store it owns, how it meters, what it publishes — is written as a HIP under HIP-0139.

Four surfaces

SurfaceReaches this capability asCoverage
RESTcampaign at its own prefix11 operations
CLIhanzo campaign …11 of 11
SDKCampaignApi in every published client11 methods
MCPtool campaign on https://api.hanzo.ai/v1/mcp9 operations, 2 under the document's own id — ask describe for the rest

Quickstart

export HANZO_API_KEY=sk-...   # console.hanzo.ai → API keys

Then the first call — a read that needs nothing but the key. GET /v1/campaign, operation get_campaign:

hanzo campaign list
import { Configuration, CampaignApi } from 'hanzoai';

const api = new CampaignApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.getCampaign();
from hanzoai.cloud import ApiClient, Configuration
from hanzoai.cloud.api import CampaignApi

client = ApiClient(Configuration(access_token=os.environ["HANZO_API_KEY"]))
result = CampaignApi(client).get_campaign()
cfg := hanzoai.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := hanzoai.NewAPIClient(cfg)

resp, _, err := client.CampaignAPI.GetCampaign(context.Background()).Execute()
if err != nil {
	return err
}
use hanzo_client::apis::{configuration::Configuration, campaign_api};

let mut cfg = Configuration::new();
cfg.bearer_access_token = std::env::var("HANZO_API_KEY").ok();

let result = campaign_api::get_campaign(&cfg, Default::default()).await?;
import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.CampaignApi;

ApiClient client = new ApiClient();
client.setBearerToken(System.getenv("HANZO_API_KEY"));

var result = new CampaignApi(client).getCampaign();
curl https://api.hanzo.ai/v1/campaign \
  -H "Authorization: Bearer $HANZO_API_KEY"

MCP reaches campaign through the campaign tool, which names its 9 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_campaigns"
         }
       }
     }'

Answers 200 with object — ok.

Endpoints

EndpointWhat it does
DELETE /v1/campaign/{id}/channels/{kind}Drops one channel from a campaign and returns the updated campaign.
POST /v1/campaign/{id}/channelsAdds a channel to a campaign, or REPLACES the one it already has of that kind, and returns the updated campaign.
POST /v1/campaign/{id}/launchLaunch a campaign across every channel it declares
GET /v1/campaign/{id}/metricsReturns a campaign's results over a window: the analytics funnel (impressions, clicks, conversions, revenue, visitors), the spend each channel's connector reports, and the derived growth KPIs — CTR, CVR, CAC and ROAS.
POST /v1/campaign/{id}/pausePause every live channel on a campaign at its provider
GET /v1/campaign/{id}Returns one campaign of the caller's org — its name, audience, creatives, channels with their per-channel launch state, schedule, budget and status.
PUT /v1/campaign/{id}Rewrites a campaign's core fields — name, audience, creatives, schedule and budget — and returns the updated campaign.
DELETE /v1/campaign/{id}Removes one campaign of the caller's org and answers 204 with no body.
GET /v1/campaign/summaryReturns the org's go-to-market roll-up: how many campaigns exist, how many are live, their total budget in cents, and which channel executors this deployment can actually reach.
GET /v1/campaignReturns the org's campaigns, newest first, optionally narrowed to one status.
POST /v1/campaignCreates a campaign as a DRAFT and returns it.

All Hanzo APIs · Interactive reference

Was this page useful?