Skip to main content
PATCH
Python

Authorizations

X-Auth-Token
string
header
required

Project API key for sending traces and accessing project-scoped resources. Format: sk-lw-... (no underscore). Obtain one by creating a project via the Admin API or the LangWatch UI.

Path Parameters

id
string
required

Body

application/json
name
string
Minimum string length: 1
active
boolean
message
string | null
alertType
enum<string> | null
Available options:
CRITICAL,
WARNING,
INFO,
null
filters
object
filterQuery
string | null

The trace query this automation is about, in the syntax the traces view uses. When set it supersedes filters.

action
enum<string>
Available options:
SEND_EMAIL,
ADD_TO_DATASET,
ADD_TO_ANNOTATION_QUEUE,
SEND_SLACK_MESSAGE,
SEND_WEBHOOK
customGraphId
string | null

The graph this alert watches, which an update cannot change. Accepted so that writing the read response back works; a different graph is refused. Create an alert on the other graph and delete this one.

actionParams
object

Replaces the delivery configuration as a whole rather than merging into it: send the fields this automation should have from now on, and anything left out is removed — omit headers and it delivers with none, omit signingSecret and its deliveries are no longer signed. The one exception is a credential the read hid: send back the [redacted] placeholder and the stored credential is kept (a Slack automation not yet on a connection has its stored secret moved into one), so reading an automation, changing one field and writing the whole object back is safe. Only this channel's fields are accepted; anything else is refused rather than dropped, and the rule this automation fires by belongs in graphAlert or report.

graphAlert
object

The rule this alert fires by. Only for an automation that is one.

report
object

What this report renders and when. Only for one that is a report.

templates
object

The Liquid templates this automation's message is rendered from. Absent fields render the LangWatch default for the channel.

notificationCadence
enum<string>

How often a notification automation is allowed to send. A new one starts on a five-minute digest, which is what keeps a broad condition from sending a message per matching trace.

Available options:
immediate,
5min_digest,
15min_digest,
hourly_digest
traceDebounceMs
integer

How long to wait for a trace to settle before the conditions are read.

Required range: 0 <= x <= 600000

Response

Trigger updated

id
string
required
name
string
required
action
enum<string>
required
Available options:
SEND_EMAIL,
ADD_TO_DATASET,
ADD_TO_ANNOTATION_QUEUE,
SEND_SLACK_MESSAGE,
SEND_WEBHOOK
actionParams
object
required

Where this automation delivers, with every credential value replaced by the [redacted] placeholder. Which channel is configured, which destination is set and which header names are in play all survive; the values never leave; a Slack automation names its connection by slackIntegrationId and carries no secret. Sending the placeholder back on an update keeps the stored value. The rule this automation fires by is not here — it is stated in graphAlert or report, and sending it in this field is refused.

graphAlert
object | null
required

The rule an alert fires by. Null for anything that is not one.

report
object | null
required

What a report renders and when. Null for anything else.

filters
object
required
filterQuery
string | null
required
kind
enum<string>
required

What this automation is about: matching traces, a metric crossing a threshold, or a schedule.

Available options:
AUTOMATION,
ALERT,
REPORT
customGraphId
string | null
required
notificationCadence
string | null
required
traceDebounceMs
number | null
required
templates
object
required

The Liquid templates this automation's message is rendered from. Absent fields render the LangWatch default for the channel.

active
boolean
required
message
string | null
required
alertType
enum<string> | null
required
Available options:
CRITICAL,
WARNING,
INFO,
null
createdAt
string
required
updatedAt
string
required
platformUrl
string<uri>
required
Last modified on May 19, 2026