- Manual Mode:
packages配列で明示的にラインアイテムを指定 - Proposal Mode:
proposal_idとtotal_budgetを指定し、get_productsのプロポーザルを実行
completed、120 秒未満の working、数時間〜数日の submitted)
Request Schema: /schemas/v2/media-buy/create-media-buy-request.json
Response Schema: /schemas/v2/media-buy/create-media-buy-response.json
クイックスタート
2 つのパッケージでシンプルなメディアバイを作成:リクエストパラメーター
| Parameter | Type | Required | Description |
|---|---|---|---|
buyer_ref | string | Yes | このメディアバイの参照 ID |
proposal_id | string | No* | get_products のプロポーザル ID。packages の代替 |
total_budget | TotalBudget | No* | プロポーザル実行時の総予算。配分割合はパブリッシャーが適用 |
packages | Package[] | No* | パッケージ構成の配列(下記)。proposal_id を使わない場合は必須 |
brand_manifest | BrandManifestRef | Yes | ブランド情報。営業エージェントでは名前/URL の最小構成で可。Brand Manifest 参照 |
start_time | string | Yes | "asap" または ISO 8601 日時 |
end_time | string | Yes | ISO 8601 日時(指定がなければ UTC) |
po_number | string | No | 発注番号 |
reporting_webhook | ReportingWebhook | No | レポーティングの自動配信設定 |
packages OR (proposal_id + total_budget) must be provided.
TotalBudget オブジェクト
| Parameter | Type | Required | Description |
|---|---|---|---|
amount | number | Yes | 総予算額 |
currency | string | Yes | ISO 4217 通貨コード |
Package オブジェクト
| Parameter | Type | Required | Description |
|---|---|---|---|
buyer_ref | string | Yes | このパッケージの参照 ID |
product_id | string | Yes | get_products で取得した product_id |
pricing_option_id | string | Yes | プロダクトの pricing_options 配列にある価格オプション ID |
format_ids | FormatID[] | Yes | 使用するフォーマット ID(プロダクトでサポートされている必要あり) |
budget | number | Yes | 価格オプションの通貨での予算 |
impressions | number | No | このパッケージのインプレッション目標 |
paused | boolean | No | 一時停止状態で作成する場合(デフォルト: false) |
pacing | string | No | "even"(デフォルト)、"asap"、"front_loaded" |
bid_price | number | No | オークション価格の場合の入札額(fixed_price がない価格オプションでは必須) |
targeting_overlay | TargetingOverlay | No | 追加ターゲティング条件(Targeting 参照) |
creative_assignments | CreativeAssignment[] | No | 既存ライブラリのクリエイティブを重み/プレースメント指定付きで割り当て |
creatives | CreativeAsset[] | No | 新規アセットをアップロードして割り当て(creative_id は未使用であること) |
レスポンス
成功レスポンス
| Field | Description |
|---|---|
media_buy_id | パブリッシャーの一意 ID |
buyer_ref | バイヤー側の参照 ID |
creative_deadline | クリエイティブ提出期限 (ISO 8601) |
packages | 作成されたパッケージの配列(完全な状態付き) |
エラーレスポンス
| Field | Description |
|---|---|
errors | 失敗理由を示すエラーオブジェクト配列 |
errors を確認してください。
主なシナリオ
ターゲティング付きキャンペーン
地理制限やフリークエンシーキャップを追加:クリエイティブをインライン指定したキャンペーン
Upload creatives at the same time as creating the campaign:レポート用 Webhook を設定したキャンペーン
自動レポート通知を受け取ります。プロポーザルの実行
get_products のプロポーザルを、パッケージを手作業で組まずに実行します。
- パブリッシャーが
total_budgetを使って配分割合を実額に変換 - 配分に基づきパッケージが自動生成
- それ以外のフィールド(brand_manifest、start_time、end_time など)は Manual モードと同じ
エラーハンドリング
よくあるエラーと解決策:| Error Code | Description | Resolution |
|---|---|---|
PRODUCT_NOT_FOUND | Invalid product_id | Verify product exists via get_products |
FORMAT_INCOMPATIBLE | Format not supported by product | Check product’s format_ids field |
BUDGET_INSUFFICIENT | Budget below product minimum | Increase budget or choose different product |
TARGETING_TOO_NARROW | Targeting yields zero inventory | Broaden geographic or audience criteria |
POLICY_VIOLATION | Brand/product violates policy | Review publisher’s content policies |
INVALID_PRICING_OPTION | pricing_option_id not found | Use ID from product’s pricing_options |
CREATIVE_ID_EXISTS | Creative ID already exists in library | Use a different creative_id, assign existing creatives via creative_assignments, or update via sync_creatives |
Key Concepts
Format Specification
Format IDs are required for each package because:- Publishers create placeholder creatives in ad servers
- Both parties know exactly what creative assets are needed
- Validation ensures products support requested formats
- Progress tracking shows which assets are missing
Brand Manifest
Thebrand_manifest field identifies the advertiser for policy compliance and business purposes.
Minimal manifests are acceptable for sales agents:
Pricing & Currency
Each package specifies itspricing_option_id, which determines:
- Currency (USD, EUR, etc.)
- Pricing model (CPM, CPCV, CPP, etc.)
- Rate and whether it’s fixed or auction-based
Targeting Overlays
Use sparingly - most targeting should be in your brief and handled through product selection. オーバーレイは以下に限定して使用します。- 地理的制限(RCT テスト、規制対応)
- フリークエンシーキャップ
- AXE セグメントの包含/除外
フォーマットワークフロー
フォーマット指定が重要な理由
メディアバイ作成時にフォーマットを指定すると次が可能になります。- プレースホルダー作成 - パブリッシャーが正しい仕様でアドサーバーにプレースホルダーを用意
- 検証 - 要求フォーマットをプロダクトがサポートするかシステムが検証
- 期待値の明確化 - 双方が必要なものを正確に把握
- 進捗トラッキング - 不足アセットと必須アセットを可視化
- 技術セットアップ - クリエイティブ到着前にアドサーバーを設定
完全なワークフロー
フォーマット検証
パブリッシャーが必ず検証する事項:- すべてのフォーマットがプロダクトでサポートされている
- フォーマット仕様が
list_creative_formatsの出力と一致 - 期限内にクリエイティブ要件を満たせる
非同期オペレーション
このタスクは即時完了する場合も、複雑さや承認要件によっては日数を要する場合もあります。レスポンスのstatus フィールドで結果と次のアクションを確認してください。
| Status | Meaning | Your Action |
|---|---|---|
completed | 即時完了 | 結果を処理 |
working | 処理中(約2分) | 高頻度でポーリング or Webhook を待つ |
submitted | 長時間(数時間〜日) | Webhook を使うか低頻度でポーリング |
input-required | 追加情報が必要 | メッセージを読み、情報を返す |
failed | エラー発生 | エラーに対応 |
- MCP
- A2A
Usage Notes
- Total budget is distributed across packages based on individual
budgetvalues - Both media buys and packages have
buyer_reffields for tracking - Creative assets must be uploaded before deadline for campaign activation
- AXE segments enable advanced audience targeting
- Pending states (
working,submitted) are normal, not errors - Orchestrators MUST handle pending states as part of normal workflow
- Inline creatives: The
creativesarray creates NEW creatives only. To update existing creatives, usesync_creatives. To assign existing library creatives, usecreative_assignmentsinstead.
Policy Compliance
Brand and products are validated during creation. Policy violations return errors:- Brand/products align with selected packages
- Creatives match declared brand/products
- Campaign complies with all advertising policies
Next Steps
After creating a media buy:- Upload Creatives: Use
sync_creativesbefore deadline - Monitor Status: Use
get_media_buy_delivery - Optimize: Use
provide_performance_feedback - Update: Use
update_media_buyto modify campaign
Learn More
- Media Buy Lifecycle - Complete campaign workflow
- get_products - Discover inventory
- Targeting - Targeting strategies
- Pricing Models - Currency and pricing