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
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. Note that if Entity is created by CONSOLE API, owner will be undefined.

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.

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
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. Note that if Entity is created by CONSOLE API, owner will be undefined.

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
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?