---
title: "Update Trigger"
method: PATCH
path: "/api/v1/agents/{agent_id}/triggers/{trigger_id}"
tags: ["Agents"]
---

# Update Trigger

`PATCH /api/v1/agents/{agent_id}/triggers/{trigger_id}`

## Request

- Base URL: `https://api.dialogbrain.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.dialogbrain.com/api/v1/agents/{agent_id}/triggers/{trigger_id}`
- Auth: none declared

Update a trigger. Fields you leave out keep their current value.

## Path parameters

- `agent_id` integer, required
- `trigger_id` integer, required

## Request body

- TriggerUpdateRequest
  - `trigger_type` 'incoming_message' | 'incoming_call' | 'schedule' | 'webhook' | 'event' | 'blockchain_event' | 'job_completed' | 'calendar_event' | 'lead_captured', nullable: New trigger type. OMIT to keep the existing type unchanged.
  - `conditions` object, nullable: New trigger conditions (replaces existing). Same fields as trigger_create: keywords, keyword_match, channel_types, context_types, group_mode, channel_account_ids, folder_ids, ai_tag_ids, ai_filter_ids, ai_filter_mode, ai_filters: [{id: 1}, {name: "...", description: "..."}] — shorthand: reference existing by id or create inline (calls Voyage embedding API). If a filter with the same name already exists, it is reused by id. contact_states, cooldown_seconds, max_runs_per_thread_per_hour, once_per_thread (true: completes once per conversation, then the next matching trigger answers there). template: the rule_based reply — a string, or a card object {text, attachments, buttons} whose buttons each carry exactly one of value|url|web_app; a card with buttons needs send_mode auto. handoff: {agent_id, task} — rule_based owner only. After the rule's message has gone out, that agent runs on the same thread as its own trigger would, with task as the handoff brief; task may use {channel_type} and {thread_id} only. The target must be an active agentic or claude_channels agent in this workspace. incoming_call (voice pickup): answer_delay_s, plus auto_join and chat_ids for GROUP calls — auto_join true|false decides whether the bot enters on its own or the call becomes a pending invite, and OMITTING the key defers to the channel setting (trigger-when-present, then channel, then approval; absent and false are different answers). chat_ids scopes to specific Telegram groups (any id spelling) and must not be combined with channels whose calls have no chat, which never satisfy it. Conditions are REPLACED, so dropping a key clears it. calendar_event: window_minutes_before (1-1440, required), channel_account_ids, keywords, prepare_meet_join. incoming_message: action "reply_text"|"join_voice" (join requires send_mode=auto), message_source "real"|"transcript"|"both". calendar_event: run_mode "text"|"voice" (voice requires send_mode=auto). Both: voice: {speak_first, vision_mode}
  - `thread_ids` unknown[], nullable: Replace the conversations this trigger is restricted to, by numeric thread id.
    - unknown
  - `blocked_sender_ids` unknown[], nullable: People this agent must never answer, by phone number, username or address. Beats every other filter, and works for calls as well as messages. An empty list unblocks everyone.
    - unknown
  - `excluded_thread_ids` unknown[], nullable: Replace the conversations this trigger never fires in, by numeric thread id. An exclusion always wins over `thread_ids`.
    - unknown
  - `send_mode` 'auto' | 'draft', nullable: New send mode override. OMIT to leave the send-mode unchanged.
  - `enabled` boolean, nullable: Enable or disable this trigger. OMIT to leave the enabled flag unchanged.
  - `target_session` string, nullable: Which Claude Code desktop session this trigger's runs go to (name / client id / session id from workspace.desktops). Only meaningful on a claude_channels agent. Pass "" to clear it and go back to deliver-only-when-one-desktop-is-connected. Stored as conditions.target_session.
  - `priority` integer, nullable: Trigger priority — lower numbers run first

## Response `200`

Successful Response

- unknown

## Other responses

- `404`: No such agent or trigger in the workspace.
- `422`: Validation Error

---

[API](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway.md) · [All operations](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/llms.txt) · [OpenAPI document](https://skmtc.dev/dialogbrain/apis/dialogbrain-v2-api-gateway/revisions/d84e7dc9977d?raw)
