> ## Documentation Index
> Fetch the complete documentation index at: https://api.smartlead.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Push Fetched Contacts to a Campaign API

> Add fetched Smart Prospect contacts straight into one of your campaigns, the same push as the app's Add to campaign - POST /search-email-leads/push-to-campaign

> [!NOTE]
>
> **Credit cost:** Free. This call only pushes contacts you already fetched. It never fetches or charges.

> [!NOTE]
>
> This endpoint is on the main Smartlead API host (`server.smartlead.ai`), not the Smart Prospect host. Pass your API key as the `api_key` query parameter (see [Authentication](https://api.smartlead.ai/authentication.md)).

After a [Fetch Contacts](https://api.smartlead.ai/api-reference/smart-prospect/fetch-contacts.md) call, push the fetched contacts straight into a campaign. This is the same push the Smart Prospect app runs for **Add to campaign**: the same checks, the same lead import settings.

Send either `filterId` (every fetched contact of that search) or `leadIds` (specific fetched contacts), not both.

The leads are added in the background, so the reply does not say how many were inserted. Read the campaign's leads afterwards to confirm them.

> [!WARNING]
>
> A `200` with `success: true` does not always mean contacts were pushed. If none of your fetched contacts match the `filterId` or `leadIds` (and filters) you sent, the reply is still `200`, but `data.leadList` is `null` or empty and nothing is added. Check that `data.leadList` has entries before you treat the push as started.

To push into a lead list instead, use [Push Fetched Contacts to a Lead List](https://api.smartlead.ai/api-reference/smart-prospect/fetch-contacts-push-to-list.md).

## Request Body

**campaignId** `number` *required*

ID of one of your campaigns.

**filterId** `number`

The fetched search's ID. Pushes every contact that search fetched. Send `filterId` or `leadIds`.

**leadIds** `string[]`

IDs of fetched contacts (1 to 10,000), as returned by [Get Contacts](https://api.smartlead.ai/api-reference/smart-prospect/get-contacts.md). Send `filterId` or `leadIds`.

**verification\_status** `string`

Only push contacts with this email status: `valid`, `catch_all` or `invalid`. Default: all.

**catch\_all\_status** `string`

Only push catch-all contacts with this status, for example `catch_all_verified`. Default: all.

**csvSettings** `object`

Lead import checks, as for [Add Leads to a Campaign](https://api.smartlead.ai/api-reference/campaigns/add-leads.md).

**properties**

**ignoreGlobalBlockList** `boolean`

Default `false`.

**ignoreUnsubscribeList** `boolean`

Default `false`.

**ignoreDuplicateLeadsInOtherCampaign** `boolean`

Default `false`.

**ignoreCommunityBounceList** `boolean`

Default `true`.

```bash cURL theme={null}
curl -X POST "https://server.smartlead.ai/api/v1/search-email-leads/push-to-campaign?api_key=YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"campaignId": 12345, "filterId": 678, "verification_status": "valid"}'
```

## Response Fields

**success** `boolean`

`true` when the push started

**message** `string`

Status message

**data** `object`

The push that was started.

**properties**

**id** `number`

The campaign ID

**campaignId** `number`

The campaign ID (same as `id`)

**campaignName** `string`

The campaign's name

**leadList** `object[] | null`

The fetched contacts sent to the campaign. `null` or empty when no fetched contacts matched: then nothing is added

**csvSettings** `object`

The lead import checks used, with defaults filled in

**totalLeadCount** `number`

The campaign's lead count before this push

**clientId** `number | null`

The client (agency sub-account) the campaign belongs to, or `null`

**schedulerCronValue** `object | null`

The campaign's sending schedule

**name** `string`

Name of the import: the saved search's name, or `push_from_prospects_` followed by a timestamp

**type** `string`

Always `search_leads`

**customFields** `object`

Always `{}`

**emailFieldsAdded** `object`

Always `{"email": true}`

**isLeadAddedFirstTime** `boolean`

Always `true`

**logPrefix** `string`

A request tag for support: your user ID and the request time. Do not parse it

## Response Codes

**200** `Success`

Push started

**400** `Bad Request`

`campaignId` is missing, both or neither of `filterId` and `leadIds` were sent, or the campaign is not on your account

**401** `Unauthorized`

Missing or invalid API key, or a client (agency sub-account) API key: this endpoint is for the main account only

**500** `Internal Server Error`

The push could not be started, for example the contact lookup did not answer or rejected a filter value such as `verification_status`. Nothing is added; check your values and retry

```json 200 - Push started theme={null}
{
  "success": true,
  "message": "Leads successfully pushed to campaign. Please wait for sometime. It will gradually get inserted for bigger datasets...",
  "data": {
    "leadList": [
      { "email": "jane@example.com", "first_name": "Jane", "last_name": "Doe", "company_name": "Example Inc" }
    ],
    "schedulerCronValue": { "tz": "America/New_York", "days": [1, 2, 3, 4, 5], "startHour": "09:00", "endHour": "17:00" },
    "clientId": null,
    "totalLeadCount": 120,
    "campaignName": "Q1 outreach",
    "csvSettings": {
      "ignoreGlobalBlockList": false,
      "ignoreUnsubscribeList": false,
      "ignoreDuplicateLeadsInOtherCampaign": false,
      "ignoreCommunityBounceList": true
    },
    "customFields": {},
    "emailFieldsAdded": { "email": true },
    "isLeadAddedFirstTime": true,
    "name": "VP Sales, US SaaS",
    "type": "search_leads",
    "campaignId": 12345,
    "logPrefix": "[PROSPECT_PUSH][uid-1001][ts-1764720000000]",
    "id": 12345
  }
}
```

```json 400 - Not your campaign theme={null}
{
  "success": false,
  "message": "Invalid campaign Id!"
}
```

```json 500 - Push not started theme={null}
{
  "success": false,
  "message": "Error pushing leads to campaign"
}
```

## MCP

The Smartlead MCP tool `sp_push_contacts_to_campaign` calls this endpoint. Its reply keeps `success`, `message` and, under `data`, the campaign `id`, `campaignName`, `csvSettings` and `leads_found` (the number of contacts sent) instead of the full `leadList`.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.