Triggers
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
nullOptional
Responses
201
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
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
nullOptional
422
Validation Error
application/json
post
/projects/{project_id}/triggersPath parameters
project_trigger_idstring · uuidRequired
api_keystringRequired
org_idstringRequired
Query parameters
trigger_idany ofOptional
stringOptional
nullOptional
provider_idany ofOptional
stringOptional
nullOptional
Responses
202
Successful Response
application/json
422
Validation Error
application/json
post
/organizations/{org_id}/triggers/{project_trigger_id}/webhook/key/{api_key}No content
Last updated
Was this helpful?

