Event Subscriptions
An EventSubscription selects EventRecords for an EventChannel and sends them to one or more EventTargets.
List Event Subscriptions
Command
files-cli event-subscriptions list
Output
Outputs a list of EventSubscription objects according to the output format.
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
Command
files-cli event-subscriptions find
Output
Outputs a EventSubscription object according to the output format.
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
Flags
| Flag | Description |
|---|---|
| --id= int64 Required | Event Subscription ID. |
Create Event Subscription
Command
files-cli event-subscriptions create
Output
Outputs a EventSubscription object according to the output format.
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
Flags
| Flag | Default | Description |
|---|---|---|
| --event-channel-id= int64 | Event Channel ID | |
| --workspace-id= int64 | 0 | Workspace ID. 0 means the default workspace or site-wide. |
| --apply-to-all-workspaces 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. | |
| --message-only 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. |
| --event-types= array(string) | Event type strings matched by this subscription. Blank means all event types. | |
| --delivery-policy= object | Event Subscription delivery policy. | |
| --event-target-ids= array(int64) | Event Target IDs this subscription sends to. |
Update Event Subscription
Command
files-cli event-subscriptions update
Output
Outputs a EventSubscription object according to the output format.
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
Flags
| Flag | Description |
|---|---|
| --id= int64 Required | Event Subscription ID. |
| --event-channel-id= int64 | Event Channel ID |
| --workspace-id= int64 | Workspace ID. 0 means the default workspace or site-wide. |
| --apply-to-all-workspaces 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. |
| --message-only 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. |
| --event-types= array(string) | Event type strings matched by this subscription. Blank means all event types. |
| --delivery-policy= object | Event Subscription delivery policy. |
| --event-target-ids= array(int64) | Event Target IDs this subscription sends to. |
Delete Event Subscription
Command
files-cli event-subscriptions delete
Output
No output is returned.
Authorization Requirement
Requires either a Site-Wide API key or User API key or session from a User with Site Admin permissions.
Flags
| Flag | Description |
|---|---|
| --id= int64 Required | Event Subscription ID. |
The EventSubscription Object
Some of the commands above return a EventSubscription object. The attributes of this object are listed below.
| Attribute | Description |
|---|---|
| id int64 | Event Subscription ID |
| event_channel_id int64 | Event Channel ID |
| workspace_id int64 | Workspace ID. 0 means the default workspace or site-wide. |
| apply_to_all_workspaces 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. |
| message_only 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. |
| event_types array(string) | Event type strings matched by this subscription. Blank means all event types. |
| filter object | Structured event payload filter. |
| delivery_policy object | Event Subscription delivery policy. |
| event_target_ids array(int64) | Event Target IDs this subscription sends to. |
| created_at date-time | Event Subscription create date/time. |
| updated_at date-time | Event Subscription update date/time. |