Skip to main content
This feature is intended only for technology partners, and requires approval from HubSpot to use. To apply for app events access, or if you want to learn more about the functionality, please submit this in-app form.
Below, find reference information for using app events, including event type schemas, event timeline rendering templates, event occurrence fields, and more.

Project structure

To define an app event type, create an app-events directory within src/app/. Then, add a configuration file to that directory for each event type you want to define, using the naming convention *-hsmeta.json.

project
src
app
app-hsmeta.json
app-events
my-event-type-hsmeta.json
To include event type definitions in a project requires the following:
  • Your app must use OAuth authentication and be configured for HubSpot Marketplace distribution. In addition, the app must include timeline in its requiredScopes. Learn more about app configuration.
  • Your project must successfully deploy before you can include an app event component.

Event type configuration

Below are the configuration options available for event type schemas (*-hsmeta.json). Note that objectType cannot be changed after the event type is created.
Each app is limited to 750 event types.

Event properties

The properties array of the schema contains the fields that you can send event occurrence data to. When HubSpot receives event occurrence data, it validates any properties included with it against the ones defined in the schema. Incoming occurrence properties must match these event type properties, otherwise HubSpot will reject the occurrence.

Property stamping

In some cases, you may want to modify the CRM record’s property values based on app event occurrence data. For example, you may want to update a contact’s first and last name with new values set by the occurrence (e.g., form submission).
Property stamping is not available for event types configured for custom objects.
To update CRM record properties via event occurrences, you can link an event property to a CRM property within the event type schema. In the definition fields for a given event property, include the objectProperty field and specify the CRM property to link. Once a property is linked, HubSpot will always update the property value on the CRM record using the value from the most recent occurrence based on the timestamp field. For example, the event type schema below links the event property customerName with a custom contact property named custom_property_name. When event occurrence data includes a value for customerName, custom_property_name will be updated for the associated CRM record.

Rendering templates

Event type schemas can include the headerTemplate and detailTemplate fields to configure how event occurrences renders on CRM record timelines.
  • headerTemplate: a one-line description of the event at the top of the activity card (up to 1,000 characters).
  • detailTemplate: the details of the event in the body of the activity card (up to 10,000 characters).
Rendering templates are written using Markdown (excluding inline HTML and HTML blocks) with Handlebars templates. These templates can render event occurrence data as follows:
  • In both templates, you can access any property data passed by the event occurrence using the syntax {{propertyName}}.
  • In the detailTemplate, you can additionally access extraData values passed by the event occurrence using the syntax {{extraData.fieldName}}. You can access any tier of attribute in extraData through dot notation, such as {{extraData.person1.preferredName}}.
The extraData object can only contain valid JSON. If the JSON is malformed, the occurrence will be rejected and you’ll receive an error response.
For example, the templates below use the customerName and loginLocation property data, along with the surveyData field from extraData sent via the event occurrence.
The rendering template displaying on a contact timeline
Since templates are built with Markdown and Handlebars, you can take advantage of Handlebars helpers to make the content more dynamic. For example, the following detailTemplate includes the #if helper to conditionally render content based on whether the event occurrence data includes the surveyData field in extraData.
  • If extraData contains surveyData, show the post-login survey responses.
  • If no surveyData was present in the event occurrence, render No additional information..
A custom event template loading on the contact record.

Using iframes

When event occurrence data contains the timelineIFrame field, the timeline activity card will include a hyperlink that users can click to open the linked contents in an iframe.
A timeline activity card with a hyperlink to open an iframe

Event occurrences

To send event occurrences for a given event type, make a POST request to the endpoints below. The app events API includes endpoints for sending single event occurrences and batches of multiple event occurrences. For both endpoints, the event occurrence data will need to be validated against an existing event type schema, which you’ll specify with eventTypeName in the request body.
To send a single event occurrence, make a POST request to /integrators/timeline/v4/events.In the request body, include the event occurrence data, adhering to the event type’s defined schema.
In the request body, include data based on the defined event type schema. The request body must include the eventTypeName, which can either be your app’s uid defined in the top-level *-hsmeta.json file, or fullyQualifiedName returned from the /integrators/timeline/v4/types/projects API.
If any occurrences fail to validate, successfully validated occurrences will still be accepted and persisted. The error messaging in the response will provide information about what you’ll need to fix.
A validation error message received in response to bad occurrence data being sent

CRM record association

Each event occurrence must be associated with a CRM record, with the CRM object type defined by the event type schema. The app events API includes multiple fields for associating event occurrence data with CRM records. For all supported CRM objects, it’s recommended to use the objectId field. However, there are some situations where you may want to use the other fields.
  • utk/email: if you don’t know the contact’s ID, use the utk and/or email field for identification. Providing both of these identifiers also enables you to create and update contacts. For example:
    • If utk matches an existing contact but the email doesn’t match, HubSpot will update the contact with the new email address.
    • If no objectId is provided, the event occurrence will associate with an existing contact that matches the utk/email, or HubSpot will create a new contact if no match is found.
    • Note that the utk alone cannot create new contacts. You should always include email with utk to ensure proper association.
  • domain: for company association, you must provide the objectId, but you can also include domain to update the domain property of that company.
Last modified on June 30, 2026