pydo.harness.update_trigger()
Generated on 13 Nov 2026
from pydo version
v0.46.0
Usage
client.harness.update_trigger(
trigger_id="b1a0c6de-1f2e-4a3b-9c8d-0e1f2a3b4c5d",
body={
"name": "nightly-deploy-check",
"status": "active",
"prompt_template": "Review the latest push and summarize risks.",
...,
},
)Description
Partial update: only the supplied fields change. kind and webhook.provider are immutable
(409 on change). Mutable: name (409 on duplicate), status (active<->paused), prompt_template,
output, session_template (fresh), bound_session_id (reuse), cron.cron_expr /
cron.timezone (recomputes next_run_at). Re-enabling never produces a catch-up run. PATCHing
session_template is a full replacement, so every spec.secrets slot value the new manifest declares
must be resupplied (secret values are never echoed back), or the request is a 400.
Parameters
trigger_idstring requiredExample:
b1a0c6de-1f2e-4a3b-9c8d-0e1f2a3b4c5dThe trigger UUID.
namestring optionalExample:
nightly-deploy-checkNew team-unique trigger name. Same charset/length rules as create.
statusstring optionalTrigger lifecycle state. Soft-deleted triggers are never returned (404).
prompt_templatestring optionalExample:
Review the latest push and summarize risks.outputobject optionalOutput-delivery configuration on create/update. Exactly one of email / slack is required for the matching mode and forbidden otherwise; destinations are stored encrypted and never returned.
Show child properties
modestring requirednone = nothing pushed; the result stays in run history for self-serve. email = the collected run output is emailed to a configured address. slack = the collected run output is posted to a Slack incoming webhook URL (channel fixed by the webhook at install time).
emailstring optionalExample:
[email protected]Destination address; required iff mode=email.
slackobject optionalSlack destination on create/update. webhook_url is required when mode=slack; must be https://hooks.slack.com/services/...; stored encrypted and never returned.
Show child properties
webhook_urlstring requiredExample:
https://hooks.slack.com/services/T0000/B0000/XXXXSlack incoming webhook URL (https://hooks.slack.com/services/...). The channel is bound to this URL at install time.
session_templatestring optionalfresh triggers only. A session_template PATCH is a full replacement of the stored template; you must resupply every spec.secrets slot value the new manifest declares, or the request is a 400.
bound_session_idstring optionalExample:
a1b2c3d4-e5f6-7890-abcd-ef1234567890reuse triggers only. UUID of an existing session owned by the team.
cronobject optionalcron block on create.
Show child properties
cron_exprstring requiredExample:
0 9 * * 1-5timezonestring requiredExample:
America/New_YorkIANA timezone.
Request Sample
Response Example
More Information
See /v2/agents/triggers/{trigger_id} in the API reference for additional detail on responses, headers, parameters, and more.