Campaigns

Start, Pause and Edit

Control a running campaign — start, pause, resume, cancel, and change its settings.

A campaign moves through a small set of states, and each control is only valid from some of them.

StatusMeaning
draftCreated, not started. Nothing dials.
scheduledStarted, waiting for its start_at.
runningDialling, within its calling hours.
pausedStopped by you, or by itself after a configuration failure.
completedEvery recipient reached a final state.
cancelledStopped permanently; the queue was cleared.

Start

Your app
POST https://api.tryvox.io/v1/voice/accounts/{auth_id}/campaigns/{id}/start
request
TryVox
processing
response
Response 200
returned to your app
curl -X POST https://api.tryvox.io/v1/voice/accounts/$TRYVOX_AUTH_ID/campaigns/$CAMPAIGN_ID/start \
  -u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN

Valid from draft, paused and scheduled — so the same call both starts a new campaign and resumes a paused one, picking up where it stopped.

Two checks run before anything dials:

  • The campaign must have something to dial. 400 VALIDATION_FAILED — campaign has no recipients to dial.
  • A deadline must be reachable. If the campaign has complete_within_minutes or complete_by, TryVox works out the channels that would need and refuses if your account does not have them. The message carries the arithmetic.

If start_at is in the future the campaign goes to scheduled rather than running, and begins on its own at that time.

The deadline clock starts here, not at creation — so time spent uploading your list never counts against it.

Pause

Your app
POST https://api.tryvox.io/v1/voice/accounts/{auth_id}/campaigns/{id}/pause
request
TryVox
processing
response
Response 200
returned to your app
curl -X POST https://api.tryvox.io/v1/voice/accounts/$TRYVOX_AUTH_ID/campaigns/$CAMPAIGN_ID/pause \
  -u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN

Valid from running and scheduled. New calls stop; calls already connected run to their natural end — pausing is not a mass hangup. Recipients already claimed for the current batch but not yet dialled are returned to the queue.

Resume with start.

Cancel

Your app
POST https://api.tryvox.io/v1/voice/accounts/{auth_id}/campaigns/{id}/cancel
request
TryVox
processing
response
Response 200
returned to your app
curl -X POST https://api.tryvox.io/v1/voice/accounts/$TRYVOX_AUTH_ID/campaigns/$CAMPAIGN_ID/cancel \
  -u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN

Valid from draft, scheduled, running and paused. Everything still waiting is marked cancelled and will never be dialled. Like pause, it does not hang up calls in progress.

Cancelling is final — a cancelled campaign cannot be restarted. Pause instead if you may want to carry on.

Campaigns that pause themselves

If a call fails for a reason that would fail every call — most often an AI integration with no number bound to it — the campaign stops after the first failure rather than burning through your list. It moves to paused with a pause_reason in the provider's own words:

{ "status": "paused", "pause_reason": "integration has no number to call from" }

The remaining recipients are untouched. Fix the configuration, then start again.

This is why a misconfigured campaign costs you one failed call instead of ten thousand.

Edit

Your app
PATCH https://api.tryvox.io/v1/voice/accounts/{auth_id}/campaigns/{id}
request
TryVox
processing
response
Response 200
returned to your app
curl -X PATCH https://api.tryvox.io/v1/voice/accounts/$TRYVOX_AUTH_ID/campaigns/$CAMPAIGN_ID \
  -u $TRYVOX_AUTH_ID:$TRYVOX_AUTH_TOKEN \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "December renewals",
    "target_type": "ai_agent",
    "target_config": { "integration_id": "92b881f5-56be-4983-8001-405484f3283b" },
    "from": "+912250658839",
    "max_concurrent": 6,
    "complete_within_minutes": 90,
    "window_start": "10:00",
    "window_end": "19:00",
    "timezone": "Asia/Kolkata",
    "max_attempts": 1
  }'

The body takes the same fields as Create, minus recipients and start.

This is a replacement, not a sparse merge. Send the complete set of settings you want, not only the ones you are changing — anything you leave out is cleared. That is deliberate: with a sparse patch there is no way to express remove the deadline.

What can be edited, and when

StatusEditable
draft, scheduled, pausedYes
runningNo — pause it first
completed, cancelled, failedNo

A running campaign is refused because its dialler reads these settings on every tick; an edit in flight would change the pace or calling hours of calls already in the air with no clear before and after. Pause, edit, start — it is one extra call.

The target locks once any call has gone out. After the first dial, target_type, target_config and from can no longer be changed, because the results already recorded belong to them. Pace, calling hours, retries and the deadline stay editable for the whole life of the campaign — they only govern calls not yet placed.

Get campaign reports both rules so you do not have to derive them:

"edit": { "editable": true, "target_locked": true, "reason": "" }

Errors

StatusCodeMeaning
400VALIDATION_FAILEDThe transition is not valid from the current status, the deadline cannot be met, or a field is invalid.
400VALIDATION_FAILEDcampaign changed state while being edited; reload and try again — it started between your read and your write.
404NOT_FOUNDNo campaign with that id on this account.

On this page