Hanzo
OpenapiMarketing

Replaces a campaign's editable fields.

Replaces a campaign's editable fields. It is a full write, not a patch: every field takes the value in the body, and an omitted one is cleared.

PUT /v1/marketing/campaigns/{id}

Addresshttps://api.hanzo.ai/v1/marketing/campaigns/{id}
MethodPUT
Operationput_marketing_campaigns_by_id
AuthAuthorization: Bearer $HANZO_API_KEY

Replaces a campaign's editable fields. It is a full write, not a patch: every field takes the value in the body, and an omitted one is cleared. The id comes from the path — the body cannot retarget another campaign — and createdAt is never rewritten.

Request

11 fields, body application/json (required).

FieldInTypeRequiredDescription
idpathstringyesID is the server-assigned campaign id ("camp_" + 128 random bits).
budgetbodyintegerBudget is what the campaign is allowed to cost, in USD cents.
channelbodystringChannel is the delivery surface: email, sms, social, meta, google or tiktok.
createdAtbodyintegerCreatedAt is unix seconds when the campaign was registered.
idbodystringID is the server-assigned campaign id ("camp_" + 128 random bits).
namebodystringName is the campaign's label.
objectivebodystringObjective is the free-text goal ("signups"), capped at 1024 bytes.
scheduledAtbodyintegerScheduledAt is the unix send time; 0 means unscheduled.
spendbodyintegerSpend is what the campaign has cost so far, in USD cents, clamped to >= 0.
statusbodystringStatus is the lifecycle: draft, scheduled, active, paused or completed.
updatedAtbodyintegerUpdatedAt is unix seconds of the last write.

Response

StatusBodyMeaning
200Campaignok

200 body — 10 fields.

FieldInTypeAlwaysDescription
budgetbodyintegerBudget is what the campaign is allowed to cost, in USD cents.
channelbodystringChannel is the delivery surface: email, sms, social, meta, google or tiktok.
createdAtbodyintegerCreatedAt is unix seconds when the campaign was registered.
idbodystringID is the server-assigned campaign id ("camp_" + 128 random bits).
namebodystringName is the campaign's label.
objectivebodystringObjective is the free-text goal ("signups"), capped at 1024 bytes.
scheduledAtbodyintegerScheduledAt is the unix send time; 0 means unscheduled.
spendbodyintegerSpend is what the campaign has cost so far, in USD cents, clamped to >= 0.
statusbodystringStatus is the lifecycle: draft, scheduled, active, paused or completed.
updatedAtbodyintegerUpdatedAt is unix seconds of the last write.

Failure carries the platform error shape — see Errors.

Examples

hanzo marketing campaigns set <id>

Marketing API · All Hanzo APIs · Interactive reference

How is this guide?

On this page