メインコンテンツへスキップ
POST
/
integrators
/
timeline
/
v3
/
events
イベントデータを送信(単一)
curl --request POST \
  --url https://api.hubapi.com/integrators/timeline/v3/events \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data @- <<EOF
{
  "eventTemplateId": "1001298",
  "email": "[email protected]",
  "tokens": {
    "petName": "Art3mis",
    "petAge": 3,
    "petColor": "black"
  },
  "extraData": {
    "questions": [
      {
        "question": "Who's a good girl?",
        "answer": "Bark!"
      },
      {
        "question": "Do you wanna go on a walk?",
        "answer": "Woof!"
      }
    ]
  },
  "timelineIFrame": {
    "linkLabel": "View Art3mis",
    "headerLabel": "Art3mis dog",
    "url": "https://my.petspot.com/pets/Art3mis",
    "width": 600,
    "height": 400
  }
}
EOF
{
  "objectType": "contacts",
  "id": "petspot:1001298:[email protected]",
  "eventTemplateId": "1001298",
  "email": "[email protected]",
  "objectId": "28001",
  "timestamp": "2020-01-30T17:42:10.276Z",
  "tokens": {
    "petName": "Art3mis",
    "petColor": "black",
    "petAge": "3"
  },
  "extraData": {
    "questions": [
      {
        "question": "Who's a good girl?",
        "answer": "Bark!"
      },
      {
        "question": "Do you wanna go on a walk?",
        "answer": "Woof!"
      }
    ]
  },
  "timelineIFrame": {
    "linkLabel": "View Art3mis",
    "headerLabel": "Art3mis dog",
    "url": "https://my.petspot.com/pets/Art3mis",
    "width": 600,
    "height": 400
  }
}
次のいずれかの製品またはそれ以上が必要です。
Marketing HubMarketing Hub -無料ツール
Sales HubSales Hub -無料ツール
Service HubService Hub -無料ツール
Content HubContent Hub -無料ツール

承認

Authorization
string
header
必須

The access token received from the authorization server in the OAuth 2.0 flow.

ボディ

application/json

The timeline event definition.

The state of the timeline event.

eventTemplateId
string
必須

イベントテンプレートID。

tokens
object
必須

テンプレートトークンに関連付けられているトークンキーと値のコレクション。

domain
string

イベントドメイン(UTKとペアになることが多い)。

email
string

コンタクト固有のイベントに使用されるEメールアドレス。既存のコンタクトの特定、新規作成、既存のコンタクトのEメールの変更に使用できます(「objectId」とペアになっている場合)。

extraData
object

テンプレートのMarkdownによって解釈可能な追加のイベント固有データ。

id
string

イベントのID。任意であり、渡さないことをお勧めします。省略すると、自動で作成されます。IDの任意の場所で「{{uuid}}」を使用して固有の文字列を生成し、確実に重複させないようにすることもできます。

objectId
string

CRMオブジェクトID。コンタクト以外の全てのイベントに必要です(コンタクトの場合は、UTKまたはEメールを使用できます)。

timelineIFrame
object
:
{
  "linkLabel": "View Art3mis",
  "headerLabel": "Art3mis dog",
  "url": "https://my.petspot.com/pets/Art3mis",
  "width": 600,
  "height": 400
}
timestamp
string<date-time>

イベントが発生した日時。渡されなかった場合、現在の時刻であると想定されます。イベントがCRMオブジェクトのタイムラインに表示される場所を決定するために使用されます。

utk
string

「utk」パラメーターを使用して、「usertoken」によってイベントをコンタクトに関連付けます。ユーザーのEメールアドレスは分からないが、Cookieにユーザーを特定するトークンが含まれている場合にお勧めします。

レスポンス

successful operation

The current state of the timeline event.

eventTemplateId
string
必須

イベントテンプレートID。

id
string
必須

イベントのID。アプリやイベントテンプレートに対して固有である必要があります。異なるCRMオブジェクトに同じIDを使用すると、最後に処理したオブジェクトが残り、最初のオブジェクトにはレコードがなくなります。IDの任意の場所で「{{uuid}}」を使用して固有の文字列を生成し、確実に重複させないようにすることもできます。

objectType
string
必須

EventTemplateに関連付けられているObjectType。

tokens
object
必須

テンプレートトークンに関連付けられているトークンキーと値のコレクション。

createdAt
string<date-time>

使用されません。

domain
string

イベントドメイン(UTKとペアになることが多い)。

email
string

コンタクト固有のイベントに使用されるEメールアドレス。既存のコンタクトの特定、新規作成、既存のコンタクトのEメールの変更に使用できます(「objectId」とペアになっている場合)。

extraData
object

テンプレートのMarkdownによって解釈可能な追加のイベント固有データ。

objectId
string

CRMオブジェクトID。コンタクト以外の全てのイベントに必要です(コンタクトの場合は、UTKまたはEメールを使用できます)。

timelineIFrame
object
:
{
  "linkLabel": "View Art3mis",
  "headerLabel": "Art3mis dog",
  "url": "https://my.petspot.com/pets/Art3mis",
  "width": 600,
  "height": 400
}
timestamp
string<date-time>

イベントが発生した日時。渡されなかった場合、現在の時刻であると想定されます。イベントがCRMオブジェクトのタイムラインに表示される場所を決定するために使用されます。

utk
string

「utk」パラメーターを使用して、「usertoken」によってイベントをコンタクトに関連付けます。ユーザーのEメールアドレスは分からないが、Cookieにユーザーを特定するトークンが含まれている場合にお勧めします。

Last modified on December 8, 2025