---
title: "Update Trigger"
method: PUT
path: "/v1/triggers/{trigger_id}"
tags: ["v1", "protected", "triggers"]
---

# Update Trigger

`PUT /v1/triggers/{trigger_id}`

Update an existing trigger.

Updates the specified trigger with the provided data. Only non-null fields
in the request will be updated. If channel_credentials are provided,
they replace the existing credentials in the secret store.

Args:
    trigger_id: The unique identifier of the trigger.
    payload: Trigger update DTO (single source of truth shared with MCP toolset).
    user_context: Authentication context.
    trigger_service: Injected trigger service.
    secret_manager: Injected secret manager for credential storage.

Returns:
    The updated trigger.

Raises:
    HTTPException: If trigger not found or validation fails.

## Path parameters

- `trigger_id` string, uuid, required

## Request body

- TriggerUpdate — Patch payload for a trigger. All fields optional — unset = unchanged.
  - `allowed_methods` string[], nullable
  - `channel_credentials` object, nullable — Channel credentials to update. Pass to rotate credentials.
  - `conditions` object, nullable
  - `cron_expression` string, nullable
  - `description` string, nullable
  - `enabled` boolean, nullable — Toggle the trigger active state. Maps to ``is_active`` server-side. REST clients may pass either ``enabled`` (canonical) or ``is_active`` (alias).
  - `failure_threshold` integer, nullable
  - `name` string, nullable
  - `task_parameters` object, nullable
  - `timezone` string, nullable
  - `validation_rules` object, nullable
  - `webhook_config` object, nullable
  - `webhook_type` string, nullable

## Response `200`

Successful Response

- TriggerResponse — Response model for trigger data.
  - `agent_id` string, uuid, required
  - `allowed_methods` string[], nullable
  - `conditions` object, required
  - `consecutive_failures` integer, required
  - `created_at` string, required
  - `created_by` string, required
  - `cron_expression` string, nullable
  - `data_extractor` string, nullable
  - `description` string, required
  - `event_types` string[]
  - `failure_threshold` integer, required
  - `has_channel_credentials` boolean
  - `id` string, uuid, required
  - `is_active` boolean, required
  - `last_execution_at` string, nullable
  - `name` string, required
  - `next_run_time` string, nullable
  - `task_parameters` object, required
  - `timezone` string, nullable
  - `trigger_type` string, required
  - `updated_at` string, required
  - `validation_rules` object, nullable
  - `webhook_config` object, nullable
  - `webhook_id` string, nullable
  - `webhook_type` string, nullable

## Other responses

- `422` — Validation Error

## Changes

> 19 revisions in range; 6 could not be searched.

- **2026-07-08** `8940d7f77282` — 4 breaking
  - the `created_at` response's property type/format changed from `string`/`date-time` to `string`/`` for status `200`
  - the `last_execution_at/anyOf[subschema #1]/` response's property type/format changed from `string`/`date-time` to `string`/`` for status `200`
  - the `next_run_time/anyOf[subschema #1]/` response's property type/format changed from `string`/`date-time` to `string`/`` for status `200`
  - the `updated_at` response's property type/format changed from `string`/`date-time` to `string`/`` for status `200`
- **2026-04-29** `e1a530c0a2d5` — 1 warning, 2 info
  - removed the request property `is_active`
  - added the new optional request property `enabled`
  - added the optional property `data_extractor` to the response with the `200` status
- **2026-03-30** `e9c153221160` — 2 warning, 1 info
  - removed the request property `enabled`
  - removed the optional property `data_extractor` from the response with the `200` status
  - added the new optional request property `is_active`

[Change history](https://skmtc.dev/agentarea/apis/agentarea-api/changes/v1/triggers/:trigger_id/put.md)

---

[API](https://skmtc.dev/agentarea/apis/agentarea-api.md) · [All operations](https://skmtc.dev/agentarea/apis/agentarea-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/agentarea/agentarea-api/revisions/ac18f7025c00/schema)
