---
title: "Move leads to a campaign or list"
method: POST
path: "/api/v2/leads/move"
tags: ["Lead"]
---

# Move leads to a campaign or list

`POST /api/v2/leads/move`

Move leads to a different campaign or list. This endpoint will return a background job that will process the move. The job will be processed in the background and the leads will be moved to the destination campaign or list. You can use the `/background-jobs/:id` endpoint to check the job status. Note: When using the `ids` parameter, you must also provide either `campaign` or `list_id` to specify which campaign or list to filter the leads from.


Requires one of the following scopes: `leads:update`, `leads:all`, `all:update`, `all:all`

## Request body

- object
  - `search` string — A search string to search the leads against - can be First Name, Last Name, or Email
  - `filter` string — Filter criteria for leads. For custom lead labels, use the `interest_status` field.
  - `campaign` string, uuid — Campaign ID to filter leads
  - `list_id` string, uuid — List ID to filter leads
  - `in_campaign` boolean — Whether the lead is in a campaign
  - `in_list` boolean — Whether the lead is in a list
  - `ids` string[] — Array of lead IDs to include. When using this parameter, you must provide either `campaign` or `list_id` to specify which campaign or list to filter the leads from. This parameter acts as a filter within the specified campaign or list, not as a standalone way to select leads.
  - `queries` object[]
    - `actionType` 'reply' | 'email-open' | 'last-contacted' | 'link-click' | 'lead-status' | 'lead-status-change', required
    - `values` object, required
      - `occurrence-days` number
      - `occurrence-count` object
        - `condition` 'more' | 'less' | 'equal'
        - `count` number
      - `lead-status` object
        - `status` number
        - `condition` 'is' | 'is-not'
  - `excluded_ids` string[] — Array of lead IDs to exclude
  - `contacts` string[] — Array of emails the leads needs to have
  - `to_campaign_id` string, uuid — The ID of the campaign to move the leads to.
  - `to_list_id` string, uuid — The ID of the list to move the leads to.
  - `ignore_resource_filter_clauses` boolean — Whether to ignore saved lead-finder clauses for the source campaign/list when selecting leads to move.
  - `check_duplicates_in_campaigns` boolean — Whether to check duplicates in campaigns.
  - `skip_leads_in_verification` boolean — Whether to skip leads in verification.
  - `limit` number — The limit of the number of leads to move.
  - `assigned_to` string, uuid — The ID of the user to assign the leads to.
  - `esp_code` 0 | 1 | 2 | 3 | 8 | 9 | 10 | 12 | 13 | 999 | 1000 — The ESP code to move the leads for.
  - `esg_code` '0' | '1' | '2' | '3' | '4' | 'all' | 'none' — The ESG code to move the leads for.
  - `copy_leads` boolean — Whether to copy the leads.
  - `check_duplicates` boolean — Whether to check duplicates.
  - `reset_interest_status` boolean — Whether to reset the interest status of leads when moving or copying them. When true, the interest status will be reset. When false, the existing interest status will be preserved; for non-copy campaign-to-campaign moves, opportunities will also be migrated to the target campaign.

## Response `200`

The requested Background Job

- BackgroundJob — A background job that can be used to perform long-running tasks
  - `id` string, required — Unique identifier for the background job
  - `workspace_id` string, uuid, required — Workspace ID
  - `user_id` string, uuid, nullable — The id of the user that triggered the action that created the job
  - `type` 'move-leads' | 'import-leads' | 'export-leads' | 'update-warmup-accounts' | 'rename-variable' | 'broadcast-ai-generate' | 'broadcast-website-scrape' | 'import-subscribers-from-crm' | 'resync-subscriber-crm-tags', required — Type of background job
  - `entity_id` string, uuid, nullable — The id of the entity that the job is related to
  - `entity_type` 'list' | 'campaign' | 'workspace' | 'broadcast' | 'subscriber-group-sync' | 'subscriber-group' — Type of entity
  - `data` object — Data about the job, used to store any additional information we need to process the job
    - `moved_lead_emails` string[] — For `move-leads` jobs, up to the first 10,000 email addresses of leads that actually moved or copied to the destination after all filters were applied. Use `moved_leads` for the full count.
  - `progress` number, required — Progress of the job as a percentage (from 0 to 100)
  - `status` 'pending' | 'in-progress' | 'success' | 'failed' | 'draining' | 'paused' | 'cancelled', required — Job status
  - `created_at` string, required — Timestamp when the job was created
  - `updated_at` string, required — Timestamp when the job was last updated

## Other responses

- `401` — This request is unauthorized (either the Authorization header is missing or invalid, or the API key has been revoked)
- `402` — This request cannot be fulfilled because the workspace does not have an active paid plan
- `404` — The requested resource was not found
- `429` — You have exceeded the rate limit. Please check the rate limit docs for more information.

---

[API](https://skmtc.net/instantly/apis/api-explorer.md) · [All operations](https://skmtc.net/instantly/apis/api-explorer/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/instantly/api-explorer/versions/378d1e253fe7/schema)
