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

> ## Agent Instructions
> Use the public API base URL: https://api.teamfollowup.ai/api.
> Authenticate public API requests with Authorization: Bearer YOUR_API_KEY.
> Use product-owned terms: agents, campaigns, projects (GoHighLevel sub-accounts), contacts, calls, outcomes, skills, cadences, phone numbers.
> Scope requests by locationId rather than projectName.
> Read the guide linked from each API reference group before recommending an endpoint.

# Backfill existing leads

> Put contacts that were already in the CRM through a campaign, as if the trigger tag had just landed. Dry-run first, then enrol, then watch the queue.

A campaign normally waits for leads to arrive. But the sub-account already has
a thousand contacts with the trigger tag from before the campaign existed.
**Backfill** pushes them through the same entry the campaign uses for new
leads, so they get the same call, window and cadence.

## Prerequisites

* A campaign with `activeTags` set and a number on it. See
  [Who gets called](/campaigns/audience).
* The contacts already carry one of those tags in GoHighLevel. Backfill does
  not add tags; it finds contacts that have them.
* A cadence on the campaign if its `dialing` is `pd` or `s2l_pd`. See
  [Cadences, steps and the queue](/power-dialer/overview).
* An API key with `agents:write`.

## Step 1: Dry-run it

Call [Enroll existing leads](/api-reference/agents/enroll-existing-leads) with
`dryRun: true`:

```json theme={"dark"}
{ "dryRun": true, "limit": 1000 }
```

Nothing is enrolled. The response tells you what would happen:

| Field                           | Meaning                                                                                 |
| ------------------------------- | --------------------------------------------------------------------------------------- |
| `matched`                       | Contacts carrying a trigger tag and none of the exit tags.                              |
| `truncated`                     | `true` when more matched than `limit` allows.                                           |
| `preview`                       | Up to 25 of the matched contacts, so you can eyeball them.                              |
| `skipped.noPhone`               | Matched contacts with no phone number. They cannot be dialled.                          |
| `skipped.existingQueue`         | Matched contacts already in this campaign's queue. Running twice does not double-enrol. |
| `includeTags` and `excludeTags` | The tag rules that were applied.                                                        |

Look at `preview`. If it contains people who should not be called, fix the
tags in GoHighLevel first.

## Step 2: Pick the moment

Enrolment respects the [calling window](/campaigns/calling-window), but it
respects it immediately. On an `s2l` or `s2l_pd` campaign, enrolling a thousand
contacts while the window is open starts dialling a thousand contacts now.
On a `pd` campaign they enter the cadence at step one and are spaced out by it.

If you want the calls spread over days, use a `pd` campaign or enrol in
batches with `limit`.

## Step 3: Enrol

Send the same request with `dryRun: false`. The response now reports what
happened: `enrolled` is the count queued, `statuses` breaks the rest down, and
`skipped` and `preview` are as before.

`limit` caps one run. Because contacts already queued are skipped, you can run
the same request again for the remainder until `truncated` is `false`.

## Step 4: Watch the queue

* [Get pipeline steps](/api-reference/power-dialer/get-pipeline-steps) shows
  how many leads sit on each step.
* [List pipeline leads](/api-reference/power-dialer/list-pipeline-leads) lists
  them with `nextCallTime`.
* [List calls](/api-reference/calls/list-calls) with the `campaignId` shows the
  calls as they complete.

## Next steps

* [Speed to lead and power dialer](/campaigns/dispatch-modes) if the pace was
  wrong.
* [Contacts and leads](/contacts/overview) to see each person's
  `nextScheduledCall`.
