---
title: "Update a trigger"
method: PATCH
path: "/v1/automations/triggers/{triggerEventId}"
tags: ["Automations"]
---

# Update a trigger

`PATCH /v1/automations/triggers/{triggerEventId}`

Updates one or more editable fields (`title`, `description`, `payloadSchema`). Whether a trigger fires is governed solely by `automation.published` on each wired automation — there is no per-trigger off-switch. Integration-provisioned triggers are immutable here (`422 TRIGGER_IMMUTABLE`). Returns the bare updated row.

## Path parameters

- `triggerEventId` string, required — Trigger id returned by `POST /v1/automations/triggers`. Custom triggers use `tri_…` ids; integration triggers use composite ids (e.g. `clerk:org_…:brand_…:user.created`, URL-encode the colons).

## Request body

- TriggersPatchRequest
  - `title` string
  - `description` string
  - `payloadSchema` object
    - `type` 'object', required
    - `fields` object[], required
      - `key` string, required — Variable name used by emails and automations, e.g. email or firstName. Prefer self-descriptive keys; this column has no separate description field.
      - `type` 'string' | 'int' | 'boolean', required
      - `required` boolean, required
      - `fallbackValue` union — Substitution value when the inbound payload is missing this field. Also used as the email agent's `e.g. {{ key | fallback }}` example.
        - string
        - number
        - boolean
      - `pii` 'none' | 'low' | 'high' — PII classification for redaction. "high" auto-redacts the value in execution logs and the inbound log. "low" (default when omitted) preserves the value. "none" is an explicit marker that the field is non-personal.

## Response `200`

Updated.

- TriggerRow
  - `triggerEventId` string, required
  - `title` string, required
  - `description` string
  - `provider` 'brew_api' | 'clerk' | 'stripe' | 'shopify' | 'stytch' | 'supabase' | 'workos' | 'revenuecat' | 'custom', required
  - `providerEventKey` string
  - `payloadSchema` object, required
    - `type` 'object', required
    - `fields` object[], required
      - `key` string, required — Variable name used by emails and automations, e.g. email or firstName. Prefer self-descriptive keys; this column has no separate description field.
      - `type` 'string' | 'int' | 'boolean', required
      - `required` boolean, required
      - `fallbackValue` union — Substitution value when the inbound payload is missing this field. Also used as the email agent's `e.g. {{ key | fallback }}` example.
        - string
        - number
        - boolean
      - `pii` 'none' | 'low' | 'high' — PII classification for redaction. "high" auto-redacts the value in execution logs and the inbound log. "low" (default when omitted) preserves the value. "none" is an explicit marker that the field is non-personal.
  - `createdAt` string, date-time, required
  - `updatedAt` string, date-time, required

## Other responses

- `400` — Strict-body violation or no editable field supplied (a bare id with no updates is rejected).
- `401` — The API key was missing, invalid, or revoked.
- `403` — The caller does not have the required `automations` permission.
- `404` — Trigger not found in the API-key brand. Cross-brand ids intentionally surface as 404 (never 403) so the API does not leak cross-brand existence.
- `422` — Integration-provisioned trigger — manage it from the integration instead.
- `429` — The request hit the rolling rate limit window.
- `500` — Unexpected internal error.

---

[API](https://skmtc.net/brew/apis/brew-public-api-v1.md) · [All operations](https://skmtc.net/brew/apis/brew-public-api-v1/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/brew/brew-public-api-v1/versions/db96cfedc6c5/schema)
