Campaigns

Edit a campaign

Only supplied fields change. API keys must send the current expectedPolicyVersion (a stale one returns 409 POLICY_CHANGED). A key edit returns the campaign to draft for review (unless it is paused or completed); keys cannot set status:"active". While a playbook's auto-approve is on, raising monthlyBudgetCents needs a signed-in owner or admin. One exception: a body with only recipients that keeps every current person and appends new ones adds them to an active playbook without a version and keeps it on, like POST /playbooks/{id}/people.

patch/campaigns/{id}

Request

  • Base URL: https://gtmswag.com/api/v1
  • URL: https://gtmswag.com/api/v1/campaigns/{id}
  • Auth: HTTP bearer

Path parameters

idstring required

Campaign or playbook ID (cmp_).

Request body

recipientSource'manual' | 'workflow'

Manual roster or external workflow.

mode'always_on' | 'batch' | 'single'

always_on keeps sending; batch is one roster; single is one gift.

monthlyBudgetCentsinteger

Monthly spend limit in USD cents for always-on campaigns.

customizationCustomization

displayText: lettering; logoAssetId: artwork; giftLinkContactEmail: public sender contact; giftLinkWelcome: private-link welcome (400 chars, {{firstName}}/{{company}}), separate from the printed note.

namestring

Campaign name for review and lookup.

descriptionstring

Internal campaign description.

productIdstring

Current catalog gift ID; never invented.

status'draft' | 'active' | 'paused' | 'completed'

Campaign state; connectors prepare drafts.

budgetCentsinteger

Campaign limit in USD cents.

perPersonCentsinteger

Per-person USD cents, within budget.

maxSendsinteger

Maximum campaign recipient count.

senderNamestring

Gift sender's name.

senderCompanystring

Gift sender's company.

messagestring

Printed note and recipient fallback.

expectedPolicyVersioninteger

The campaign's current policyVersion; a stale value returns POLICY_CHANGED.

Response

Success: {"data": Campaign}.

Changes

No recorded changes to this operation across all 1 revision of this API.