Skip to main content
POST /api/v2/buyer/storefronts/{storefrontId}/sources/{sourceId}/credentials Registers credentials for an external AdCP inventory source within a storefront. Once registered, the storefront’s rolled-up connection state can report connected: true when all required source credentials are present, and discovery and media buys can flow through it. For OAuth sources, the response carries an oauth.authorizationUrl the buyer must visit to finish consent.
Check the parent storefront first. If it reports requiresCredentials: true, use the capabilities endpoint to find active external AdCP source IDs with requiresCredentials: true, then compare with the credentials list to avoid registering duplicates. Sources with requiresCredentials: false do not need this step. If requiresCredentials is null, the endpoint cannot determine the source’s credential requirement; do not infer that registration is required from the capability row alone.

Request

Auth tokens grant AdCP access on your behalf. Store them in a managed secret vault, never log or commit them, and use placeholders like <SOURCE_API_KEY> in documentation and sample requests.

Parameters

Response

201 Created. For API key / JWT sources, the credential is active immediately:
For OAuth sources, the response includes an oauth block — visit authorizationUrl to complete consent, then refresh the storefront to confirm connected: true:

Errors

  • 400 VALIDATION_ERROR — missing accountIdentifier, or auth missing required fields for the source’s auth type.
  • 401 UNAUTHORIZED — missing or invalid bearer token.
  • 404 NOT_FOUND — the storefront or source does not exist or is not visible to the caller.
See Errors for the full error contract.

Storefront tasks

All storefront operations

Get storefront

Confirm connected: true after registering

List credentials

All your registered credentials

Storefront object guide

OAuth flow and the seller side