Revive a stopped campaign
Undo a cancel — bring the campaign back and re-queue the contacts it skipped.
Undo a cancel — bring the campaign back and re-queue the contacts it skipped.
POST /v2/campaigns/{campaign_id}/cancel is terminal for resume: it
skips the undialled contacts and removes their scheduled calls, so resume
correctly refuses with a 409. This endpoint is the way back — the
dashboard's Restart button does the same. The campaign goes back to
active, every batch a cancel stopped is re-opened, and each contact the
cancel skipped is treated by what had happened to it:
- Never answered — back to
pendingand dialled again, keeping its remaining retry budget. - Waiting for a booked follow-up — the follow-up is booked again, even for someone who already answered: a call-back a person asked for is a request, not a retry. The follow-up policy still decides, when it falls due, whether it is placed.
- Answered, with no follow-up booked — left as it is, and not dialled.
It undoes one action, not history: contacts skipped for any other reason —
the window closed, retries ran out — stay skipped, and outcomes are never
reset. So a completed campaign in which nothing was ever cancelled has
nobody to re-queue: it goes back to active and no one is dialled.
409 in two cases:
- The campaign is not
cancelled,expiredorcompleted— pause a running campaign instead. That is also why pressing twice is harmless: the first press left the campaignactive. - Its
end_timehas passed. This endpoint takes no new end time, andPATCHcannot open the window first: a cancelled campaign cannot be edited, and on an expired or completed one the PATCH that extendsend_timere-activates the campaign itself, after which revive answers 409 because it is active. An expired campaign has passed itsend_timeby definition, so it always lands here; a cancelled one whose window has closed cannot be revived through the API — create a new campaign for those contacts.
Rate limit: 2000 requests per minute per organization, counted together with every endpoint that has no stricter limit of its own. Exceeding it returns 429 with Retry-After; the X-RateLimit-* response headers report your remaining allowance on every call.
v2/campaigns/{campaign_id}/reviveAuthorization
AuthorizationRequiredBearer <token>
Your Graine API key. Create one in the dashboard under Developers, or via POST /v2/api-keys. Send it as Authorization: Bearer <key>.
In: header
Path Parameters
campaign_idRequiredCampaign Id
Campaign identifier.
Query Parameters
organization_idOrganization Id
Must match the organisation the API key belongs to.
Response Body
200
The campaign brought back, with its skipped contacts re-queued.
batch_idBatch Id | null
The batch created from contacts on this request, if any were supplied. Null on every other read — a campaign can hold many batches; list them with GET /v2/campaigns/{campaign_id}/batches.
total_contactsTotal Contacts
Contacts across every batch.
0skipped_countSkipped Count | null
Contacts of that list that were left out — each names an agent_language the agent doesn't have. Null when every contact was added, and on every other read.
skipped_rowsSkipped Rows | null
The contacts left out, each with its CSV line (the header is line 1) or its position in contacts, and why: the first 100. Null when every contact was added, and on every other read.
@minItems 0
@minItems 0
@minItems 0
@minItems 0
campaign_idRequiredCampaign Id
Campaign identifier.
organization_idOrganization Id | null
The organisation this campaign belongs to. Always your own.
nameRequiredName | null
Human label for the campaign.
agent_idRequiredAgent Id | null
Agent that places every call.
phone_numbersPhone Numbers
Caller IDs this campaign dials from.
@minItems 0
@minItems 0
@minItems 0
@minItems 0
phone_number_strategyPhone Number Strategy
round_robin | random | least_loaded.
"round_robin"phone_number_indexPhone Number Index
Round-robin cursor: the position the next call starts from.
0timezoneTimezone
IANA timezone the working hours and the window are evaluated in.
"UTC"working_hours_enforcedWorking Hours Enforced
False dials around the clock, subject only to start_time/end_time.
falseworking_hoursWorking Hours
Per-day dialling windows, keyed by lowercase day name.
max_concurrent_callsMax Concurrent Calls | null
Ceiling on this campaign's SIMULTANEOUS calls. Omit for no campaign ceiling. It can only LOWER what the organisation's limit and the fair share across active campaigns already allow — raising it past the org limit has no effect.
retry_policyRequiredRetry Policy
What happens after a busy or a no-answer.
follow_up_policyRequiredFollow Up Policy
Callbacks after the first cycle ends.
transliterationRequiredTransliteration
Name-script rewriting inherited by every batch.
start_timeStart Time | null
ISO-8601 UTC. Nothing dials before this.
end_timeEnd Time | null
ISO-8601 UTC. Nothing dials after this; the campaign then expires.
default_call_variablesDefault Call Variables
Prompt variables applied to every call, overridable per contact.
default_call_contextDefault Call Context
Free-form context applied to every call.
statusRequiredStatus
created | active | paused | completed | cancelled | expired | archived. A campaign is born 'created' and becomes 'active' when its first batch dials. 'archived' is what DELETE leaves behind; 'cancelled' is what the cancel action does.
metadataMetadata
Whatever you stored on the campaign.
total_batchesTotal Batches
Batches created under this campaign.
0active_batchesActive Batches
Batches not yet finished.
0completed_contactsCompleted Contacts
Contacts that reached a completed call, counted ONCE regardless of how many attempts it took. Use this for progress, not completed_calls.
0completed_callsCompleted Calls
Calls that completed, retries included.
0failed_callsFailed Calls
Calls that failed.
0busy_callsBusy Calls
Calls that hit a busy line.
0no_answer_callsNo Answer Calls
Calls that rang out.
0voicemail_callsVoicemail Calls
Calls answered by a voicemail box. A SUBSET of no_answer_calls, never a peer of it — do not add it to the others to form a total.
0in_progress_callsIn Progress Calls
Calls live right now.
0follow_up_callsFollow Up Calls
Follow-up calls placed.
0follow_up_exhaustedFollow Up Exhausted
Contacts whose follow-up attempts ran out.
0created_atCreated At | null
ISO-8601 UTC.
updated_atUpdated At | null
ISO-8601 UTC.
started_byStarted By | null
Who started its latest run: {type: member | api_key | system, id, at}. A person is their member id. Null on a campaign that has not started.
approved_byApproved By | null
The workspace Admin who approved that start, when the workspace requires approval: {type: member, id, at, request_id}. Null when it started without needing one.
202
Only for an API key a workspace MEMBER minted, when the workspace requires an Admin's approval for this action. Nothing has changed yet: the action is recorded as an approval request and happens, exactly as sent, when any Admin approves it. Admin-minted and older keys never get this answer. The resource this call created or touched is included under its own name (agent, campaign or batch).
statusStatus
Always pending_approval.
"pending_approval"codeCode
Always approval_required.
"approval_required"detailRequiredDetail
What happens next, in a sentence.
approval_request_idRequiredApproval Request Id
The approval request's id.
approval_requestRequiredApproval Request
The request this call opened or added to.
400
1000 — malformed or contradictory input: an unknown status filter or timezone, a start_time or end_time without a timezone offset, an end_time at or before start_time or more than 365 days ahead, or an empty patch body. 1002 — a required parameter is missing.
errorRequiredError
Stable integer code from the /v2 error table. Branch on this.
messageRequiredMessage
One human-readable sentence. Wording may change; the code will not.
401
1100 — missing, unknown or inactive API key. 1101 — a browser session token was presented.
errorRequiredError
Stable integer code from the /v2 error table. Branch on this.
messageRequiredMessage
One human-readable sentence. Wording may change; the code will not.
402
1400 — the organisation's credit balance cannot fund a call, so nothing was started. Top up and retry.
errorRequiredError
Stable integer code from the /v2 error table. Branch on this.
messageRequiredMessage
One human-readable sentence. Wording may change; the code will not.
403
1102 — the key is valid but lacks the scope this endpoint requires, or names another organisation. GET /v2/scopes reports which scopes the key holds.
errorRequiredError
Stable integer code from the /v2 error table. Branch on this.
messageRequiredMessage
One human-readable sentence. Wording may change; the code will not.
404
1200 — no such campaign, or no such agent, in this organisation. A campaign belonging to another organisation answers 404, never 403, so ids cannot be probed.
errorRequiredError
Stable integer code from the /v2 error table. Branch on this.
messageRequiredMessage
One human-readable sentence. Wording may change; the code will not.
409
1201 — the campaign is not cancelled, expired or completed (pause a running campaign instead), or its end_time has already passed, which this endpoint cannot change. 1202 — the agent is switched off, so it takes no new calls: switch it on and try again. 1203 — the agent was deleted, so it takes no new calls.
errorRequiredError
Stable integer code from the /v2 error table. Branch on this.
messageRequiredMessage
One human-readable sentence. Wording may change; the code will not.
422
1001 — the body or query failed validation — an unknown field, a value out of range, or a working-hours time that is not 24-hour HH:MM. The message names the first offending field.
errorRequiredinteger
Stable integer code from the error table. Branch on this, not on the message.
messageRequiredstring
One human-readable sentence. Wording may change; the code will not.
429
1300 — per-organisation rate limit exceeded. Carries Retry-After.
errorRequiredError
Stable integer code from the /v2 error table. Branch on this.
messageRequiredMessage
One human-readable sentence. Wording may change; the code will not.
503
1501 — a service this endpoint depends on is unreachable or returned a 5xx.
errorRequiredError
Stable integer code from the /v2 error table. Branch on this.
messageRequiredMessage
One human-readable sentence. Wording may change; the code will not.
504
1502 — a service this endpoint depends on did not respond in time.
errorRequiredError
Stable integer code from the /v2 error table. Branch on this.
messageRequiredMessage
One human-readable sentence. Wording may change; the code will not.
The campaign brought back, with its skipped contacts re-queued.

