POST /interaction/v1/eventDefinitions
Creates an event definition (name and data schema for an event) and defines an event definition key. The resource uses this key when firing an event to send it to the appropriate journey. Typically, marketers create the event definition in the Journey Builder UI. Use this resource instead if you’re using a custom application for Journey Builder functionality. To call this resource, assign your API Integration the Automation | Interactions | Read scope.
Name | Type | Description |
---|---|---|
type | string | Required. Event represents the most generic type of Event Definition. Other possible values include ContactEvent, DateEvent, or RestEvent. |
name | string | Required. A name for your Event Definition that identifies the event. |
description | string | Description of Event Definition |
mode | string | You can run Event Definitions in Production (default) or Test mode. |
eventDefinitionKey | string | Required. The unique ID of an Event Definition. Don't include special characters. |
sourceApplicationExtensionId | string | Required. A link to the application extension that defines the configuration screens for this type. Journey Builder uses this ID to filter shared entry sources. For example, for the Event Definition to be visible in the Existing Entry sources panel in the UI, this field must be populated. To obtain this value, perform a GET eventDefinition on similar events in Journey Builder. |
iconUrl | string | URL to an icon displayed in Event Administration and the Journey Builder Canvas that identifies an Event Definition |
isVisibleInPicker | boolean | Indicates whether the Event Picker shows the Event Definition to users when configuring a journey. To see your Event Definition in Journey Builder, use true. |
category | string | Broad category of the event type. The default value is event. |
arguments | object | Contains filter criteria for the Event Definition. Only required for types other than event. |
arguments.criteria | string | When the API call defines a filter template, use this parameter as a template when a user chooses and configures the Event Definition. If you aren’t defining an additional filter for the Event Definition, leave this empty. |
configuration | object | Optional configuration data for the event. Only required for types other than event. |
metaData | object | Optional data describing the event and its configuration. Only required for types other than event. |
dataExtensionId | string | Required. The ID for the data extension associated with the event. Events fired from the API write to this data extension. Required only when not providing a schema. |
dataExtensionName | string | The read-only name of the data extension associated with the event. POST and PUT methods ignore this field. |
schema | object | Required. Schema information for an event. The call uses this information to create a data extension associated with the Event Definition. Only required when not providing a dataExtensionId value. For more information, see Event Definition Schema. |
sendableCustomObjectField | string | Defines the subscriber key or email address within a data extension. Required when defining a schema. |
sendableSubscriberField | string | Indicates type of sendable subscriber field. The default value is SubscriberKey. Required when defining a schema. |
schedule | string | Creates an automation run daily according to the defined schedule. The call automatically adds a Fire Event activity to the automation. This automation fires events from the data extension defined as part of the Event Definition. For more information, see Fire an Event. |
To create an event definition, send a POST request to the /interaction/v1/eventDefinitions
endpoint.
The response includes the event definition key.