Passer au contenu principal
POST
/
integrators
/
timeline
/
v3
/
{appId}
/
event-templates
Create an event template
curl --request POST \
  --url 'https://api.hubapi.com/integrators/timeline/v3/{appId}/event-templates?hapikey=' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "objectType": "<string>",
  "tokens": [
    {
      "label": "<string>",
      "name": "<string>",
      "options": [
        {
          "label": "<string>",
          "value": "<string>"
        }
      ],
      "type": "date",
      "createdAt": "2023-11-07T05:31:56Z",
      "objectPropertyName": "<string>",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "detailTemplate": "<string>",
  "headerTemplate": "<string>"
}
'
{
  "id": "<string>",
  "name": "<string>",
  "objectType": "<string>",
  "tokens": [
    {
      "label": "<string>",
      "name": "<string>",
      "options": [
        {
          "label": "<string>",
          "value": "<string>"
        }
      ],
      "type": "date",
      "createdAt": "2023-11-07T05:31:56Z",
      "objectPropertyName": "<string>",
      "updatedAt": "2023-11-07T05:31:56Z"
    }
  ],
  "createdAt": "2023-11-07T05:31:56Z",
  "detailTemplate": "<string>",
  "headerTemplate": "<string>",
  "updatedAt": "2023-11-07T05:31:56Z"
}

Supported products

Autorisations

hapikey
string
query
requis

Paramètres de chemin

appId
integer<int32>
requis

Corps

application/json
name
string
requis

The template name.

objectType
string
requis

The type of CRM object this template is for. [Contacts, companies, tickets, and deals] are supported.

tokens
object[]
requis

A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects.

detailTemplate
string

This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details.

headerTemplate
string

This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header.

Réponse

successful operation

id
string
requis

The template ID.

name
string
requis

The template name.

objectType
string
requis

The type of CRM object this template is for. [Contacts, companies, tickets, and deals] are supported.

tokens
object[]
requis

A collection of tokens that can be used as custom properties on the event and to create fully fledged CRM objects.

createdAt
string<date-time>

The date and time that the Event Template was created, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020.

detailTemplate
string

This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline when you expand the details.

headerTemplate
string

This uses Markdown syntax with Handlebars and event-specific data to render HTML on a timeline as a header.

updatedAt
string<date-time>

The date and time that the Event Template was last updated, as an ISO 8601 timestamp. Will be null if the template was created before Feb 18th, 2020.

Last modified on April 2, 2026