Update Topline Alert

Update Topline Alert

patchhttps://statsigapi.net/console/v1/alerts/{id}

Authorizations

STATSIG-API-KEYstringrequired

apiKey (header)

Path parameters

idstringrequired

id

Body

application/json
namestring

Name of the alert (4-100 characters)

Constraints:min length: 4max length: 100
messagestring

Alert message shown when the alert fires

alertThresholdnumber

Threshold value that triggers the alert

Constraints:format: double
warningThresholdnumber

Optional warning threshold value. Pass null to clear.

Constraints:format: doublenullable
formulastring

Formula expression. Pass null to clear.

Constraints:nullable
windowMsnumber

How far back and how frequently a metric should be checked, in milliseconds. Must be between 60_000 and 30 days.

Constraints:format: doublemin: 60000max: 2592000000
conditionstring

Condition under which a metric change triggers an alert

Allowed values:greatergreater_or_equallessless_or_equalequalnot_equal
prioritystring

Alert priority

Allowed values:P1P2P3P4
renotificationConditionsstring[]

Conditions under which a re-notification is sent. Pass null to clear.

Constraints:nullable
renotificationWindowMsnumber

How long to wait before re-notifying, in ms

Constraints:format: double
evaluationDelayMsnumber

Delay before evaluating metrics, in milliseconds. Pass 0 to clear.

Constraints:format: doublemin: 0max: 2592000000
renotificationMessagestring

Re-notification message

teamIDstring

ID of the team that owns this alert. Pass null to clear.

Constraints:nullable
ownerobject

Schema for owner data including ID, type, name.

Example:{"ownerID":"user123","ownerType":"USER","ownerName":"John Doe","ownerEmail":"owner123@test.com"}
Constraints:nullable
Show child attributes
ownerIDstring

ID of the owner

Example:abc123
ownerTypestring

Type of the owner (e.g., SDK_KEY or USER)

Example:USER
ownerNamestring

The name of the owner. This field is optional.

Example:John Doe
ownerEmailstring

The email of the owner. This field is optional.

definitionMetricsJsonstring[]

JSON-encoded metric definitions evaluated by the alert. Each entry is a stringified ToplineAlertMExDefinitionOrUnresolved. When omitted, existing definitions are preserved. Pass an empty array to clear all metrics.

groupBysobject[]

Properties to group the alert metrics by. When omitted, existing group-bys are preserved. Pass an empty array to clear all group-bys.

Show child attributes
columnstringrequired

Property column to group by

keystringrequired

Property key to group by

tagsstring[]

Tags to attach to the alert. When omitted, existing tags are preserved. Pass an empty array to clear all tags.

Response

application/json
200· Update Alert success response
messagestringrequired

A simple string explaining the result of the operation.

dataobjectrequired
Show child attributes
idstringrequired

ID of the alert

namestringrequired

Name of the alert

alertTypestringrequired

Type of alert

Allowed values:thresholdchangepct_change
metricsobjectrequired

List of metrics associated with this alert

metricGroupBysobjectrequired

Metric groupbys

formulastring

Formula for the alert

messagestringrequired

Alert message

creatorIDstring
companyIDstringrequired
prioritystringrequired

Priority of this alert

Allowed values:P0P1P2P3P4P5
alertThresholdnumberrequired
Constraints:format: double
warningThresholdnumber
Constraints:format: double
windowMsnumberrequired

How far back and how frequently a metric should be checked, in milliseconds

Constraints:format: double
evaluationDelayMsnumber

Delay before evaluating metrics, in milliseconds. Use 0 or null to clear.

Constraints:format: doublenullable
conditionstringrequired

Condition under which a metric change triggers an alert in milliseconds

Allowed values:greatergreater_or_equallessless_or_equalequalnot_equal
renotificationConditionsstring[]

Condition under which a re-notification is sent

renotificationWindowMsnumber

How long to wait before re-notifying in milliseconds

Constraints:format: double
renotificationMessagestring

Re-notification message

teamstring

Team associated with this alert

Constraints:nullable
ownerobject

Schema for owner data including ID, type, name.

Example:{"ownerID":"user123","ownerType":"USER","ownerName":"John Doe","ownerEmail":"owner123@test.com"}
Constraints:nullable
ownerIDstring

ID of the owner

Example:abc123
ownerTypestring

Type of the owner (e.g., SDK_KEY or USER)

Example:USER
ownerNamestring

The name of the owner. This field is optional.

Example:John Doe
ownerEmailstring

The email of the owner. This field is optional.

tagsstring[]required

Tags associated with this alert

statusstringrequired

Current evaluation status of the alert

Allowed values:alertsetup_incompletestablewarn
Constraints:nullable
lastTriggeredTimenumberrequired

Timestamp in milliseconds of the last time this alert triggered

Constraints:format: doublenullable
activeMuteSchedulesobject[]required

Active v2 mute schedules for this alert, for use as currentSchedule when remuting

startnumberrequired

Mute schedule start timestamp in seconds

endnumberrequired

Mute schedule end timestamp in seconds (0 means indefinite)

groupBysobject[]required

Group-by values covered by this mute schedule (empty means whole alert)

keystringrequired

Group-by property key

valuestringrequired

Group-by value to mute

403· Forbidden resource
statusnumberrequired
Allowed values:403
messagestringrequired
Allowed values:Forbidden resource
404· Not Found. The requested resource could not be found.
statusintegerrequired
Allowed values:404
messagestringrequired

Was this helpful?