Triggers

Get Triggers

get
Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
project_idstringRequired
Responses
chevron-right
200

Successful Response

application/json

A domain model representing the stored metadata of a Trigger.

Attributes

  • project_trigger_id (Mapped[uuid.UUID]): The ID of the instance of this trigger.
  • project_id (Mapped[str]): The id of the project that should be executed by this trigger.
  • connection_id (Mapped[ConnectionID | None]): The id of the connection that will be used by the trigger (if any).
  • provider_id (Mapped[str]): The id of the provider that the trigger belongs to. ie: "stripe"
  • trigger_id (Mapped[str]): The id of the Trigger class that will be used to execute this trigger instance. ie: "on_customer_created" for the "stripe" provider in StackAI.
  • webhook_data (Mapped[dict[str, Any] | None]): Used to keep track of the data of the webhook in the provider platform when using webhook based triggers. ie: {"form_id": "43dc2afb", "webhook_tag": "stackai-webhook"} in Typeform. Also used to keep track of the cron job id for polling / scheduled triggers.
  • cursor_data (Mapped[dict[str, Any] | None]): Used to keep track of the data of the cursor in the provider platform when using polling based triggers. ie: {"last_processed_event_id": "1234567890"} or {"last_processed_event_timestamp": "2025-03-02 10:30:09"} May be None if the trigger is not a polling trigger. (e.g. webhook, scheduled, etc.)
  • trigger_config (Mapped[dict[str, Any] | None]): Used to keep track of generic configuration parameters for the trigger. ie: {"inbox_id": "ENTERPRISE_INBOX", "polling_frequency": "10000"}. As opposed to the action nodes, we do not store the trigger config in the nodes themselves, but rather in this column.
  • status (Mapped[TriggerStatus]): The status of the trigger: enabled/disabled.
  • created_by (Mapped[uuid.UUID]): The user that created the trigger.
  • updated_by (Mapped[uuid.UUID]): The user that updated the trigger.
  • created_at (Mapped[datetime]): The date and time the trigger was created.
  • updated_at (Mapped[datetime]): The date and time the trigger was updated.
project_trigger_idstring · uuidOptional
project_idstringRequired
connection_idany ofOptional
string · uuidOptional
or
nullOptional
provider_idstringRequired
trigger_idstringRequired
webhook_dataany ofOptional
or
nullOptional
cursor_dataany ofOptional
or
nullOptional
trigger_configany ofOptional
or
nullOptional
statusstring · enumOptionalDefault: DISABLEDPossible values:
created_atstring · date-timeOptional
updated_atstring · date-timeOptional
created_bystring · uuidRequired
updated_byany ofOptional
string · uuidOptional
or
nullOptional
get
/projects/{project_id}/triggers

Create Trigger

post
Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
project_idstringRequired
Body

A domain model representing a request to create a new Trigger.

provider_idstringRequired
trigger_idstringRequired
connection_idany ofOptional
string · uuidOptional
or
nullOptional
Responses
post
/projects/{project_id}/triggers

Get Trigger

get
Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
project_trigger_idstring · uuidRequired
Responses
chevron-right
200

Successful Response

application/json

A domain model representing the stored metadata of a Trigger.

Attributes

  • project_trigger_id (Mapped[uuid.UUID]): The ID of the instance of this trigger.
  • project_id (Mapped[str]): The id of the project that should be executed by this trigger.
  • connection_id (Mapped[ConnectionID | None]): The id of the connection that will be used by the trigger (if any).
  • provider_id (Mapped[str]): The id of the provider that the trigger belongs to. ie: "stripe"
  • trigger_id (Mapped[str]): The id of the Trigger class that will be used to execute this trigger instance. ie: "on_customer_created" for the "stripe" provider in StackAI.
  • webhook_data (Mapped[dict[str, Any] | None]): Used to keep track of the data of the webhook in the provider platform when using webhook based triggers. ie: {"form_id": "43dc2afb", "webhook_tag": "stackai-webhook"} in Typeform. Also used to keep track of the cron job id for polling / scheduled triggers.
  • cursor_data (Mapped[dict[str, Any] | None]): Used to keep track of the data of the cursor in the provider platform when using polling based triggers. ie: {"last_processed_event_id": "1234567890"} or {"last_processed_event_timestamp": "2025-03-02 10:30:09"} May be None if the trigger is not a polling trigger. (e.g. webhook, scheduled, etc.)
  • trigger_config (Mapped[dict[str, Any] | None]): Used to keep track of generic configuration parameters for the trigger. ie: {"inbox_id": "ENTERPRISE_INBOX", "polling_frequency": "10000"}. As opposed to the action nodes, we do not store the trigger config in the nodes themselves, but rather in this column.
  • status (Mapped[TriggerStatus]): The status of the trigger: enabled/disabled.
  • created_by (Mapped[uuid.UUID]): The user that created the trigger.
  • updated_by (Mapped[uuid.UUID]): The user that updated the trigger.
  • created_at (Mapped[datetime]): The date and time the trigger was created.
  • updated_at (Mapped[datetime]): The date and time the trigger was updated.
project_trigger_idstring · uuidOptional
project_idstringRequired
connection_idany ofOptional
string · uuidOptional
or
nullOptional
provider_idstringRequired
trigger_idstringRequired
webhook_dataany ofOptional
or
nullOptional
cursor_dataany ofOptional
or
nullOptional
trigger_configany ofOptional
or
nullOptional
statusstring · enumOptionalDefault: DISABLEDPossible values:
created_atstring · date-timeOptional
updated_atstring · date-timeOptional
created_bystring · uuidRequired
updated_byany ofOptional
string · uuidOptional
or
nullOptional
get
/triggers/{project_trigger_id}

Delete Trigger

delete
Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
project_trigger_idstring · uuidRequired
Responses
delete
/triggers/{project_trigger_id}

No content

Get Triggers By User Org

get
Authorizations
OAuth2passwordRequired
Token URL:
Responses
chevron-right
200

Successful Response

application/json

A domain model representing a trigger from a user organization.

project_nameany ofRequired
stringOptional
or
nullOptional
get
/triggers
200

Successful Response

Enable Trigger

post
Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
project_trigger_idstring · uuidRequired
Responses
chevron-right
200

Successful Response

application/json
anyOptional
post
/triggers/{project_trigger_id}/enable

No content

Disable Trigger

post
Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
project_trigger_idstring · uuidRequired
Responses
chevron-right
200

Successful Response

application/json
anyOptional
post
/triggers/{project_trigger_id}/disable

No content

Get Available Triggers By Provider

get

Get the list of native triggers available and implemented by Stack AI.

Path parameters
provider_idstringRequired
Responses
chevron-right
200

Successful Response

application/json
trigger_typestring · enumRequiredPossible values:
provider_idstringRequired

The id of the provider

trigger_idstringRequired

The id of the trigger.

trigger_namestringRequired

The name of the trigger.

descriptionstringRequired
instructionsany ofOptional

The instructions of the trigger.

stringOptional
or
nullOptional
iconstringRequired

The icon of the trigger.

tagsany ofOptional

The tags of the trigger

Default: []
string[]Optional
or
nullOptional
versionstringOptional

The version of the trigger

Default: 1.0.0
webhook_requires_verificationbooleanOptional

Whether the webhook requires to be verified by the provider witha challenge request before being created. (e.g. Microsoft Graph Outlook & Slack webhooks requires it)

Default: false
can_get_test_samplesbooleanRead-onlyRequired

Whether the trigger can get test samples.

Returns: bool: True if get_test_samples is not None, False otherwise.

get
/providers/{provider_id}/triggers

Get Specific Trigger From Provider

get

Get the data for a specific native trigger available and implemented by Stack AI.

Path parameters
provider_idstringRequired
trigger_idstringRequired
Responses
chevron-right
200

Successful Response

application/json
trigger_typestring · enumRequiredPossible values:
provider_idstringRequired

The id of the provider

trigger_idstringRequired

The id of the trigger.

trigger_namestringRequired

The name of the trigger.

descriptionstringRequired
instructionsany ofOptional

The instructions of the trigger.

stringOptional
or
nullOptional
iconstringRequired

The icon of the trigger.

tagsany ofOptional

The tags of the trigger

Default: []
string[]Optional
or
nullOptional
versionstringOptional

The version of the trigger

Default: 1.0.0
webhook_requires_verificationbooleanOptional

Whether the webhook requires to be verified by the provider witha challenge request before being created. (e.g. Microsoft Graph Outlook & Slack webhooks requires it)

Default: false
can_get_test_samplesbooleanRead-onlyRequired

Whether the trigger can get test samples.

Returns: bool: True if get_test_samples is not None, False otherwise.

get
/providers/{provider_id}/triggers/{trigger_id}
Deprecated

Webhook Trigger

post
Path parameters
project_trigger_idstring · uuidRequired
api_keystringRequired
org_idstringRequired
Query parameters
trigger_idany ofOptional
stringOptional
or
nullOptional
provider_idany ofOptional
stringOptional
or
nullOptional
Responses
post
/organizations/{org_id}/triggers/{project_trigger_id}/webhook/key/{api_key}

No content

Deprecated

Polling Trigger

post
Path parameters
project_trigger_idstring · uuidRequired
api_keystringRequired
org_idstringRequired
Responses
post
/organizations/{org_id}/triggers/{project_trigger_id}/polling/key/{api_key}

No content

Deprecated

Scheduled Trigger

post
Path parameters
project_trigger_idstring · uuidRequired
api_keystringRequired
org_idstringRequired
Responses
post
/organizations/{org_id}/triggers/{project_trigger_id}/scheduled/key/{api_key}

No content

Webhook Handler

post

Handle webhook requests for all incoming webhook events.

Path parameters
webhook_idstringRequired

Webhook identifier - either an app webhook provider (e.g., 'slack', 'github') or a project trigger UUID

Example: slack
Responses
chevron-right
200

Successful Response

application/json
anyOptional
post
/v1/webhooks/{webhook_id}

No content

Get Trigger Test Samples

get

Get test samples for a trigger.

Authorizations
OAuth2passwordRequired
Token URL:
Path parameters
project_trigger_idstring · uuidRequired
Responses
chevron-right
200

Successful Response

application/json
Other propertiesanyOptional
get
/api/v0/project-triggers/{project_trigger_id}/test-samples

Last updated

Was this helpful?