Campaigns

Update campaign settings (Auto Lead Refill)

Changed on

Deterministic settings patch. Currently the only writable field is Auto Lead Refill (autoLeadRefillEnabled) — a spend/lifecycle toggle, not content. Returns the updated Campaign object.

Turning refill on on an active campaign arms the daily sourcing task and clears a prior Origami auto-stop. It clears a billing pause (out of credits / spend limit) too, but funding is what resumes sourcing: an unfunded account re-pauses on the next run. Turning it off unarms the task. The intent flag survives pause and draft; the task only runs while the campaign is active.

Turning refill off does not cancel a refill run already in flight — that batch finishes, capped by the task's per-run budget.

Duplicate-protection, send windows, daily caps, and message content stay out of this body: change those through POST /campaigns/{campaignId}/edits.

patch/campaigns/{campaignId}

Request

  • Base URL
    https://origami.chat/api/v2
  • URL
    https://origami.chat/api/v2/campaigns/{campaignId}
  • Auth
    HTTP bearer

Request body

autoLeadRefillEnabledboolean
autoTopUpEnabledboolean

Pre-rename spelling of autoLeadRefillEnabled. Still accepted; autoLeadRefillEnabled wins when both are sent.

Response

The updated Campaign object.

object'campaign' required
idstring uuid required
slugstring nullable required
namestring required
status'draft' | 'active' | 'paused' required

The campaign's lifecycle state.

workspaceIdstring uuid nullable required

Legacy home workspace; null for campaigns created from workspace-less chats.

tableIdstring uuid nullable required

Derived leads table (dominant enrolled-sequence table); null for a shell campaign.

briefunknown required
outOfLeadsboolean required
haltedCountinteger required

How many of an active campaign's people a disconnected sender stopped rather than their finishing. Reported for every active campaign, so it can be above zero while the campaign is still sending to everyone else; combine it with outOfLeads to read the campaign's end state. outOfLeads alone cannot tell a campaign that completed from one that was cut short, since both have nothing pending: outOfLeads with haltedCount above zero means the campaign ended early, and reconnecting the sender resumes those people while adding leads will not reach them. Zero for draft and paused campaigns.

createdAtstring date-time required
updatedAtstring date-time required

Changes