Duplicate a campaign
Copy a campaign of any status into a new DRAFT named '<name> (copy)', with the same agent, brief, opener, caller number, calling window, voicemail, double dial, limits, dialling rules and converted outcomes, and no scheduled start. recipients picks what else comes across: none (the default, settings only), all (every recipient), or unreached (everyone the campaign didn't speak to, except recipients that were stopped or removed by a do-not-call check). Copied recipients keep their variables, notes, time zone and state, and pass the do-not-call list again. Returns the new campaign and, unless recipients is none, { inserted, skipped, suppressed, invalid }. The copy dials nothing until launch_campaign.
Authorization
bearerAuth A personal access token from Settings > API tokens.
In: header
Path Parameters
Workspace slug (GET /me lists yours).
Header Parameters
A key you choose, such as a UUID, that makes this POST safe to retry. Within 24 hours the same key and request answers with the first successful answer and runs nothing, the same key with a different request answers 422 idempotency_key_reused, and a key whose request is still running answers 409 idempotency_key_in_use. A failed request keeps nothing, so the same key runs it again.
1 <= length <= 255Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
application/problem+json
curl -X POST "https://example.com/workspaces/string/campaigns/string/duplicate" \ -H "Content-Type: application/json" \ -d '{}'{
"campaign": {
"id": "string",
"name": "string",
"status": "string",
"agentId": "string",
"property1": null,
"property2": null
},
"property1": null,
"property2": null
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}{
"type": "http://example.com",
"title": "string",
"status": 0,
"detail": "string",
"code": "string",
"errors": [
{
"path": "string",
"message": "string"
}
],
"estimate": {},
"retryAfterSeconds": 0
}Delete a campaign DELETE
Delete a DRAFT, COMPLETED or CANCELLED campaign along with its recipient list and per-recipient results. A scheduled, running or paused campaign can't be deleted: cancel it first. Its calls stay in the workspace's call history. This can't be undone.
Preview who a campaign will call GET
Read the audience of a campaign and preview who it matches now: audience (null when the campaign calls only the recipients added to it), summary (one plain line a rule), and preview { matched, doNotCall, willJoin, sample }, where matched counts every contact the rules match, doNotCall those on the do-not-call list, willJoin the rest, and sample up to 20 of them in phone number order. Pass audience to preview a different filter without saving it, then save it with update_campaign while the campaign is a draft. An audience picks recipients by filtering the workspace's contacts: { rules: [...] }, and every rule must hold. A rule is { kind: 'tags', op: 'any' | 'none', tags: [...] }, or { kind: 'field', key, op, ... } on a contact field (see list_contact_fields): a text field takes equals or contains with a text value (ignoring case), or is_set or is_empty; a number field takes eq, gt, gte, lt or lte with a number value; a yes or no field takes is or is_not with true or false; a choice field takes any_of with values from its options. No rules matches every contact. Numbers on the do-not-call list are always left out. The matches join the campaign as recipients when it launches, or at its scheduled start, alongside any recipients you add (one row a number; an added recipient keeps their variables), each with the contact's name and fields as variables. The list is then locked, unless autoEnroll keeps adding contacts who start to match.