---
title: "Move to campaign"
method: PUT
path: "/{sub_domain}/api/campaign-leads/move-to-campaign"
tags: ["Campaign-Leads"]
---

# Move to campaign

`PUT /{sub_domain}/api/campaign-leads/move-to-campaign`

## Request

- Base URL: `https://api.commpeak.com/dialer`
- URL: `https://api.commpeak.com/dialer/{sub_domain}/api/campaign-leads/move-to-campaign`
- Auth: API key in header `Authorization`

Move leads from one campaign to another.

**When to use.** Reassign leads from a source campaign to a destination campaign in one request, optionally carrying over their existing campaign-lead data.

**Parameters.**

- `id` (array of integers, required): the lead IDs to move.
- `source_campaign_id` (integer, required): the campaign the leads are moving from.
- `destination_campaign_id` (integer, required): the campaign the leads are moving to.
- `with_preserve_data` (boolean): when true, the campaign-lead data is carried over to the destination campaign.

**Returns.** `{ "campaignLeads": [ ... ], "messages": [ ... ] }`. `campaignLeads` holds the moved records in the destination campaign, and `messages` lists any leads that were skipped, for example a lead that was not found or was not assigned to the source campaign.

**Example.**

```json
{ "id": [1, 123], "source_campaign_id": 1, "destination_campaign_id": 2, "with_preserve_data": true }
```

## Path parameters

- `sub_domain` string, required: Dialer Name (subdomain)

## Request body

- MoveToCampaignInput
  - `id` unknown[], required: Lead IDs to move.
    - unknown
  - `source_campaign_id` integer, required: Source campaign ID.
  - `with_preserve_data` boolean, nullable: Preserve campaign-lead data when moving.
  - `destination_campaign_id` integer, required: Destination campaign ID.

## Response `200`

Successful Response

- MoveToCampaignResponse
  - `campaignLeads` CampaignLeadItem[], required
    - `lead_id` integer, nullable: Lead ID.
    - `campaign_id` integer, nullable: Campaign ID.
    - `status_id` integer, nullable: Campaign lead status ID.
    - `created_at` string, nullable: Created at.
    - `updated_at` string, nullable: Updated at.
    - `assigned_user_id` integer, nullable: Assigned user ID.
    - `assigned_at` string, nullable: Assigned at.
    - `call_after` string, nullable: Do not call before this time (freeze).
    - `weight` integer, nullable: Dialing weight (1 to 65536).
    - `is_deleted` integer, nullable: Is deleted (1 = deleted, 0 = active).
    - `calls_count` integer, nullable: Number of calls made to this campaign lead.
  - `messages` string[], nullable: Per-lead informational messages (e.g. lead not found / not assigned to source).

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/commpeak/apis/commpeak-dialer-api.md) - [All operations](https://skmtc.dev/commpeak/apis/commpeak-dialer-api/llms.txt) - [OpenAPI document](https://skmtc.dev/commpeak/apis/commpeak-dialer-api/revisions/18c5edc07544?raw)
