メインコンテンツへスキップ
POST
/
integrators
/
timeline
/
v3
/
{appId}
/
event-templates
/
{eventTemplateId}
/
tokens
既存のテンプレートにトークンを追加
curl --request POST \
  --url 'https://api.hubapi.com/integrators/timeline/v3/{appId}/event-templates/{eventTemplateId}/tokens?hapikey=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "petType",
  "label": "Pet Type",
  "type": "enumeration",
  "createdAt": "2020-02-12T20:58:26Z",
  "updatedAt": "2020-02-12T20:58:26Z",
  "objectPropertyName": "customPropertyPetType",
  "options": [
    {
      "value": "dog",
      "label": "Dog"
    },
    {
      "value": "cat",
      "label": "Cat"
    }
  ]
}
'
{
  "name": "petType",
  "type": "enumeration",
  "createdAt": "2020-02-12T20:58:26Z",
  "updatedAt": "2020-02-12T20:58:26Z",
  "label": "Pet Type",
  "options": [
    {
      "value": "dog",
      "label": "Dog"
    },
    {
      "value": "cat",
      "label": "Cat"
    }
  ]
}
サポートされる製品
次のいずれかの製品またはそれ以上が必要です。
Marketing HubMarketing Hub無料ツール
Sales HubSales Hub無料ツール
Service HubService Hub無料ツール
Content HubContent HubStarter

承認

hapikey
string
query
必須

パスパラメータ

appId
integer<int32>
必須

ターゲットアプリのID。

eventTemplateId
string
必須

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

ボディ

application/json

The new token definition.

State of the token definition.

label
string
必須

リストのセグメンテーションやレポートに使用されます。

name
string
必須

テンプレートで参照されるトークンの名前。特定のテンプレートで固有である必要があります。使用できるのは英数字、ピリオド、ダッシュ、またはアンダースコア(. - _)のみです。

type
enum<string>
必須

トークンのデータ型。現在のところ、[文字列、数値、日付、列挙]の中から選択できます。

利用可能なオプション:
date,
enumeration,
number,
string
createdAt
string<date-time>

イベント テンプレート トークンが作成された日時(ISO 8601タイムスタンプ)。テンプレートが2020年2月18日より前に作成された場合はnullになります。

objectPropertyName
string

CRMオブジェクトプロパティーの名前。イベントに関連付けられているCRMオブジェクトプロパティーが入力されます。十分に用意すれば、タイムラインAPIを使用してCRMオブジェクトを完全に構築できます。

options
object[]

データ型が「列挙」の場合、選択元となるオプションのリストが必要です。

updatedAt
string<date-time>

イベント テンプレート トークンが最後に更新された日時(ISO 8601タイムスタンプ)。テンプレートが2020年2月18日より前に作成された場合はnullになります。

レスポンス

successful operation

State of the token definition.

label
string
必須

リストのセグメンテーションやレポートに使用されます。

name
string
必須

テンプレートで参照されるトークンの名前。特定のテンプレートで固有である必要があります。使用できるのは英数字、ピリオド、ダッシュ、またはアンダースコア(. - _)のみです。

type
enum<string>
必須

トークンのデータ型。現在のところ、[文字列、数値、日付、列挙]の中から選択できます。

利用可能なオプション:
date,
enumeration,
number,
string
createdAt
string<date-time>

イベント テンプレート トークンが作成された日時(ISO 8601タイムスタンプ)。テンプレートが2020年2月18日より前に作成された場合はnullになります。

objectPropertyName
string

CRMオブジェクトプロパティーの名前。イベントに関連付けられているCRMオブジェクトプロパティーが入力されます。十分に用意すれば、タイムラインAPIを使用してCRMオブジェクトを完全に構築できます。

options
object[]

データ型が「列挙」の場合、選択元となるオプションのリストが必要です。

updatedAt
string<date-time>

イベント テンプレート トークンが最後に更新された日時(ISO 8601タイムスタンプ)。テンプレートが2020年2月18日より前に作成された場合はnullになります。

Last modified on October 8, 2025