Skip to main content
POST
Create custom event definition

Supported products

Authorizations

Authorization
string
header
required

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

Body

application/json
includeDefaultProperties
boolean
required

A boolean indicating whether to include default properties in the event type definition.

label
string
required

Human readable label for the event. Used in HubSpot UI

propertyDefinitions
object[]
required

List of custom properties on event

customMatchingId
object
description
string

A description of the event that will be shown as help text in HubSpot.

name
string

Internal event name, which must be used when referencing the event from this event definitions API. If a name is not supplied, one will be generated based on the label. The name value will also be used to automatically generate a fullyQualifiedName for the event definition, which you'll use when sending event completions to this event.

primaryObject
string

The object type to associate this event to. Can be one of CONTACT, COMPANY, DEAL, TICKET. If no primaryObject is supplied, we will default to associating the event to CONTACT objects.

Response

successful operation

archived
boolean
required

A boolean indicating whether the event type is archived.

associations
object[]
required

An array of association definitions that define the associations related to the event type.

fullyQualifiedName
string
required

A string representing the fully qualified name of the event type.

id
string
required

A string representing the unique identifier of the event type.

labels
object
required
name
string
required

A string representing the name of the event type.

objectTypeId
string
required

A string representing the object type ID of the event type.

properties
object[]
required

An array of property objects that define the properties of the event type.

comboEventRules
object
createdAt
string<date-time>

A string representing the date and time when the event type was created, in ISO 8601 format.

createdUserId
integer<int32>

An integer representing the ID of the user who created the event type.

customMatchingId
object
description
string

A string providing a description of the event type.

detailTemplate
string

A string used as a template for the details of the event type.

headerTemplate
string

A string used as a template for the header of the event type.

primaryObject
string

A string representing the primary object associated with the event type.

primaryObjectId
string

A string representing the ID of the primary object associated with the event type.

trackingType
enum<string>

A string specifying the tracking type of the event. Valid values include 'VISITED_URL', 'CLICKED_ELEMENT', 'CUSTOM_SCRIPT', and others.

Available options:
APP_EVENT,
AUTOCAPTURE_EVENT,
CLICKED_ELEMENT,
COMBO_EVENT,
CUSTOM_SCRIPT,
CUSTOM_SIGNAL,
IMPORT,
MANUAL,
POLLING,
PROPERTY_CHANGE,
VISITED_URL,
WEBHOOK
updatedAt
string<date-time>

A string representing the date and time when the event type was last updated, in ISO 8601 format.

updatedUserId
integer<int32>

An integer representing the ID of the user who last updated the event type.

Last modified on September 9, 2026