Back to reference

API Reference

Duplicate a campaign into a draft with a target audience and selected leads

This is one of the two supported public campaign-creation flows alongside starter-template creation. The new draft is created by duplicating an existing campaign, optionally renaming it, attaching a required audienceId, and optionally narrowing the duplicate to the provided leadIds subset. The public API does not expose workflow-template lookup, raw workflow payloads, or scratch-built workflow authoring.

POST/v1/accounts/{accountGroupId}/campaigns/{campaignId}/duplicate

Duplication validation

The source campaign and target audience must belong to the selected account group, every leadId must belong to the audience, and active workflow conflicts are rejected.

Integration notes

Required API permission

campaigns:write.

Prerequisites

integration_api_key, account_group_access.

Idempotency

not supported; check the current resource state before retrying this request.

Parameters

accountGroupIdPath

Type: string

Account group ID that scopes the request.

Required

campaignIdPath

Type: string

Campaign ID that identifies the campaign to read or mutate.

Required

Request body

Required

Optional

Content types

application/json

Schema

object

Fields

name

Type: string

Human-readable name for this resource.

Optional

audienceId

Type: string

Audience ID that identifies the list or folder target.

Required

leadIds

Type: array<string>

Lead IDs to include in the requested operation.

Optional

Responses

201

Duplicated draft campaign metadata

Schema: CampaignSuccessResponse

400

Request validation failed

Schema: ValidationErrorResponse

401

Invalid or missing API key

Schema: ErrorResponse

403

Missing required permission

Schema: ErrorResponse

404

Resource not found

Schema: ErrorResponse

409

Conflict — resource is in a state that prevents this operation

Schema: ErrorResponse

429

Rate limit exceeded

Schema: ErrorResponse

500

Internal server error

Schema: ErrorResponse

502

Upstream service error

Schema: ErrorResponse

Response examples

201 Example JSONCampaignSuccessResponse
{
    "success": true,
    "data": {
        "id": "507f1f77bcf86cd799439011",
        "name": "Avery Stone",
        "description": "string",
        "status": "draft",
        "selectedLeadCount": 25,
        "includeConversationHistory": true,
        "autoCancelOnMessageReceived": true,
        "outreachLanguage": "en",
        "createdAt": "string",
        "updatedAt": "string",
        "startedAt": "string",
        "rateLimitedUntil": "string"
    },
    "error": null,
    "traceId": "507f1f77bcf86cd799439011"
}
400 Example JSONValidationErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "VALIDATION_ERROR",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}
401 Example JSONErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "string",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}
403 Example JSONErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "string",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}
404 Example JSONErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "string",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}
409 Example JSONErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "string",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}
429 Example JSONErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "string",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}
500 Example JSONErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "string",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}
502 Example JSONErrorResponse
{
    "success": false,
    "data": null,
    "error": {
        "code": "string",
        "message": "Thanks for the context. I can send over details this afternoon.",
        "details": "string"
    },
    "traceId": "507f1f77bcf86cd799439011"
}