Event Subscriptions
An EventSubscription selects EventRecords for an EventChannel and sends them to one or more EventTargets.
List Event Subscriptions
SDK Method
eventsubscription.List()
Return Object
[]*EventSubscription
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
Additional Arguments
Show Event Subscription
SDK Method
eventsubscription.Find()
Return Object
EventSubscription
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
EventSubscriptionFindParams Fields
| Field | Description |
|---|---|
| Id int64 Required | Event Subscription ID. |
Create Event Subscription
SDK Method
eventsubscription.Create()
Return Object
EventSubscription
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
EventSubscriptionCreateParams Fields
| Field | Default | Description |
|---|---|---|
| EventChannelId int64 | Event Channel ID | |
| WorkspaceId int64 | 0 | Workspace ID. 0 means the default workspace or site-wide. |
| ApplyToAllWorkspaces boolean | false | If true, this default-workspace subscription applies to events from all workspaces. |
| Name string Required | Event Subscription name. | |
| Subject string | Custom subject line to use for notification emails. | |
| Message string | Custom message to include in notification emails. | |
| MessageOnly boolean | false | If true, notification email bodies contain only the custom message, omitting event details and the review button. Requires a custom message, defaults to false, and does not affect non-email targets. |
| Enabled boolean | true | Whether this Event Subscription can dispatch events. |
| EventTypes array(string) | Event type strings matched by this subscription. Blank means all event types. | |
| DeliveryPolicy object | Event Subscription delivery policy. | |
| EventTargetIds array(int64) | Event Target IDs this subscription sends to. |
Additional Arguments
Update Event Subscription
SDK Method
eventsubscription.Update()
Return Object
EventSubscription
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
EventSubscriptionUpdateParams Fields
| Field | Description |
|---|---|
| Id int64 Required | Event Subscription ID. |
| EventChannelId int64 | Event Channel ID |
| WorkspaceId int64 | Workspace ID. 0 means the default workspace or site-wide. |
| ApplyToAllWorkspaces boolean | If true, this default-workspace subscription applies to events from all workspaces. |
| Name string | Event Subscription name. |
| Subject string | Custom subject line to use for notification emails. |
| Message string | Custom message to include in notification emails. |
| MessageOnly boolean | If true, notification email bodies contain only the custom message, omitting event details and the review button. Requires a custom message, defaults to false, and does not affect non-email targets. |
| Enabled boolean | Whether this Event Subscription can dispatch events. |
| EventTypes array(string) | Event type strings matched by this subscription. Blank means all event types. |
| DeliveryPolicy object | Event Subscription delivery policy. |
| EventTargetIds array(int64) | Event Target IDs this subscription sends to. |
Additional Arguments
Delete Event Subscription
SDK Method
eventsubscription.Delete()
Return Object
No return value.
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
EventSubscriptionDeleteParams Fields
| Field | Description |
|---|---|
| Id int64 Required | Event Subscription ID. |
The EventSubscription Object
Some of the methods above return a EventSubscription object. The attributes of this object are listed below.
| Attribute | Description |
|---|---|
| Id int64 | Event Subscription ID |
| EventChannelId int64 | Event Channel ID |
| WorkspaceId int64 | Workspace ID. 0 means the default workspace or site-wide. |
| ApplyToAllWorkspaces boolean | If true, this default-workspace subscription applies to events from all workspaces. |
| Name string | Event Subscription name. |
| Subject string | Custom subject line to use for notification emails. |
| Message string | Custom message to include in notification emails. |
| MessageOnly boolean | If true, notification email bodies contain only the custom message, omitting event details and the review button. Requires a custom message, defaults to false, and does not affect non-email targets. |
| Enabled boolean | Whether this Event Subscription can dispatch events. |
| EventTypes array(string) | Event type strings matched by this subscription. Blank means all event types. |
| Filter object | Structured event payload filter. |
| DeliveryPolicy object | Event Subscription delivery policy. |
| EventTargetIds array(int64) | Event Target IDs this subscription sends to. |
| CreatedAt date-time | Event Subscription create date/time. |
| UpdatedAt date-time | Event Subscription update date/time. |