Flex alerts: Rules API (public beta)
Public beta
Alerts is currently available as a public beta product and the information contained in this document is subject to change. This means that some features are not yet implemented and others may be changed before the product is declared as generally available. Public beta products are not covered by a SLA.
Do not use Personally Identifiable Information (PII)
Avoid using a person's name, home address, email, phone number, or other PII in the rule_friendly_name field. Instead, use some form of pseudonymized identifier.
Learn more about how we process your data in our privacy policy.
All URLs referenced in this document have the following base:
https://flex-api.twilio.com
The InsightsRules resource manages alert rules and thresholds for your Flex instance.
POST /v1/Instances/{InstanceSid}/InsightsRules
Create an alert in your Flex instance.
To create an alert:
- If you want to use in-app notifications (optional), make a
GETrequest to/v1/Instances/{InstanceSid}/Users. See Flex Users resource to retrieve the list of users. - Make a
GETrequest to the TaskQueues resource to retrieve the TaskQueue SID. - Make a
GETrequest to the TaskChannels resource to retrieve the TaskChannel SID. - Create a notification configuration. Choose your notification method:
- For
in_appnotifications: Use the user SIDs from step 1 in therecipients.user_sidsarray. - For
webhooknotifications: Provide webhook URLs in theendpointsarray. - For
emailnotifications: Provide email addresses in theemail_recipientsarray.
- For
- Make a
POSTrequest to/v1/Instances/{InstanceSid}/InsightsRulesto create the alert. In the request body, use thettidfrom the notification configuration response (step 4) as the value fornotify_methods_id, and include the TaskQueue SID and TaskChannel SID from steps 2 and 3.
| Name | Type | Description | PII? |
|---|---|---|---|
| InstanceSid (required) | string | The unique SID identifier for the Flex Instance. 34 characters. Example: GO1234567890abcdef1234567890abcdef | Not PII |
Your Flex instance is the container that holds your Flex resources. You can find your Flex instance SID in Console on the Flex overview page.
Schema: application/json
| Name | Type | Description | PII? |
|---|---|---|---|
| rule_friendly_name (required) | string | The friendly name for the rule. | PII MTL: 30 days |
| metric_id (required) | string | The metric ID on which the Insights rule is based. Includes Active (Now), Waiting (Now), Available Agents (Now), Offline Agents (Now), Unavailable Agents (Now), Abandoned (30 min), Abandoned (Today), Accepted (30 min), Accepted (Today), Avg. Speed of Answer (Today), Avg. Handle Time (Today), Missed Invitations (30 min), Missed Invitations (Today), SLA (30 min), SLA (Today), Longest Available Agent (Now), and Longest (Now) | Not PII |
| task_channel_sid (required) | string | The SID of the task channel. | Not PII |
| task_queue_sids (required) | array of strings | Array of SIDs for queues to which the Insights Rule belongs. | Not PII |
| active (required) | boolean | Whether the rule is active or not. | Not PII |
| rule_thresholds (required) | array of objects | Array of threshold objects including: threshold_type ( Critical or Warning), threshold_operator (Greater Than or Lesser Than), threshold_value (integer) | Not PII |
| notify_enabled (required) | boolean | Whether notifications are enabled for the rule. | Not PII |
| notify_severity | string | The type of threshold. Criticalor Warning | Not PII |
| notify_duration | integer | The duration in milliseconds for which the notification should be sent. | Not PII |
| notify_methods_id | string | The TTID of the notification configuration that contains the notification methods to be used when sending a notification. | Not PII |
1{2"rule_friendly_name": "Waiting tasks now rule",3"metric_id": "Active (Now)",4"task_channel_sid": "string",5"task_queue_sids": [6"WQ00000000000000000000000000000001"7],8"active": true,9"rule_thresholds": [10{11"threshold_type": "Critical",12"threshold_operator": "Greater Than",13"threshold_value": 500014}15],16"notify_enabled": true,17"notify_severity": "Critical",18"notify_duration": 900000,19"notify_methods_id": "flex_notificationconfiguration_01jt2gntpafkt9671avqj50sq8"20}
| Name | Type | Description | PII? |
|---|---|---|---|
| Access-Control-Allow-Origin | string | Specify the origin(s) allowed to access the resource. Example: * | Not PII |
| Access-Control-Allow-Methods | string | Specify the HTTP methods allowed when accessing the resource. Example: POST | Not PII |
| Access-Control-Allow-Headers | string | Specify the headers allowed when accessing the resource. Example: Content-Type or Authorization | Not PII |
| Access-Control-Allow-Credentials | boolean | Indicates whether the browser should include credentials. | Not PII |
| Access-Control-Expose-Headers | string | Headers exposed to the client. Example: X-Custom-Header1, X-Custom-Header2 | Not PII |
Schema: application/json
| Name | Type | Description | PII? |
|---|---|---|---|
| url | string or null <uri> | The URL of this resource. | Not PII |
| sid | string or null. 34 characters | The Flex Insights alert rules ID. | Not PII |
| account_sid | string or null. 34 characters | The unique SID identifier of the account. | Not PII |
| instance_sid | string or null. 34 characters | The unique SID identifier of the instance. | Not PII |
| task_channel_sid | string or null. 34 characters | The task channel this rule applies to. | Not PII |
| task_queue_sids | array of strings or null. 34 characters | The task queues this rule applies to. | Not PII |
| rule_friendly_name | string or null | The friendly name of the rule. | PII MTL: 30 days |
| metric_id | string | The metric this rule is associated with. Includes Active (Now), Waiting (Now), Available Agents (Now), Offline Agents (Now), Unavailable Agents (Now), Abandoned (30 min), Abandoned (Today), Accepted (30 min), Accepted (Today), Avg. Speed of Answer (Today), Avg. Handle Time (Today), Missed Invitations (30 min), Missed Invitations (Today), SLA (30 min), SLA (Today), Longest Available Agent (Now) and Longest (Now) | Not PII |
| active | boolean or null | Whether the rule is currently active or not. | Not PII |
| rule_thresholds | any or null | The thresholds that trigger the rule. | Not PII |
| date_created | string or null <date-time> | The date and time in GMT when the resource was created specified in ISO 8601 format. | Not PII |
| date_updated | string or null <date-time> | The date and time in GMT when the resource was last updated specified in ISO 8601 format. | Not PII |
| notify_enabled | boolean or null | Whether notifications are enabled for this rule. | Not PII |
| notify_severity | string | The minimum severity level that will trigger a notification. Critical or Warning | Not PII |
| notify_duration | integer | The amount of time the threshold condition must be met before a notification is sent, in milliseconds. Default: 0 | Not PII |
| notify_methods_id | string or null | The SID of the notification configuration that contains the notification methods to be used when sending a notification. | Not PII |
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"instance_sid": "GOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"sid": "QYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"rule_friendly_name": "Waiting tasks now rule",6"metric_id": "Active (Now)",7"task_channel_sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",8"task_queue_sids": ["WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"],9"active": true,10"rule_thresholds": [11{12"threshold_type": "Critical",13"threshold_operator": "Greater Than",14"threshold_value": 500015}16],17"date_created": "2019-08-24T14:15:22Z",18"date_updated": "2019-08-24T14:15:22Z",19"notify_enabled": true,20"notify_severity": "Critical",21"notify_duration": 900000,22"notify_methods_id": "flex_notificationconfiguration_01jt2gntpafkt9671avqj50sq8",23"url": "https://flex-api.twilio.com/v1/Instances/{instanceSid}/InsightsRules/{sid}"24}
| Error code | Description |
|---|---|
| 400 | Bad Request. The request could not be understood or was missing required parameters. |
| 401 | Authorization Required. Authentication failed or user does not have permissions for the requested operation. |
| 500 | Internal Server Error. An error occurred with an internal server. |
GET /v1/Instances/{InstanceSid}/InsightsRules
Retrieve a list of alert rules for a Flex instance.
| Name | Type | Description | PII? |
|---|---|---|---|
| InstanceSid (required) | string | The unique SID identifier for the Flex Instance. 34 characters. Example: GO1234567890abcdef1234567890abcdef. | Not PII |
| Name | Type | Description | PII? |
|---|---|---|---|
| Active | boolean | Filter by whether the rule is active or not. Example: Active=true | Not PII |
| MetricId | array of strings | Filter rules by the metric id. Includes Active (Now), Waiting (Now), Available Agents (Now), Offline Agents (Now), Unavailable Agents (Now), Abandoned (30 min), Abandoned (Today), Accepted (30 min), Accepted (Today), Avg. Speed of Answer (Today), Avg. Handle Time (Today), Missed Invitations (30 min), Missed Invitations (Today), SLA (30 min), SLA (Today), Longest Available Agent (Now), and Longest (Now) | Not PII |
| TaskQueueSids | array of strings | Filter rules by the task queue sids. Example: TaskQueueSids=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa | Not PII |
| Sort | string | A comma-separated list of fields to sort by. Prepend a field with '-' to sort in descending order. Valid fields are: date_created, date_updated, rule_friendly_name, metric_id. Example: Sort=rule_friendly_name | Not PII |
| PageSize | integer | How many resources to return in each list page. The default is 50, and the maximum is 1000. | Not PII |
| Page | integer >= 0 | The page index. This value is simply for client state. | Not PII |
| PageToken | string | The page token. This is provided by the API. | Not PII |
| Name | Type | Description | PII? |
|---|---|---|---|
| Access-Control-Allow-Origin | string | Specify the origin(s) allowed to access the resource. Example: * | Not PII |
| Access-Control-Allow-Methods | string | Specify the HTTP methods allowed when accessing the resource. Example: POST | Not PII |
| Access-Control-Allow-Headers | string | Specify the headers allowed when accessing the resource. Example: Content-Type, Authorization | Not PII |
| Access-Control-Allow-Credentials | boolean | Indicates whether the browser should include credentials | Not PII |
| Access-Control-Expose-Headers | string | Headers exposed to the client. Example: X-Custom-Header1, X-Custom-Header2 | Not PII |
Schema: application/json
| Name | Type | Description | PII? |
|---|---|---|---|
| rules | array of objects | An array. | Not PII |
| url | string or null <uri> | The URL of this resource. | Not PII |
| sid | string or null. 34 characters | The Flex Insights alert rules ID. | Not PII |
| account_sid | string or null. 34 characters | The unique SID identifier of the Account. | Not PII |
| instance_sid | string or null. 34 characters | The unique SID identifier of the Instance. | Not PII |
| task_channel_sid | string or null. 34 characters | The task channel this rule applies to. | Not PII |
| task_queue_sids | array of strings or null | The task queues this rule applies to. | Not PII |
| rule_friendly_name | string or null | The friendly name of the rule. | PII MTL: 30 days |
| metric_id | string | The metric this rule is associated with. Includes Active (Now), Waiting (Now), Available Agents (Now), Offline Agents (Now), Unavailable Agents (Now), Abandoned (30 min), Abandoned (Today), Accepted (30 min), Accepted (Today), Avg. Speed of Answer (Today), Avg. Handle Time (Today), Missed Invitations (30 min), Missed Invitations (Today), SLA (30 min), SLA (Today), Longest Available Agent (Now), and Longest (Now) | Not PII |
| active | boolean or null | Whether the rule is currently active or not. | Not PII |
| rule_thresholds | any or null | The thresholds that trigger the rule. | Not PII |
| date_created | string or null <date-time> | The date and time in GMT when the resource was created specified in ISO 8601 format. | Not PII |
| date_updated | string or null <date-time> | The date and time in GMT when the resource was last updated specified in ISO 8601 format. | Not PII |
| notify_enabled | boolean or null | Whether notifications are enabled for this rule. | Not PII |
| notify_severity | string | The minimum severity level that will trigger a notification. Critical, Warning | Not PII |
| notify_duration | integer | The amount of time the threshold condition must be met before a notification is sent, in milliseconds. Default: 0 | Not PII |
| notify_methods_id | string or null | The SID of the Notification Configuration that contains the notification methods to be used when sending a notification. | Not PII |
| meta | object | Pagination metadata containing navigation URLs and page information. | Not PII |
| first_page_url | string <uri> | The URL to retrieve the first page of results. | Not PII |
| key | string | The key name for the main data array in the response. | Not PII |
| next_page_url | string or null <uri> | The URL to retrieve the next page of results. null if this is the last page. | Not PII |
| page | integer | The current page number (0-indexed). | Not PII |
| page_size | integer | The number of resources returned in this page. | Not PII |
| previous_page_url | string or null <uri> | The URL to retrieve the previous page of results. null if this is the first page. | Not PII |
| url | string <uri> | The URL of the current request. | Not PII |
1{2"meta": {3"page": 0,4"page_size": 50,5"first_page_url": "https://flex-api.twilio.com/v1/Instances/GOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/InsightsRules?Active=true&Sort=rule_friendly_name&TaskQueueSids=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",6"previous_page_url": null,7"url": "https://flex-api.twilio.com/v1/Instances/GOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/InsightsRules?Active=true&Sort=rule_friendly_name&TaskQueueSids=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&PageSize=50&Page=0",8"next_page_url": null,9"key": "rules"10},11"rules": [12{13"sid": "QYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",14"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",15"instance_sid": "GOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",16"rule_friendly_name": "Waiting tasks now rule",17"metric_id": "Active (Now)",18"task_channel_sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",19"task_queue_sids": [20"WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"21],22"active": true,23"rule_thresholds": [24{25"threshold_type": "Critical",26"threshold_operator": "Greater Than",27"threshold_value": 500028}29],30"date_created": "2019-08-24T14:15:22Z",31"date_updated": "2019-08-24T14:15:22Z",32"notify_enabled": true,33"notify_severity": "Critical",34"notify_duration": 900000,35"notify_methods_id": "flex_notificationconfiguration_01jt2gntpafkt9671avqj50sq8",36"url": "https://flex-api.twilio.com/v1/Instances/{instanceSid}/InsightsRules/{sid}"37}38]39}
| Error code | Description |
|---|---|
| 400 | Bad Request. The request could not be understood or was missing required parameters. |
| 401 | Authorization Required. Authentication failed or user does not have permissions for the requested operation. |
| 500 | Internal Server Error. An error occurred with an internal server. |
GET /v1/Instances/{InstanceSid}/InsightsRules/{Sid}
Retrieve a specific Flex alert rule.
To fetch a specific Flex alert rule:
- Make a
GETrequest to/v1/Instances/{InstanceSid}/InsightsRules/{Sid}endpoint. - Use the
notify_methods_idfrom the response to make a request to Fetch notification configuration to view the notification settings.
| Name | Type | Description | PII? |
|---|---|---|---|
| InstanceSid (required) | string | The unique SID identifier for the Flex Instance. 34 characters. Example: GO1234567890abcdef1234567890abcdef | Not PII |
| Sid (required) | string | The SID that identifies the Flex Insights alert rule to update. 34 characters. | Not PII |
| Name | Type | Description | PII? |
|---|---|---|---|
| Access-Control-Allow-Origin | string | Specify the origin(s) allowed to access the resource. Example: * | Not PII |
| Access-Control-Allow-Methods | string | Specify the HTTP methods allowed when accessing the resource. Example: POST | Not PII |
| Access-Control-Allow-Headers | string | Specify the headers allowed when accessing the resource. Example: Content-Type or Authorization | Not PII |
| Access-Control-Allow-Credentials | boolean | Indicates whether the browser should include credentials | Not PII |
| Access-Control-Expose-Headers | string | Headers exposed to the client. Example: X-Custom-Header1, X-Custom-Header2 | Not PII |
Schema: application/json
| Name | Type | Description | PII? |
|---|---|---|---|
| url | string or null <uri> | The URL of this resource. | Not PII |
| sid | string or null. 34 characters | The Flex Insights alert rules ID. | Not PII |
| account_sid | string or null. 34 characters | The unique SID identifier of the Account. | Not PII |
| instance_sid | string or null. 34 characters | The unique SID identifier of the Instance. | Not PII |
| task_channel_sid | string or null. 34 characters | The task channel this rule applies to. | Not PII |
| task_queue_sids | array of strings or null | The task queues this rule applies to. | Not PII |
| rule_friendly_name | string or null | The friendly name of the rule. | PII MTL: 30 days |
| metric_id | string | The metric this rule is associated with. Includes Active (Now), Waiting (Now), Available Agents (Now), Offline Agents (Now), Unavailable Agents (Now), Abandoned (30 min), Abandoned (Today), Accepted (30 min), Accepted (Today), Avg. Speed of Answer (Today), Avg. Handle Time (Today), Missed Invitations (30 min), Missed Invitations (Today), SLA (30 min), SLA (Today), Longest Available Agent (Now), and Longest (Now) | Not PII |
| active | boolean or null | Whether the rule is currently active or not. | Not PII |
| rule_thresholds | any or null | The thresholds that trigger the rule. | Not PII |
| date_created | string or null <date-time> | The date and time in GMT when the resource was created specified in ISO 8601 format. | Not PII |
| date_updated | string or null <date-time> | The date and time in GMT when the resource was last updated specified in ISO 8601 format. | Not PII |
| notify_enabled | boolean or null | Whether notifications are enabled for this rule. | Not PII |
| notify_severity | string | The minimum severity level that will trigger a notification. Critical or Warning | Not PII |
| notify_duration | integer | The amount of time the threshold condition must be met before a notification is sent, in milliseconds. Default: 0 | Not PII |
| notify_methods_id | string or null | The SID of the notification configuration that contains the notification methods to be used when sending a notification. | Not PII |
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"instance_sid": "GOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"sid": "QYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"rule_friendly_name": "Waiting tasks now rule",6"metric_id": "Active (Now)",7"task_channel_sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",8"task_queue_sids": [9"WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"10],11"active": true,12"rule_thresholds": [13{14"threshold_type": "Critical",15"threshold_operator": "Greater Than",16"threshold_value": 500017}18],19"date_created": "2019-08-24T14:15:22Z",20"date_updated": "2019-08-24T14:15:22Z",21"notify_enabled": true,22"notify_severity": "Critical",23"notify_duration": 900000,24"notify_methods_id": "flex_notificationconfiguration_01jt2gntpafkt9671avqj50sq8",25"url": "https://flex-api.twilio.com/v1/Instances/{instanceSid}/InsightsRules/{sid}"26}
POST /v1/Instances/{InstanceSid}/InsightsRules/{Sid}
To update a specific Flex alert rule:
- Make a
GETrequest to/v1/Instances/{InstanceSid}/InsightsRules/{Sid}to retrieve the alert you want to update. - Update the alert. Make a
POSTrequest to/v1/Instances/{InstanceSid}/InsightsRules/{Sid}to update the alert details. - (Optional) To update the notification configuration, use the
notify_methods_idfrom the alert response and make a request to Edit Notification configuration.
| Name | Type | Description | PII? |
|---|---|---|---|
| InstanceSid (required) | string | The unique SID identifier for the Flex Instance. 34 characters. Example: GO1234567890abcdef1234567890abcdef. | Not PII |
| Sid (required) | string | The SID that identifies the Flex Insights alert rule to update. 34 characters. | Not PII |
Schema: application/json
| Name | Type | Description | PII? |
|---|---|---|---|
| rule_friendly_name (required) | string | The friendly name for the rule. | PII MTL: 30 days |
| metric_id (required) | string | The metric id on which the Insights rule is based. Includes Active (Now), Waiting (Now), Available Agents (Now), Offline Agents (Now), Unavailable Agents (Now), Abandoned (30 min), Abandoned (Today), Accepted (30 min), Accepted (Today), Avg. Speed of Answer (Today), Avg. Handle Time (Today), Missed Invitations (30 min), Missed Invitations (Today), SLA (30 min), SLA (Today), Longest Available Agent (Now), and Longest (Now) | Not PII |
| task_channel_sid (required) | string | The SID of the task channel. | Not PII |
| task_queue_sids (required) | array of strings | The array of SIDs for queues to which the Insights rule belongs. | Not PII |
| active (required) | boolean | Whether the rule is active or not. | Not PII |
| rule_thresholds (required) | array of objects | An array of threshold objects including: threshold_type (Critical or Warning), threshold_operator (Greater Than or Lesser Than), threshold_value (integer) | Not PII |
| notify_enabled (required) | boolean | Whether notifications are enabled for the rule. | Not PII |
| notify_severity | string | The type of threshold we are defining. Critical or Warning | Not PII |
| notify_duration | integer | The duration in milliseconds for which the notification should be sent. | Not PII |
| notify_methods_id | string | The TTID of the notification configuration that contains the notification methods to be used when sending a notification. | Not PII |
1{2"rule_friendly_name": "Waiting tasks now rule",3"metric_id": "Active (Now)",4"task_channel_sid": "string",5"task_queue_sids": [6"WQ00000000000000000000000000000001"7],8"active": true,9"rule_thresholds": [10{11"threshold_type": "Critical",12"threshold_operator": "Greater Than",13"threshold_value": 500014}15],16"notify_enabled": true,17"notify_severity": "Critical",18"notify_duration": 900000,19"notify_methods_id": "flex_notificationconfiguration_01jt2gntpafkt9671avqj50sq8"20}
| Name | Type | Description | PII? |
|---|---|---|---|
| Access-Control-Allow-Origin | string | Specify the origin(s) allowed to access the resource. Example: * | Not PII |
| Access-Control-Allow-Methods | string | Specify the HTTP methods allowed when accessing the resource. Example: POST | Not PII |
| Access-Control-Allow-Headers | string | Specify the headers allowed when accessing the resource. Example: Content-Type, Authorization | Not PII |
| Access-Control-Allow-Credentials | boolean | Indicates whether the browser should include credentials | Not PII |
| Access-Control-Expose-Headers | string | Headers exposed to the client. Example: X-Custom-Header1, X-Custom-Header2 | Not PII |
Schema: application/json
| Name | Type | Description | PII? |
|---|---|---|---|
| url | string or null <uri> | The URL of this resource. | Not PII |
| sid | string or null. 34 characters | The Flex Insights alert rules ID. | Not PII |
| account_sid | string or null. 34 characters | The unique SID identifier of the Account. | Not PII |
| instance_sid | string or null. 34 characters | The unique SID identifier of the Instance. | Not PII |
| task_channel_sid | string or null. 34 characters | The task channel this rule applies to. | Not PII |
| task_queue_sids | Array of strings or null | The task queues this rule applies to. | Not PII |
| rule_friendly_name | string or null | The friendly name of the rule. | PII MTL: 30 days |
| metric_id | string | The metric this rule is associated with. Includes Active (Now), Waiting (Now), Available Agents (Now), Offline Agents (Now), Unavailable Agents (Now), Abandoned (30 min), Abandoned (Today), Accepted (30 min), Accepted (Today), Avg. Speed of Answer (Today), Avg. Handle Time (Today), Missed Invitations (30 min), Missed Invitations (Today), SLA (30 min), SLA (Today), Longest Available Agent (Now), and Longest (Now) | Not PII |
| active | boolean or null | Whether the rule is currently active or not. | Not PII |
| rule_thresholds | any or null | The thresholds that trigger the rule. | Not PII |
| date_created | string or null <date-time> | The date and time in GMT when the resource was created specified in ISO 8601 format. | Not PII |
| date_updated | string or null <date-time> | The date and time in GMT when the resource was last updated specified in ISO 8601 format. | Not PII |
| notify_enabled | boolean or null | Whether notifications are enabled for this rule. | Not PII |
| notify_severity | string | The minimum severity level that will trigger a notification. Critical or Warning | Not PII |
| notify_duration | integer | The amount of time the threshold condition must be met before a notification is sent, in milliseconds. Default: 0 | Not PII |
| notify_methods_id | string or null | The SID of the notification configuration that contains the notification methods to be used when sending a notification. | Not PII |
1{2"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",3"instance_sid": "GOaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",4"sid": "QYaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",5"rule_friendly_name": "Waiting tasks now rule",6"metric_id": "Active (Now)",7"task_channel_sid": "TCaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",8"task_queue_sids": ["WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"],9"active": true,10"rule_thresholds": [11{12"threshold_type": "Critical",13"threshold_operator": "Greater Than",14"threshold_value": 500015}16],17"date_created": "2019-08-24T14:15:22Z",18"date_updated": "2019-08-24T14:15:22Z",19"notify_enabled": true,20"notify_severity": "Critical",21"notify_duration": 900000,22"notify_methods_id": "flex_notificationconfiguration_01jt2gntpafkt9671avqj50sq8",23"url": "https://flex-api.twilio.com/v1/Instances/{instanceSid}/InsightsRules/{sid}"24}
| Error code | Description |
|---|---|
| 400 | Bad Request. The request could not be understood or was missing required parameters. |
| 401 | Authorization Required. Authentication failed or user does not have permissions for the requested operation. |
| 500 | Internal Server Error. An error occurred with an internal server. |
DELETE /v1/Instances/{InstanceSid}/InsightsRules/{Sid}
- Make a
GETrequest to/v1/Instances/{InstanceSid}/InsightsRules/{Sid}to retrieve the alert you want to delete. - Delete the notification configuration using the retrieved
notify_methods_id. Make a request to Delete notification configuration to delete the notification configuration. - Make a
DELETErequest to/v1/Instances/{InstanceSid}/InsightsRules/{Sid}to delete the alert.
| Name | Type | Description | PII? |
|---|---|---|---|
| InstanceSid (required) | string | The unique SID identifier for the Flex Instance. 34 characters. Example: GO1234567890abcdef1234567890abcdef | Not PII |
| Sid (required) | string | The SID that identifies the Flex Insights alert rule to update. 34 characters. | Not PII |
Status: 204 The resource was deleted successfully.