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

# Subscribe directed campaigns (alpha)

> Mirror campaigns from a mapped adapter account

<Warning>
  Alpha and PostHog-gated. This operation mirrors existing upstream campaigns;
  it does not create or modify campaigns in the connected account.
</Warning>

Subscribe an active, non-organization adapter account that is already mapped
to the requested advertiser. The first sync enumerates `get_media_buys`
without IDs and backfills terminal history for one year; active campaigns are
always mirrored. This backfill covers campaign metadata, not delivery reports.

**Named operation:** `subscribe_directed_campaigns`

| Field                          | Location | Type           | Required      | Description                                                   |
| ------------------------------ | -------- | -------------- | ------------- | ------------------------------------------------------------- |
| `connectionId`                 | path     | integer        | Yes           | Active adapter connection ID                                  |
| `accountId`                    | path     | integer        | Yes           | Connected ad-account row ID                                   |
| `advertiserId`                 | body     | numeric string | Yes           | Advertiser already mapped to the account                      |
| `sourceId`                     | body     | string         | Yes           | Adapter storefront platform ID returned by the mapping list   |
| `governance.maxMediaBuyBudget` | body     | number         | Operator only | Per-campaign directed-write cap; required before writes       |
| `governance.maxAccountBudget`  | body     | number         | Operator only | Aggregate authored directed-write cap; required before writes |
| `governance.currency`          | body     | string         | Operator only | ISO 4217 cap currency; required before writes                 |

Omitting governance keeps the subscription read-only. Supplying caps does not
grant write authority: the separate `directed-campaign-writes` customer gate and
support for the requested provider operation are also required. Governance is controlled
by Interchange; ordinary buyer callers receive an authorization error if they
try to set or change it through this operation.

The request completes after the initial enumeration attempt. The response includes the
durable subscription (`backfillStart`, `lastSyncedAt`, `lastSyncStatus`, and
`lastSyncError`) plus the initial mirrored/retired/skipped counts. Calling the
same operation again is idempotent and refreshes the mirror.

The default metadata sweep runs every 15 minutes. Use the subscription-status
operation for the latest metadata-sync health and fixed history boundary.
There is no running backfill percentage or delivery-import status. Campaign
summaries expose mode, provider, mirror state, and `directed.lastSyncedAt` for
row-level freshness.

When broad enumeration omits a campaign that is already mirrored, Interchange
reads nonterminal upstream IDs through a bounded, resumable direct-read cycle
before treating absence as authoritative. A complete terminal response preserves
the campaign and its package history even when the provider returns an empty
package list. Already-terminal local mirrors remain available without repeated
provider reads. A failed or incomplete direct response marks the sync unhealthy
and retains the last valid mirror.

## Response

```json theme={null}
{
  "subscription": {
    "id": "17",
    "customerId": 100,
    "advertiserId": "12345",
    "connectionId": "42",
    "accountId": "81",
    "sourceId": "tiktok",
    "providerType": "tiktok",
    "status": "ACTIVE",
    "backfillStart": "2025-07-12T10:00:00.000Z",
    "maxMediaBuyBudget": 100000,
    "maxAccountBudget": 500000,
    "governanceCurrency": "USD",
    "lastSyncedAt": "2026-07-12T10:00:08.000Z",
    "lastSyncStatus": "SUCCESS",
    "lastSyncError": null,
    "createdAt": "2026-07-12T10:00:00.000Z",
    "updatedAt": "2026-07-12T10:00:08.000Z",
    "archivedAt": null
  },
  "sync": {
    "subscriptionId": "17",
    "mirrored": 12,
    "retired": 0,
    "skipped": 0,
    "errors": []
  }
}
```

A successful enrollment response can contain sync errors. When `errors` is non-empty,
the subscription remains durable with status `ERROR` and the worker retries; other
provider-supported directed operations remain available. A successful response with
`mirrored: 0` and no errors means no campaigns were eligible in the one-year metadata
window. Neither outcome is a delivery backfill.

## Errors and recovery

| Error                                       | Recovery                                                                                                                                                                                      |
| ------------------------------------------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `FEATURE_NOT_ENABLED`                       | Ask the Interchange account team to enroll the customer in the alpha. Do not call an adapter endpoint directly.                                                                               |
| Account or connection not found             | Re-list the official adapter connection and its discovered accounts; use only returned IDs.                                                                                                   |
| Account is not mapped                       | Map the discovered account to the intended advertiser, verify it with the mappings list, then retry.                                                                                          |
| Account is subscribed to another advertiser | Unsubscribe first, confirm which advertiser should own the mirror, remap, then subscribe again.                                                                                               |
| Meta targeting cannot be represented safely | Inspect the native ad set for exclusions, locales, interests, behaviors, custom audiences, or placement constraints. The last complete mirror is retained; no partial targeting is published. |
| Upstream sync error                         | Inspect subscription health. Reconnect for authentication errors; otherwise retry after the provider recovers. Existing valid mirrors are retained.                                           |

See [Directed campaigns (alpha)](/v2/buyer/campaigns/directed-campaigns).
