Body
Required
-
Friendly name for alarm
-
Type of query
Values are
ERROR_CODE
,LOG_LEVEL
, orALL
. -
Value to query for
-
Threshold to send customer alarm notification
-
Time window for alarm to trigger
Values are
FIVE_MINS
,FIFTEEN_MINS
,ONE_HOUR
,TWELVE_HOURS
, orONE_DAY
. -
Email notifications to send
-
Webhook notification to send
-
Whether to send console notifications
-
Description for the alarm.
-
Is alarm enbled? Default is true.
Default value is
true
.
PUT
/v2/Alarms/{Sid}
curl \
--request PUT 'https://monitor.twilio.com/v2/Alarms/{Sid}' \
--user "username:password" \
--header "Content-Type: application/json" \
--data '{"friendlyName":"string","queryType":"ERROR_CODE","query":"string","triggerValue":42,"timeWindow":"FIVE_MINS","email":["string"],"webhook":"string","consoleIndicator":true,"description":"string","enabled":true}'
Request examples
{
"friendlyName": "string",
"queryType": "ERROR_CODE",
"query": "string",
"triggerValue": 42,
"timeWindow": "FIVE_MINS",
"email": [
"string"
],
"webhook": "string",
"consoleIndicator": true,
"description": "string",
"enabled": true
}
Response examples (200)
# Headers
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: X-Custom-Header1, X-Custom-Header2
# Payload
{
"sid": "string"
}
Response examples (400)
# Headers
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: X-Custom-Header1, X-Custom-Header2
# Payload
{
"message": "string",
"code": 42,
"user_error": true,
"http_status_code": 42,
"params": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"more_info": "string",
"status": 42
}
Response examples (401)
# Headers
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: X-Custom-Header1, X-Custom-Header2
# Payload
{
"message": "string",
"code": 42,
"user_error": true,
"http_status_code": 42,
"params": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"more_info": "string",
"status": 42
}
Response examples (404)
# Headers
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: X-Custom-Header1, X-Custom-Header2
# Payload
{
"message": "string",
"code": 42,
"user_error": true,
"http_status_code": 42,
"params": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"more_info": "string",
"status": 42
}
Response examples (429)
# Headers
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: X-Custom-Header1, X-Custom-Header2
# Payload
{
"message": "string",
"code": 42,
"user_error": true,
"http_status_code": 42,
"params": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"more_info": "string",
"status": 42
}
Response examples (500)
# Headers
Access-Control-Allow-Origin: *
Access-Control-Allow-Methods: POST, OPTIONS
Access-Control-Allow-Headers: Content-Type, Authorization
Access-Control-Allow-Credentials: true
Access-Control-Expose-Headers: X-Custom-Header1, X-Custom-Header2
# Payload
{
"message": "string",
"code": 42,
"user_error": true,
"http_status_code": 42,
"params": {
"additionalProperty1": "string",
"additionalProperty2": "string"
},
"more_info": "string",
"status": 42
}