Upsert Agent Trigger
upsertAgentTriggerCreate or update the authenticated user's trigger for an integration on an agent. The integration must already be connected to the agent (its OAuth connection set up in the Duvo dashboard). Set enabled: false to pause a trigger without deleting it. An agent holds one trigger per integration for a user, so a save with a different trigger_type replaces the existing one — except when that trigger is an @mention trigger, which is managed from the agent's mention setting and answers 409 (mention_trigger_protected) here. @mention triggers are best managed from that setting throughout: this route leaves an existing one's filter_config untouched, and refuses to create a teams_mention trigger without a filter_config.tenantId (400, mention_trigger_workspace_required) — a Slack mention trigger has no equivalent field to supply.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| agentId | Yes | The agent's unique identifier | |
| enabled | No | Whether the trigger is active. Defaults to true. | |
| trigger_type | Yes | Trigger type within the integration (e.g. `email_received`). Discover valid values via the trigger types endpoint. Integrations that enumerate their trigger types (Microsoft Teams, Google Drive, Google Sheets) reject anything else with 400 (`trigger_type_unsupported`), except a save that pauses a trigger already carrying that type. | |
| filter_config | No | Integration-specific filter config (e.g. sender/subject filters). Shape comes from the integration's filter schema. Replaces the trigger's current config, so send the whole object — except on an @mention trigger, whose config is managed from the agent's mention setting and is left as it is. | |
| integration_slug | Yes | Integration slug the trigger fires for (e.g. `gmail`, `outlook`, `linear-native`, `google-drive`). |