Skip to contentSkip to navigationSkip to topbar
Page toolsOn this page
Looking for more inspiration?Visit the

Flex alerts: Rules API (public beta)


(new)

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.

(warning)

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(link takes you to an external page).


Base URL

base-url page anchor

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:

  1. If you want to use in-app notifications (optional), make a GET request to /v1/Instances/{InstanceSid}/Users. See Flex Users resource to retrieve the list of users.
  2. Make a GET request to the TaskQueues resource to retrieve the TaskQueue SID.
  3. Make a GET request to the TaskChannels resource to retrieve the TaskChannel SID.
  4. Create a notification configuration. Choose your notification method:
    • For in_app notifications: Use the user SIDs from step 1 in the recipients.user_sids array.
    • For webhook notifications: Provide webhook URLs in the endpoints array.
    • For email notifications: Provide email addresses in the email_recipients array.
  5. Make a POST request to /v1/Instances/{InstanceSid}/InsightsRules to create the alert. In the request body, use the ttid from the notification configuration response (step 4) as the value for notify_methods_id, and include the TaskQueue SID and TaskChannel SID from steps 2 and 3.

Path parameter

path-parameter page anchor
NameTypeDescriptionPII?
InstanceSid (required)stringThe unique SID identifier for the Flex Instance. 34 characters. Example: GO1234567890abcdef1234567890abcdefNot 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(link takes you to an external page) page.

Schema: application/json

NameTypeDescriptionPII?
rule_friendly_name (required)stringThe friendly name for the rule.PII MTL: 30 days
metric_id (required)stringThe 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)stringThe SID of the task channel.Not PII
task_queue_sids (required)array of stringsArray of SIDs for queues to which the Insights Rule belongs.Not PII
active (required)booleanWhether the rule is active or not.Not PII
rule_thresholds (required)array of objectsArray of threshold objects including: threshold_type ( Critical or Warning), threshold_operator (Greater Than or Lesser Than), threshold_value (integer)Not PII
notify_enabled (required)booleanWhether notifications are enabled for the rule.Not PII
notify_severitystringThe type of threshold. Criticalor WarningNot PII
notify_durationintegerThe duration in milliseconds for which the notification should be sent.Not PII
notify_methods_idstringThe 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": 5000
14
}
15
],
16
"notify_enabled": true,
17
"notify_severity": "Critical",
18
"notify_duration": 900000,
19
"notify_methods_id": "flex_notificationconfiguration_01jt2gntpafkt9671avqj50sq8"
20
}
NameTypeDescriptionPII?
Access-Control-Allow-OriginstringSpecify the origin(s) allowed to access the resource. Example: *Not PII
Access-Control-Allow-MethodsstringSpecify the HTTP methods allowed when accessing the resource. Example: POSTNot PII
Access-Control-Allow-HeadersstringSpecify the headers allowed when accessing the resource. Example: Content-Type or AuthorizationNot PII
Access-Control-Allow-CredentialsbooleanIndicates whether the browser should include credentials.Not PII
Access-Control-Expose-HeadersstringHeaders exposed to the client. Example: X-Custom-Header1, X-Custom-Header2Not PII

Schema: application/json

NameTypeDescriptionPII?
urlstring or null <uri>The URL of this resource.Not PII
sidstring or null. 34 charactersThe Flex Insights alert rules ID.Not PII
account_sidstring or null. 34 charactersThe unique SID identifier of the account.Not PII
instance_sidstring or null. 34 charactersThe unique SID identifier of the instance.Not PII
task_channel_sidstring or null. 34 charactersThe task channel this rule applies to.Not PII
task_queue_sidsarray of strings or null. 34 charactersThe task queues this rule applies to.Not PII
rule_friendly_namestring or nullThe friendly name of the rule.PII MTL: 30 days
metric_idstringThe 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
activeboolean or nullWhether the rule is currently active or not.Not PII
rule_thresholdsany or nullThe thresholds that trigger the rule.Not PII
date_createdstring or null <date-time>The date and time in GMT when the resource was created specified in ISO 8601 format.Not PII
date_updatedstring or null <date-time>The date and time in GMT when the resource was last updated specified in ISO 8601 format.Not PII
notify_enabledboolean or nullWhether notifications are enabled for this rule.Not PII
notify_severitystringThe minimum severity level that will trigger a notification. Critical or WarningNot PII
notify_durationintegerThe amount of time the threshold condition must be met before a notification is sent, in milliseconds. Default: 0Not PII
notify_methods_idstring or nullThe 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": 5000
15
}
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 codeDescription
400Bad Request. The request could not be understood or was missing required parameters.
401Authorization Required. Authentication failed or user does not have permissions for the requested operation.
500Internal Server Error. An error occurred with an internal server.

GET /v1/Instances/{InstanceSid}/InsightsRules

Retrieve a list of alert rules for a Flex instance.

NameTypeDescriptionPII?
InstanceSid (required)stringThe unique SID identifier for the Flex Instance. 34 characters. Example: GO1234567890abcdef1234567890abcdef.Not PII
NameTypeDescriptionPII?
ActivebooleanFilter by whether the rule is active or not. Example: Active=trueNot PII
MetricIdarray of stringsFilter 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
TaskQueueSidsarray of stringsFilter rules by the task queue sids. Example: TaskQueueSids=WQaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaNot PII
SortstringA 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_nameNot PII
PageSizeintegerHow many resources to return in each list page. The default is 50, and the maximum is 1000.Not PII
Pageinteger >= 0The page index. This value is simply for client state.Not PII
PageTokenstringThe page token. This is provided by the API.Not PII
NameTypeDescriptionPII?
Access-Control-Allow-OriginstringSpecify the origin(s) allowed to access the resource. Example: *Not PII
Access-Control-Allow-MethodsstringSpecify the HTTP methods allowed when accessing the resource. Example: POSTNot PII
Access-Control-Allow-HeadersstringSpecify the headers allowed when accessing the resource. Example: Content-Type, AuthorizationNot PII
Access-Control-Allow-CredentialsbooleanIndicates whether the browser should include credentialsNot PII
Access-Control-Expose-HeadersstringHeaders exposed to the client. Example: X-Custom-Header1, X-Custom-Header2Not PII

Schema: application/json

NameTypeDescriptionPII?
rulesarray of objectsAn array.Not PII
urlstring or null <uri>The URL of this resource.Not PII
sidstring or null. 34 charactersThe Flex Insights alert rules ID.Not PII
account_sidstring or null. 34 charactersThe unique SID identifier of the Account.Not PII
instance_sidstring or null. 34 charactersThe unique SID identifier of the Instance.Not PII
task_channel_sidstring or null. 34 charactersThe task channel this rule applies to.Not PII
task_queue_sidsarray of strings or nullThe task queues this rule applies to.Not PII
rule_friendly_namestring or nullThe friendly name of the rule.PII MTL: 30 days
metric_idstringThe 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
activeboolean or nullWhether the rule is currently active or not.Not PII
rule_thresholdsany or nullThe thresholds that trigger the rule.Not PII
date_createdstring or null <date-time>The date and time in GMT when the resource was created specified in ISO 8601 format.Not PII
date_updatedstring or null <date-time>The date and time in GMT when the resource was last updated specified in ISO 8601 format.Not PII
notify_enabledboolean or nullWhether notifications are enabled for this rule.Not PII
notify_severitystringThe minimum severity level that will trigger a notification. Critical, WarningNot PII
notify_durationintegerThe amount of time the threshold condition must be met before a notification is sent, in milliseconds. Default: 0Not PII
notify_methods_idstring or nullThe SID of the Notification Configuration that contains the notification methods to be used when sending a notification.Not PII
metaobjectPagination metadata containing navigation URLs and page information.Not PII
first_page_urlstring <uri>The URL to retrieve the first page of results.Not PII
keystringThe key name for the main data array in the response.Not PII
next_page_urlstring or null <uri>The URL to retrieve the next page of results. null if this is the last page.Not PII
pageintegerThe current page number (0-indexed).Not PII
page_sizeintegerThe number of resources returned in this page.Not PII
previous_page_urlstring or null <uri>The URL to retrieve the previous page of results. null if this is the first page.Not PII
urlstring <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": 5000
28
}
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 codeDescription
400Bad Request. The request could not be understood or was missing required parameters.
401Authorization Required. Authentication failed or user does not have permissions for the requested operation.
500Internal Server Error. An error occurred with an internal server.

Fetch a specific Flex alert rule

fetch-a-specific-flex-alert-rule page anchor

GET /v1/Instances/{InstanceSid}/InsightsRules/{Sid}

Retrieve a specific Flex alert rule.

To fetch a specific Flex alert rule:

  1. Make a GET request to /v1/Instances/{InstanceSid}/InsightsRules/{Sid} endpoint.
  2. Use the notify_methods_id from the response to make a request to Fetch notification configuration to view the notification settings.
NameTypeDescriptionPII?
InstanceSid (required)stringThe unique SID identifier for the Flex Instance. 34 characters. Example: GO1234567890abcdef1234567890abcdefNot PII
Sid (required)stringThe SID that identifies the Flex Insights alert rule to update. 34 characters.Not PII
NameTypeDescriptionPII?
Access-Control-Allow-OriginstringSpecify the origin(s) allowed to access the resource. Example: *Not PII
Access-Control-Allow-MethodsstringSpecify the HTTP methods allowed when accessing the resource. Example: POSTNot PII
Access-Control-Allow-HeadersstringSpecify the headers allowed when accessing the resource. Example: Content-Type or AuthorizationNot PII
Access-Control-Allow-CredentialsbooleanIndicates whether the browser should include credentialsNot PII
Access-Control-Expose-HeadersstringHeaders exposed to the client. Example: X-Custom-Header1, X-Custom-Header2Not PII

Schema: application/json

NameTypeDescriptionPII?
urlstring or null <uri>The URL of this resource.Not PII
sidstring or null. 34 charactersThe Flex Insights alert rules ID.Not PII
account_sidstring or null. 34 charactersThe unique SID identifier of the Account.Not PII
instance_sidstring or null. 34 charactersThe unique SID identifier of the Instance.Not PII
task_channel_sidstring or null. 34 charactersThe task channel this rule applies to.Not PII
task_queue_sidsarray of strings or nullThe task queues this rule applies to.Not PII
rule_friendly_namestring or nullThe friendly name of the rule.PII MTL: 30 days
metric_idstringThe 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
activeboolean or nullWhether the rule is currently active or not.Not PII
rule_thresholdsany or nullThe thresholds that trigger the rule.Not PII
date_createdstring or null <date-time>The date and time in GMT when the resource was created specified in ISO 8601 format.Not PII
date_updatedstring or null <date-time>The date and time in GMT when the resource was last updated specified in ISO 8601 format.Not PII
notify_enabledboolean or nullWhether notifications are enabled for this rule.Not PII
notify_severitystringThe minimum severity level that will trigger a notification. Critical or WarningNot PII
notify_durationintegerThe amount of time the threshold condition must be met before a notification is sent, in milliseconds. Default: 0Not PII
notify_methods_idstring or nullThe 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": 5000
17
}
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:

  1. Make a GET request to /v1/Instances/{InstanceSid}/InsightsRules/{Sid} to retrieve the alert you want to update.
  2. Update the alert. Make a POST request to /v1/Instances/{InstanceSid}/InsightsRules/{Sid} to update the alert details.
  3. (Optional) To update the notification configuration, use the notify_methods_id from the alert response and make a request to Edit Notification configuration.
NameTypeDescriptionPII?
InstanceSid (required)stringThe unique SID identifier for the Flex Instance. 34 characters. Example: GO1234567890abcdef1234567890abcdef.Not PII
Sid (required)stringThe SID that identifies the Flex Insights alert rule to update. 34 characters.Not PII

Schema: application/json

NameTypeDescriptionPII?
rule_friendly_name (required)stringThe friendly name for the rule.PII MTL: 30 days
metric_id (required)stringThe 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)stringThe SID of the task channel.Not PII
task_queue_sids (required)array of stringsThe array of SIDs for queues to which the Insights rule belongs.Not PII
active (required)booleanWhether the rule is active or not.Not PII
rule_thresholds (required)array of objectsAn 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)booleanWhether notifications are enabled for the rule.Not PII
notify_severitystringThe type of threshold we are defining. Critical or WarningNot PII
notify_durationintegerThe duration in milliseconds for which the notification should be sent.Not PII
notify_methods_idstringThe 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": 5000
14
}
15
],
16
"notify_enabled": true,
17
"notify_severity": "Critical",
18
"notify_duration": 900000,
19
"notify_methods_id": "flex_notificationconfiguration_01jt2gntpafkt9671avqj50sq8"
20
}
NameTypeDescriptionPII?
Access-Control-Allow-OriginstringSpecify the origin(s) allowed to access the resource. Example: *Not PII
Access-Control-Allow-MethodsstringSpecify the HTTP methods allowed when accessing the resource. Example: POSTNot PII
Access-Control-Allow-HeadersstringSpecify the headers allowed when accessing the resource. Example: Content-Type, AuthorizationNot PII
Access-Control-Allow-CredentialsbooleanIndicates whether the browser should include credentialsNot PII
Access-Control-Expose-HeadersstringHeaders exposed to the client. Example: X-Custom-Header1, X-Custom-Header2Not PII

Schema: application/json

NameTypeDescriptionPII?
urlstring or null <uri>The URL of this resource.Not PII
sidstring or null. 34 charactersThe Flex Insights alert rules ID.Not PII
account_sidstring or null. 34 charactersThe unique SID identifier of the Account.Not PII
instance_sidstring or null. 34 charactersThe unique SID identifier of the Instance.Not PII
task_channel_sidstring or null. 34 charactersThe task channel this rule applies to.Not PII
task_queue_sidsArray of strings or nullThe task queues this rule applies to.Not PII
rule_friendly_namestring or nullThe friendly name of the rule.PII MTL: 30 days
metric_idstringThe 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
activeboolean or nullWhether the rule is currently active or not.Not PII
rule_thresholdsany or nullThe thresholds that trigger the rule.Not PII
date_createdstring or null <date-time>The date and time in GMT when the resource was created specified in ISO 8601 format.Not PII
date_updatedstring or null <date-time>The date and time in GMT when the resource was last updated specified in ISO 8601 format.Not PII
notify_enabledboolean or nullWhether notifications are enabled for this rule.Not PII
notify_severitystringThe minimum severity level that will trigger a notification. Critical or WarningNot PII
notify_durationintegerThe amount of time the threshold condition must be met before a notification is sent, in milliseconds. Default: 0Not PII
notify_methods_idstring or nullThe 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": 5000
15
}
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 codeDescription
400Bad Request. The request could not be understood or was missing required parameters.
401Authorization Required. Authentication failed or user does not have permissions for the requested operation.
500Internal Server Error. An error occurred with an internal server.

DELETE /v1/Instances/{InstanceSid}/InsightsRules/{Sid}

  1. Make a GET request to /v1/Instances/{InstanceSid}/InsightsRules/{Sid} to retrieve the alert you want to delete.
  2. Delete the notification configuration using the retrieved notify_methods_id. Make a request to Delete notification configuration to delete the notification configuration.
  3. Make a DELETE request to /v1/Instances/{InstanceSid}/InsightsRules/{Sid} to delete the alert.
NameTypeDescriptionPII?
InstanceSid (required)stringThe unique SID identifier for the Flex Instance. 34 characters. Example: GO1234567890abcdef1234567890abcdefNot PII
Sid (required)stringThe SID that identifies the Flex Insights alert rule to update. 34 characters.Not PII

Status: 204 The resource was deleted successfully.