---
title: "Update a trigger"
method: PATCH
path: "/v1/projects/{project_id}/triggers/{trigger_id}"
tags: ["Triggers"]
---

# Update a trigger

`PATCH /v1/projects/{project_id}/triggers/{trigger_id}`

## Request

- Base URL: `https://api.naturali.ai`
- URL: `https://api.naturali.ai/v1/projects/{project_id}/triggers/{trigger_id}`
- Auth: one of:
  - HTTP bearer
  - OAuth 2 (authorization code, authorization URL `https://api.naturali.ai/authorize`, token URL `https://api.naturali.ai/token`, scopes: `mcp:access`)

Updates an existing trigger's configuration. The type is immutable. Changing `target_type` or `target_id` re-checks the target-start action (`orchestrations:StartRun`, `agents:CreateAgentGeneration` or `tools:CallTool`) against the resulting target, because a firing runs with the trigger creator's authority rather than the updater's. A caller who could not start the new target is answered `403` and the trigger keeps the target it had.

## Path parameters

- `trigger_id` string, required

## Request body

- UpdateTriggerRequest
  - `name` string
  - `description` string, nullable
  - `target_type` 'orchestration' | 'agent' | 'tool' | 'eval'
  - `target_id` string
  - `action` string, nullable
  - `input` object, nullable
  - `tool_context` object, nullable: Replaces the stored bag; `null` clears it. Write-only and resolved at fire time — see `CreateTriggerRequest.tool_context`.
  - `cron` string, nullable
  - `event_pattern` string, nullable
  - `active` boolean
  - `policy_id` string, nullable

## Response `200`

Trigger updated

- Trigger
  - `id` string
  - `project_id` string
  - `name` string
  - `description` string, nullable
  - `type` 'manual' | 'webhook' | 'schedule' | 'event'
  - `target_type` 'orchestration' | 'agent' | 'tool' | 'eval'
  - `target_id` string: Public ID of the target resource (orchestration, agent, tool, or eval)
  - `action` string, nullable: Tool targets only — the action for mcp tools
  - `input` object, nullable: Static input, shallow-merged under fire-time input. For `eval` targets the effective input may carry `agent_version` and `baseline_run_id`, which are passed to the queued run.
  - `cron` string, nullable: 5-field cron expression (UTC). Present only for schedule triggers
  - `event_pattern` string, nullable: Internal-event subscription pattern. Present only for event triggers: `*`, `prefix.*`, or an exact event name
  - `active` boolean
  - `policy_id` string, nullable: Optional boundary policy that further restricts firings
  - `next_fire_at` string, date-time, nullable: Read-only, schedule triggers only. Server-computed next fire time
  - `created_at` string, date-time
  - `updated_at` string, date-time

## Other responses

- `400`: Bad request
- `401`: Unauthorized
- `403`: Forbidden
- `404`: Trigger not found

---

[API](https://skmtc.dev/naturali/apis/naturali-ai-api.md) · [All operations](https://skmtc.dev/naturali/apis/naturali-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/naturali/apis/naturali-ai-api/revisions/e4905b78f422?raw)
