Zum Hauptinhalt springen
POST
/
events
/
v3
/
event-definitions
/
{eventName}
/
property
Eigenschaft für eine Definition für ein Event erstellen
curl --request POST \
  --url https://api.hubapi.com/events/v3/event-definitions/{eventName}/property \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "description": "<string>",
  "label": "<string>",
  "name": "<string>",
  "options": [
    {
      "description": "<string>",
      "displayOrder": 123,
      "hidden": true,
      "label": "<string>",
      "value": "<string>"
    }
  ],
  "type": "<string>"
}'
{
  "archived": true,
  "archivedAt": "2023-11-07T05:31:56Z",
  "calculated": true,
  "calculationFormula": "<string>",
  "createdAt": "2023-11-07T05:31:56Z",
  "createdUserId": "<string>",
  "dataSensitivity": "highly_sensitive",
  "description": "<string>",
  "displayOrder": 123,
  "externalOptions": true,
  "fieldType": "<string>",
  "formField": true,
  "groupName": "<string>",
  "hasUniqueValue": true,
  "hidden": true,
  "hubspotDefined": true,
  "label": "<string>",
  "modificationMetadata": {
    "archivable": true,
    "readOnlyDefinition": true,
    "readOnlyOptions": true,
    "readOnlyValue": true
  },
  "name": "<string>",
  "options": [
    {
      "description": "<string>",
      "displayOrder": 123,
      "hidden": true,
      "label": "<string>",
      "value": "<string>"
    }
  ],
  "referencedObjectType": "<string>",
  "sensitiveDataCategories": [
    "<string>"
  ],
  "showCurrencySymbol": true,
  "type": "<string>",
  "updatedAt": "2023-11-07T05:31:56Z",
  "updatedUserId": "<string>"
}

Unterstützte Produkte

Erfordert eines der folgenden Produkte oder höher.
Marketing HubMarketing Hub -Enterprise
Sales HubSales Hub -Enterprise
Service HubService Hub -Enterprise
Content HubContent Hub -Enterprise
Diese API erfordert einen der folgenden Bereiche:
behavioral_events.event_definitions.read_write

Authorizations

Authorization
string
header
required

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

Path Parameters

eventName
string
required

Der interne Name des benutzerdefinierten Events.

Body

application/json
label
string
required

Für Menschen lesbares Label für die Eigenschaft. Wird in HubSpot-UI verwendet.

type
string
required

Der Datentyp der Eigenschaft. Folgende Datentypen sind zulässig: [string, number, enumeration, datetime]

description
string

Eine Beschreibung der Eigenschaft, die in HubSpot als Hilfetext angezeigt wird.

name
string

Interner Name der Eigenschaft. Wird verwendet, wenn die Eigenschaft über die API referenziert wird.

options
object[]

Eine Liste der verfügbaren Optionen für die Eigenschaft, wenn es sich um eine Aufzählung handelt. HINWEIS: Dieses Feld gilt nur für Aufzählungseigenschaften.

Response

successful operation

A HubSpot property

description
string
required

A summary of the property's purpose.

fieldType
string
required

Determines how the property will appear in HubSpot's UI or on a form. Learn more in the properties API guide.

groupName
string
required

The name of the group to which the property is assigned.

label
string
required

The display label for the property.

name
string
required

The internal name for the property.

options
object[]
required

A list of valid options for the property. This field is required for enumerated properties.

type
string
required

The data type of the property, such as string or number.

archived
boolean

Whether the property is archived.

archivedAt
string<date-time>

The timestamp when the property was archived, in ISO 8601 format.

calculated
boolean

Whether the property is a calculated field.

calculationFormula
string

The formula used for calculated properties.

createdAt
string<date-time>

The timestamp when the property was created, in ISO 8601 format.

createdUserId
string

The ID of the user who created the property.

dataSensitivity
enum<string>

Indicates the sensitivity level of the property, such as "non_sensitive", "sensitive", or "highly_sensitive".

Verfügbare Optionen:
highly_sensitive,
non_sensitive,
sensitive
displayOrder
integer

The position of the item relative to others in the list.

externalOptions
boolean

Applicable only for enumeration type properties. Should be set to true with a 'referencedObjectType' of 'OWNER'. Otherwise false.

formField
boolean

Whether the property can appear on forms.

hasUniqueValue
boolean

Whether the property is a unique identifier property.

hidden
boolean

Whether or not the property will be hidden from the HubSpot UI. It's recommended that this be set to false for custom properties.

hubspotDefined
boolean

A boolean value set to true for HubSpot default properties.

modificationMetadata
object
referencedObjectType
string

Deprecated. Use externalOptionsReferenceType instead.

sensitiveDataCategories
string[]

When sensitiveData is true, lists the type of sensitive data contained in the property (e.g., "HIPAA").

showCurrencySymbol
boolean

Whether to show the currency symbol in HubSpot's UI.

updatedAt
string<date-time>

The timestamp when the property was last updated, in ISO 8601 format.

updatedUserId
string