Skip to content

HubSpot: Retrieve event definition

HubSpot eventDefinitions.getEventDefinition: arguments, response, policy and SDK examples.

← Event definitions operations · Get started

Operation hubspot.event_definitions_get_event_definition

Provider route: GET /events/2026-09/event-definitions/{eventName}. Alter supplies the connection’s credentials and routing.

Install @alter-ai/sdk @alter-ai/hubspot with npm, or alter-sdk-hubspot with pip. Supply your connected customer’s grant ID and the arguments described below.

import { App } from "@alter-ai/sdk";
import { HubSpotIntegration } from "@alter-ai/hubspot";
async function execute(input: Parameters<HubSpotIntegration["eventDefinitions"]["getEventDefinition"]>[0]) {
const app = new App({ apiKey: process.env.ALTER_API_KEY! });
try {
const provider = new HubSpotIntegration(app, { grantId: process.env.PROVIDER_GRANT_ID! });
const call = await provider.eventDefinitions.getEventDefinition(input);
const result = await call.wait();
return result.bodyJson();
} finally {
await app.close();
}
}
import os
from alter_sdk import App
from alter_sdk_hubspot import HubSpotIntegration
async def execute(arguments):
async with App(api_key=os.environ["ALTER_API_KEY"]) as app:
provider = HubSpotIntegration(app, {"grant_id": os.environ["PROVIDER_GRANT_ID"]})
call = await provider.event_definitions.get_event_definition(arguments)
result = await call.wait()
return result.body_json()
FieldTypePresenceDescription and constraints
$objectRootAdditional keys: not allowed
pathobjectRequired within parentAdditional keys: not allowed
path.eventNamestringRequired within parent

Response media type: application/json. The table describes the pinned successful response. Referenced models link to their complete fields.

FieldTypePresenceDescription and constraints
$ModelRootExpand Update event definition — response body

Referenced models: Update event definition — response body

45 more schemas are linked from the tables above, on the schema pages.

Update event definition — response body
FieldTypePresenceDescription and constraints
$objectRoot
archivedbooleanRequired within parentA boolean indicating whether the event type is archived.
associationsarrayRequired within parentAn array of association definitions related to the event type.
associations[]ModelEach itemExpand Update event definition — response body — associations item
comboEventRulesModelOptionalExpand Update event definition — response body — combo Event Rules
createdAtstringOptionalA string representing the date and time when the event type was created, in ISO 8601 format.
Format: date-time
createdUserIdJSONOptional
createdUserId (anyOf 1)integerAlternativeAn integer representing the ID of the user who created the event type.
Format: int32
createdUserId (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
customMatchingIdModelOptionalExpand Update event definition — response body — custom Matching Id
descriptionstringOptionalA string providing a description of the event type.
detailTemplatestringOptionalThe rendering template for the body of the CRM timeline activity card.
fullyQualifiedNamestringRequired within parentA string representing the fully qualified name of the event type.
headerTemplatestringOptionalThe rendering template for the header of the CRM timeline activity card.
idstringRequired within parentA string representing the unique identifier of the event type.
labelsModelRequired within parentExpand Update event definition — response body — labels
namestringRequired within parentA string representing the name of the event type.
objectTypeIdstringRequired within parentA string representing the object type ID associated with the event type.
primaryObjectstringOptionalA string representing the primary object associated with the event type.
primaryObjectIdstringOptionalA string representing the ID of the primary object associated with the event type.
propertiesarrayRequired within parentAn array of property objects associated with the event type.
properties[]ModelEach itemExpand Create Property — response body
trackingTypestringOptionalA string indicating the tracking type of the event. Valid values include 'VISITED_URL', 'CLICKED_ELEMENT', 'CUSTOM_SCRIPT', 'MANUAL', 'IMPORT', 'PROPERTY_CHANGE', 'COMBO_EVENT'.
Known values: APP_EVENT, AUTOCAPTURE_EVENT, CLICKED_ELEMENT, COMBO_EVENT, CUSTOM_SCRIPT, CUSTOM_SIGNAL, IMPORT, MANUAL, POLLING, PROPERTY_CHANGE, VISITED_URL, WEBHOOK
updatedAtstringOptionalA string representing the date and time when the event type was last updated, in ISO 8601 format.
Format: date-time
updatedUserIdJSONOptional
updatedUserId (anyOf 1)integerAlternativeAn integer representing the ID of the user who last updated the event type.
Format: int32
updatedUserId (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$

Referenced models: Update event definition — response body — labels, Update event definition — response body — custom Matching Id, Update event definition — response body — combo Event Rules, Update event definition — response body — associations item, Create Property — response body

Update event definition — response body — labels
FieldTypePresenceDescription and constraints
$objectRoot
pluralstringOptionalThe plural form of the label for the event type. This is a string.
singularstringRequired within parentThe singular form of the label for the event type. This is a string and is required.
Update event definition — response body — custom Matching Id
FieldTypePresenceDescription and constraints
$objectRoot
primaryObjectRuleModelRequired within parentExpand Update event definition — response body — custom Matching Id primary Object Rule

Referenced models: Update event definition — response body — custom Matching Id primary Object Rule

Update event definition — response body — combo Event Rules
FieldTypePresenceDescription and constraints
$objectRoot
composingRulesarrayRequired within parentAn array of ComboEventRule objects that define the individual rules composing this branch.
composingRules[]ModelEach itemExpand Update event definition — response body — combo Event Rules composing Rules item
operationTypestringRequired within parentThe type of logical operation applied to the rule branches and composing rules. Valid values are 'AND' and 'OR'.
Known values: AND, OR
ruleBranchesarrayRequired within parentAn array of nested ComboEventRuleBranch objects, allowing for hierarchical rule definitions.
ruleBranches[]ModelEach itemExpand Update event definition — response body — combo Event Rules

Referenced models: Update event definition — response body — combo Event Rules composing Rules item, Update event definition — response body — combo Event Rules

Update event definition — response body — custom Matching Id primary Object Rule
FieldTypePresenceDescription and constraints
$objectRoot
eventPropertyNamestringRequired within parentThe name of the property on the event that is used for resolution. It is a string.
targetObjectPropertyNamestringRequired within parentThe name of the property on the target object that is used for resolution. It is a string.
Update event definition — response body — combo Event Rules composing Rules item
FieldTypePresenceDescription and constraints
$objectRoot
countJSONRequired within parent
count (anyOf 1)integerAlternativeAn integer specifying the number of times the event must occur for the rule to be satisfied.
Format: int32
count (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
eventTypeIdstringRequired within parentThe unique identifier for the type of event this rule applies to.
lookbackWindowDaysJSONOptional
lookbackWindowDays (anyOf 1)integerAlternativeAn integer representing the number of days to look back when evaluating the rule.
Format: int32
lookbackWindowDays (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
propertyFiltersarrayRequired within parentAn array of property filters that must be satisfied for the rule to apply. Each filter specifies conditions on event properties.
propertyFilters[]ModelEach itemExpand Update event definition — response body — combo Event Rules composing Rules item property Filters item

Referenced models: Update event definition — response body — combo Event Rules composing Rules item property Filters item

Create Property — response body — modification Metadata
FieldTypePresenceDescription and constraints
$objectRoot
archivablebooleanRequired within parentA boolean indicating whether the property can be archived.
readOnlyDefinitionbooleanRequired within parentA boolean indicating whether the definition of the property is read-only.
readOnlyOptionsbooleanOptionalA boolean indicating whether the options of the property are read-only.
readOnlyValuebooleanRequired within parentA boolean indicating whether the value of the property is read-only.
Create Property — response body — options item
FieldTypePresenceDescription and constraints
$objectRootA HubSpot property option
descriptionstringOptionalA detailed description of the option, providing additional context.
displayOrderJSONOptional
displayOrder (anyOf 1)integerAlternativeAn integer that determines the order in which the option appears relative to other options.
Format: int32
displayOrder (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
hiddenbooleanRequired within parentA boolean indicating whether the option is hidden from users.
labelstringRequired within parentThe display name of the option, shown to users.
valuestringRequired within parentThe internal value associated with the option, used in data processing.
Update event definition — response body — combo Event Rules composing Rules item property Filters item context
FieldTypePresenceDescription and constraints
$objectRoot
objectTypeIdstringRequired within parentA string that uniquely identifies the type of object to which the property filter is applied.

SDK function policy ID: hubspot.event_definitions_get_event_definition. Catalog operation: event_definitions_get_event_definition. Rules can name either ID; function rules distinguish managed calls and conservatively cover raw calls sharing the route. Existing grant permissions and policy rules apply. wait() returns an immediate result or waits for a required approval; it never approves the request itself. Persist the approval ID to resume after a restart.

Provider errors retain their response; JSON decoding raises ProviderAPIError for provider failures. ManagedOperationError identifies contract/input/retention errors. See error handling and provider-specific behavior. Sensitive input may be refused before approval storage. A decoding error never resubmits a write.

Required provider scopes: ["behavioral_events.event_definitions.read_write"]

Official provider source

Report an issue with this page

Necessary

Required for sign-in, security, authorization, and remembering your choices.

Always active

Analytics

Helps us understand which product and documentation features are useful.

Performance diagnostics

Uses performance tracing and privacy-masked session replay to diagnose problems.

You can change these choices at any time from Cookie settings.