{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-@l10n/ja/sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"type":"markdown"},"seo":{"title":"Postback API v2 クイックスタート","description":"Treasure AI Postback API v2 を使用して、records.in.treasuredata.com エンドポイントにヘッダーベース認証でイベントデータを送信する方法を説明します。","siteUrl":"https://docs.treasure.ai","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"postback-api-v2-クイックスタート","__idx":0},"children":["Postback API v2 クイックスタート"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Postback API v2 は、次世代の Postback インジェストエンドポイントです。レガシー Postback API と同じ ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/postback/v3/event/{database}/{table}"]}," のパス契約を持ちますが、新しい ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["records.in.treasuredata.com"]}," ホストから提供され、ヘッダーベース認証のみをサポートします。"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["Postback API v2 は、レガシー Postback API と同じユースケースに使用できます。カスタム Webhook、JS SDK や TD Logger を実行できない環境、または外部アプリケーションによってトリガーされるシングルレコードのインポートなどが該当します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"レガシー-postback-api-との違い","__idx":1},"children":["レガシー Postback API との違い"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["レガシー Postback"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["Postback v2"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ホスト"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["in.treasuredata.com"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<region>.records.in.treasuredata.com"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["X-TD-Write-Key"]}," ヘッダー"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["サポート"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["サポート"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization: TD1 <key>"]}," ヘッダー"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["サポート"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["?td_write_key=<key>"]}," URL パラメーター"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["サポート"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["非サポート"]}]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["最大リクエストボディサイズ"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["—"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["1,048,064 バイト"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["パス"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/postback/v3/event/{db}/{table}"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["/postback/v3/event/{db}/{table}"]}]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["レガシーの URL パス API キー（",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["?td_write_key=..."]},"）は v2 では受け付けられません。切り替え前に、このキーを使用しているクライアントを以下の2つのヘッダー形式のいずれかに移行してください。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"セットアップ","__idx":2},"children":["セットアップ"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/my-settings/getting-your-api-keys"},"children":["Write API キーの確認"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/endpoints/endpoints"},"children":["リージョンの Postback API エンドポイントの確認"]}," — v2 ホストは ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["<region>.records.in.treasuredata.com"]}," です。"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":["書き込みアクセス権を持つ TD データベースとテーブル。ここに API キーを使用してデータを書き込みます。"]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"手順","__idx":3},"children":["手順"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"リクエストの送信","__idx":4},"children":["リクエストの送信"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["TD Write API キーをヘッダーとして追加し、データベースとテーブルを URL に指定し、リクエストボディにデータを含めます。JSON ペイロードとしてデータを送信してください。"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["パラメーター"]}]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":""},"children":[{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["説明"]}]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["database"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["URL に宛先データベース名を指定します。英字・数字・_ のみ使用できます。"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":[{"$$mdtype":"Tag","name":"code","attributes":{},"children":["table"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["URL に宛先テーブル名を指定します。英字・数字・_ のみ使用できます。"]}]}]}]}]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"認証","__idx":5},"children":["認証"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["v2 は2つのヘッダーベース認証方法をサポートしています。どちらか一方を選択してください。両方送信した場合は ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["Authorization"]}," が優先されます。"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"# 1. Authorization ヘッダー（TD1 スキーム）\n-H 'Authorization: TD1 123/abcdef•••••••••••••••••••••••0123456789'\n\n# 2. X-TD-Write-Key ヘッダー\n-H 'X-TD-Write-Key: 123/abcdef•••••••••••••••••••••••0123456789'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":4,"id":"サンプルリクエスト","__idx":6},"children":["サンプルリクエスト"]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"curl -i -X POST 'https://us01.records.in.treasuredata.com/postback/v3/event/db_test/table_1' \\\n-H 'Content-Type: application/json' \\\n-H 'Authorization: TD1 123/abcdef•••••••••••••••••••••••0123456789' \\\n-d '{\"email\":\"firstname.lastname@business.com\",\"telephone\":\"555-555-5540\"}'\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"bash","header":{"controls":{"copy":{}}},"source":"HTTP/1.1 200 OK\nContent-Type: application/json\nDate: Thu, 15 May 2026 00:23:32 GMT\nStrict-Transport-Security: max-age=31536000\nContent-Length: 2\nConnection: keep-alive\n\n{}\n","lang":"bash"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"ペイロードの制限","__idx":7},"children":["ペイロードの制限"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["リクエストボディの上限は ",{"$$mdtype":"Tag","name":"strong","attributes":{},"children":["1,048,064 バイト"]}," です。上限を超えるリクエストは ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["413 Payload Too Large"]}," で拒否されます。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"api-キーの検証","__idx":8},"children":["API キーの検証"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["レガシーエンドポイントと同様に、無効な API キーを使用したリクエストは同期的に ",{"$$mdtype":"Tag","name":"code","attributes":{},"children":["200 OK"]}," を返します。キーの検証はレスポンス送信後に非同期で実行されます。無効なキーは、HTTP レイヤーではなくインジェストパイプライン内で認証エラーとして表面化します。"]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":2,"id":"関連情報","__idx":9},"children":["関連情報"]},{"$$mdtype":"Tag","name":"ul","attributes":{},"children":[{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/apis/postback/quickstart"},"children":["レガシー Postback API クイックスタート"]}]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://toolbelt.treasuredata.com/"},"children":["Treasure Toolbelt"]}," — Treasure AI サービス向けコマンドラインインターフェース"]},{"$$mdtype":"Tag","name":"li","attributes":{},"children":[{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"/products/customer-data-platform/integration-hub/streaming/td-javascript-sdk/quickstart"},"children":["JavaScript SDK クイックスタート"]}]}]}]},"headings":[{"value":"Postback API v2 クイックスタート","id":"postback-api-v2-クイックスタート","depth":1},{"value":"レガシー Postback API との違い","id":"レガシー-postback-api-との違い","depth":2},{"value":"セットアップ","id":"セットアップ","depth":2},{"value":"手順","id":"手順","depth":2},{"value":"リクエストの送信","id":"リクエストの送信","depth":3},{"value":"認証","id":"認証","depth":3},{"value":"サンプルリクエスト","id":"サンプルリクエスト","depth":4},{"value":"ペイロードの制限","id":"ペイロードの制限","depth":3},{"value":"API キーの検証","id":"api-キーの検証","depth":3},{"value":"関連情報","id":"関連情報","depth":2}],"frontmatter":{"seo":{"title":"Postback API v2 クイックスタート","description":"Treasure AI Postback API v2 を使用して、records.in.treasuredata.com エンドポイントにヘッダーベース認証でイベントデータを送信する方法を説明します。"}},"lastModified":"2026-06-28T02:58:35.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/ja/apis/postback-v2/quickstart","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}