Skip to content

HubSpot: Create Property

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

← Event definitions operations · Get started

Operation hubspot.event_definitions_create_event_property

Provider route: POST /events/2026-09/event-definitions/{eventName}/property. 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"]["createEventProperty"]>[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.createEventProperty(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.create_event_property(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
bodyModelRequired within parentExpand Create Property — request body — body

Referenced models: Create Property — request body — body

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

FieldTypePresenceDescription and constraints
$ModelRootExpand Create Property — response body

Referenced models: Create Property — response body

Create Property — request body — body
FieldTypePresenceDescription and constraints
$objectRoot
descriptionstringOptionalA string providing additional information about the property.
labelstringRequired within parentA string representing the display name of the property. This field is required.
namestringOptionalA string representing the unique name of the property.
optionsarrayOptionalAn array of OptionInput objects that define the possible values for the property.
options[]ModelEach itemExpand Create Property — request body — body options item
typestringRequired within parentA string indicating the data type of the property. This field is required.

Referenced models: Create Property — request body — body options item

Create Property — response body
FieldTypePresenceDescription and constraints
$objectRootA HubSpot property
archivedbooleanOptionalIndicates whether the property is archived.
archivedAtstringOptionalThe date and time when this property was archived, in ISO 8601 format.
Format: date-time
calculatedbooleanOptionalIndicates whether the property is calculated.
calculationFormulastringOptionalThe formula used to calculate the property's value, if applicable.
createdAtstringOptionalThe date and time when this property was created, in ISO 8601 format.
Format: date-time
createdUserIdstringOptionalThe ID of the user who created this property.
currencyPropertyNamestringOptionalThe name of the currency property associated with this property.
dataSensitivitystringOptionalThe sensitivity level of the data, with valid values including 'non_sensitive', 'sensitive', and 'highly_sensitive'.
Known values: highly_sensitive, non_sensitive, sensitive
dateDisplayHintstringOptionalA hint for displaying date properties, with valid values including 'absolute', 'absolute_with_relative', 'time_since', and 'time_until'.
Known values: absolute, absolute_with_relative, time_since, time_until
descriptionstringRequired within parentA description of the property.
displayOrderJSONOptional
displayOrder (anyOf 1)integerAlternativeThe order in which this property is displayed relative to other properties.
Format: int32
displayOrder (anyOf 2)stringAlternativePattern: ^-?[0-9]+(?:\.[0-9]+)?(?:[eE][+-]?[0-9]+)?$
externalOptionsbooleanOptionalIndicates whether the property options are external.
fieldTypestringRequired within parentThe field type of the property.
formFieldbooleanOptionalIndicates whether the property is a form field.
groupNamestringRequired within parentThe name of the group to which this property belongs.
hasUniqueValuebooleanOptionalIndicates whether the property has a unique value.
hiddenbooleanOptionalIndicates whether the property is hidden.
hubspotDefinedbooleanOptionalIndicates whether the property is defined by HubSpot.
labelstringRequired within parentThe display label for the property.
modificationMetadataModelOptionalExpand Create Property — response body — modification Metadata
namestringRequired within parentThe unique name of the property.
numberDisplayHintstringOptionalA hint for displaying number properties, with valid values including 'unformatted', 'formatted', 'currency', 'percentage', 'duration', and 'probability'.
Known values: currency, duration, formatted, percentage, probability, unformatted
optionsarrayRequired within parentAn array of options available for this property, applicable if the property supports multiple values.
options[]ModelEach itemExpand Create Property — response body — options item
referencedObjectTypestringOptionalThe type of object that this property references.
sensitiveDataCategoriesarrayOptionalAn array of categories indicating the sensitivity of the data.
sensitiveDataCategories[]stringEach item
showCurrencySymbolbooleanOptionalIndicates whether a currency symbol is shown for the property.
textDisplayHintstringOptionalA hint for displaying text properties, with valid values including 'unformatted_single_line', 'multi_line', 'email', 'phone_number', 'domain_name', 'ip_address', 'physical_address', and 'postal_code'.
Known values: domain_name, email, ip_address, multi_line, phone_number, physical_address, postal_code, unformatted_single_line
typestringRequired within parentThe data type of the property.
updatedAtstringOptionalThe date and time when this property was last updated, in ISO 8601 format.
Format: date-time
updatedUserIdstringOptionalThe ID of the user who last updated this property.

Referenced models: Create Property — response body — modification Metadata, Create Property — response body — options item

Create Property — request body — body options item
FieldTypePresenceDescription and constraints
$objectRoot
descriptionstringOptionalA string providing additional information about the option.
displayOrderintegerRequired within parentAn integer indicating the order in which the option should be displayed relative to other options.
Format: int32
hiddenbooleanRequired within parentA boolean indicating whether the option is hidden from view.
labelstringRequired within parentA string representing the display label for the option.
valuestringRequired within parentA string representing the unique value associated with the option.
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.

SDK function policy ID: hubspot.event_definitions_create_event_property. Catalog operation: event_definitions_create_event_property. 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.