Overview
Sandbox mode lets buyers test the full media buying lifecycle — discovery, campaign creation, creatives, and delivery — without real platform calls or spending real money. Responses contain simulated but realistic data. Sandbox is account-level, not per-request. Once a request references a sandbox account, the entire request is treated as sandbox. This eliminates the risk of accidentally mixing real and test traffic in a multi-step flow.Capabilities discovery
Sellers declare sandbox support inget_adcp_capabilities:
account.sandbox is not declared or is false, the seller does not support sandbox.
Two paths to sandbox
How you enter sandbox mode depends on the seller’s account model (require_operator_auth). The two paths are completely different — make sure you follow the right one.
Implicit accounts (require_operator_auth: false)
The seller trusts the agent and does not require per-operator authentication. Sandbox is part of the natural key — the same brand/operator pair can have both a production and a sandbox account, distinguished by sandbox: true.
Setup: Declare a sandbox account via sync_accounts with sandbox: true on the account entry:
sandbox: true on every request:
Explicit accounts (require_operator_auth: true)
The seller requires each operator to authenticate directly. Sandbox accounts are pre-existing test accounts on the seller’s platform — think Stripe test mode, Google Ads sandbox accounts, or Snap test advertiser accounts. You do not create them; you discover them.
Setup: Discover sandbox accounts via list_accounts with the sandbox: true filter:
account_id on every request:
Quick reference
Implicit (require_operator_auth: false) | Explicit (require_operator_auth: true) | |
|---|---|---|
| Sandbox accounts | Declared by buyer via sync_accounts | Pre-existing on seller’s platform |
| Discovery | N/A — buyer creates them | list_accounts with sandbox: true |
| Account reference | Natural key with sandbox: true | account_id |
| Real-world analogy | Self-service test mode | Stripe test mode, Google Ads sandbox |
Response confirmation
Success responses includesandbox: true to confirm the request was processed in sandbox mode:
Full lifecycle example (implicit account)
This example shows the implicit account path. For explicit accounts, replace the natural key account reference with{ "account_id": "acct_sandbox_acme_001" } in each step.
1. Discover products
2. Create a media buy
3. Upload creatives
4. Check delivery
Sandbox vs dry run
Some tasks (e.g.,sync_creatives) also support a dry_run parameter. These serve different purposes:
| Sandbox account | dry_run | |
|---|---|---|
| Meaning | Nothing is real | Preview changes without applying |
| Scope | All tasks | sync_creatives only |
| Side effects | None (simulated) | None (preview only) |
| Use case | Test the full lifecycle | Check what a sync would change |
Seller implementation
When a request references a sandbox account (either viasandbox: true in the natural key or via a sandbox account_id):
- Do not make real ad platform API calls (no real orders, line items, etc.)
- Do not charge real money or create real billing records
- Do validate inputs the same way as production (reject invalid budgets, bad dates, etc.)
- Do return realistic response shapes with simulated data
- Should include
sandbox: truein success responses
list_accounts can return when filtered with sandbox: true.
For implicit account sellers: accept sandbox: true as part of the natural key in sync_accounts and account references. Treat (brand, operator, sandbox: true) as a distinct account from (brand, operator).
Protocol compliance
Sellers that declareaccount.sandbox: true in capabilities MUST:
- Accept sandbox accounts appropriate to their account model
- Apply sandbox semantics to all requests referencing a sandbox account
- Apply normal input validation (sandbox does not bypass validation)
sandbox: true in success responses when processing a sandbox account request.