Pause every live channel on a campaign at its provider
Pauses each live channel on its provider and answers the whole campaign, moved to `paused`, with the per-channel outcome written back onto it.
POST /v1/campaign/{id}/pause
| Address | https://api.hanzo.ai/v1/campaign/{id}/pause |
| Method | POST |
| Operation | post_campaign_by_id_pause |
| Auth | Authorization: Bearer $HANZO_API_KEY |
Pauses each live channel on its provider and answers the whole campaign, moved to paused, with the per-channel outcome written back onto it.
Only channels that are live and carry a provider reference are touched; a channel whose executor is no longer wired is marked unavailable and one whose pause errored is marked failed, with the reason on the row. The campaign still reports paused in both cases, and that is deliberate rather than sloppy: no live channel remains that this process will meter, and the rows say exactly which provider was not reached so it can be settled by hand.
Org-scoped and fails closed: a valid bearer is required (403 without one) and the campaign is read under the caller's OWN org, so another tenant's id is a 404.
Request
1 field.
| Field | In | Type | Required | Description |
|---|---|---|---|---|
id | path | string | yes |
Response
The document declares no response body for this operation. It answers 200 on success and the platform error shape on failure — see Errors.
Examples
hanzo campaign pause <id>import { Configuration, CampaignApi } from 'hanzoai';
const api = new CampaignApi(new Configuration({ accessToken: process.env.HANZO_API_KEY }));
const { data } = await api.postCampaignByIdPause({ id: 'id' });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).post_campaign_by_id_pause(id='id')cfg := cloud.NewConfiguration()
cfg.AddDefaultHeader("Authorization", "Bearer "+os.Getenv("HANZO_API_KEY"))
client := cloud.NewAPIClient(cfg)
resp, _, err := client.CampaignAPI.PostCampaignByIdPause(context.Background()).Execute()
if err != nil {
return err
}use hanzo_cloud::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::post_campaign_by_id_pause(&cfg, Default::default()).await?;import ai.hanzo.cloud.ApiClient;
import ai.hanzo.cloud.api.CampaignApi;
ApiClient client = new ApiClient();
client.setRequestInterceptor(b -> b.header("Authorization", "Bearer " + System.getenv("HANZO_API_KEY")));
var result = new CampaignApi(client).postCampaignByIdPause();curl -X POST https://api.hanzo.ai/v1/campaign/<id>/pause \
-H "Authorization: Bearer $HANZO_API_KEY"The door reaches campaign through the campaign tool, which names its 11 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": "get_campaign"
}
}
}'How is this guide?