Skip to main content
PUT
Upsert Agent Trigger

Authorizations

Authorization
string
header
required

API key authentication. Get your API key from the Duvo dashboard.

Path Parameters

agentId
string<uuid>
required

The agent's unique identifier

Body

application/json
integration_slug
string
required

Integration slug the trigger fires for (e.g. gmail, outlook, linear-native, google-drive).

trigger_type
string
required

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
object

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.

enabled
boolean
default:true

Whether the trigger is active. Defaults to true.

Response

Default Response

id
string
required
agent_id
string
required
user_id
string
required
integration_slug
string
required
trigger_type
string
required
filter_config
object
required
integration_instance_id
string
required
enabled
boolean
required
auto_disabled_at
string | null
required
auto_disabled_reason
string | null
required
consecutive_missing_connection_failures
integer
required
Required range: 0 <= x <= 9007199254740991
first_missing_connection_failure_at
string | null
required
last_missing_connection_failure_at
string | null
required
created_at
string
required
updated_at
string
required
webhook_status
enum<string> | null
required

Whether the upstream webhook this trigger needs is registered. Null when the save needed no webhook work: every trigger type but Jira today, and a Jira save with enabled: false. Every enabled Jira save reconciles, so saving again retries a failed registration. registered means Duvo holds a current subscription covering this trigger's projects. connection_required means the Jira Connection this trigger is bound to names no Atlassian site, so there is nothing to register against; reconnect Jira and save again. project_not_found means Jira found no project for one of filter_config.project_keys that the Connection can open, so that key is left out of the webhook; check the keys and save again. failed means Atlassian refused or the call did not complete; see webhook_error and retry. The trigger row is saved in every case; anything but registered means it will not fire yet.

Available options:
registered,
connection_required,
project_not_found,
failed
webhook_error
string | null
required

On failed, a stable reason code for the refusal (for example http_403, rejected_by_jira). conflict_other_binding means the Connection's Jira account already sends events to another Duvo Connection, in this team or another, and Jira allows one per account; connect a different Jira account. issue_created_unconfirmed means Jira has not yet confirmed that the webhook sends new issues, so they may not start Runs; Duvo tries again about every two hours, and saving again tries at once. Null otherwise.