Skip to main content
POST
Connect an AdCP source (alpha)
Alpha: this operation is exposed only to customers enrolled in the directed-campaigns PostHog flag. It is for active, registered AdCP sources, not official social adapters.
Projects an existing registered AdCP source, credential, discovered account, and advertiser mapping into the same connection plane used by tracked campaigns. It does not register credentials or create a new seller relationship.

Before you call

  1. Find the storefront and source with list_storefronts and get_storefront_capabilities.
  2. Register the source credential with register_source_credentials.
  3. Discover accounts with list_available_accounts; use only an account and credential ID returned by that operation.
  4. Link the account to the intended advertiser.
The source must be an active sales agent on an active storefront. The credential and account must be active for the calling customer, and the account must already be mapped to the requested advertiser. Customer enrollment does not create a seller: the exact storefront/source/customer relation is rechecked on every provider call. Reported tools are retained as readiness evidence rather than used as a connection allowlist. Plural get_media_buys is required for account-wide mirroring and get_media_buy_delivery for reporting, but a source that omits either may still connect and use its other directed operations.

Response

Use connectionId and connectionAccountId to subscribe that account to the tracked-campaign mirror. The operation is idempotent for the same registered source credential and reuses its active connection. get_media_buys is account-wide, so a seller agent credential can be associated with only one source on the storefront. If a sibling source uses the same credential, reuse the existing source; creating a second connection would duplicate campaign shells and is rejected.

Security boundary

This operation does not accept arbitrary endpoint URLs, tokens, or raw secrets. Endpoint ownership, seller identity, and adagents.json authorization must be established by the registered storefront source before it can be connected.

Errors

  • 403 FEATURE_NOT_ENABLED — the customer is not enrolled in the alpha.
  • 422 CAPABILITY_NOT_SUPPORTED — the requested downstream operation is not supported by the seller. Other directed operations remain available.
  • 409 CONFLICT — the same account-wide agent credential is already associated with another source.
  • 403 ACCESS_DENIED — the advertiser is outside the caller’s customer scope.
  • 400 VALIDATION_ERROR — the source/account relationship is not registered and mapped, the storefront/source is unavailable, or credentialId is required to disambiguate it.

Campaigns on connected seller accounts

Subscribe, mirror, and read delivery

Register source credentials

Establish the source credential first