On-demand Rule execution
Legal information
Conversation Intelligence, including the APIs, may use artificial intelligence or machine learning technologies and is subject to the terms of the Predictive and Generative AI/ML Features Addendum. For more details on AI usage and data, see AI Nutrition Facts for Conversation Intelligence.
Conversation Intelligence is not PCI compliant or a HIPAA Eligible Service and should not be used in workflows that are subject to HIPAA or PCI.
Conversations products are only available in the new Twilio Console. If your account hasn't been migrated, you'll be redirected to the legacy Console where these products won't appear.
POST/v3/RuleExecutions
Base url: https://intelligence.twilio.com (Twilio Intelligence API)
Resolves the given configuration, rule, and conversation, derives the memoryStoreId from the conversation's configuration. Then executes the rule on the conversation. Optionally, rule.operators[] can be provided to override specific operator parameters for this execution only; the stored rule configuration is not modified.
application/jsonThe Intelligence Configuration identifier to execute the Rule within.
intelligence_configuration_01k6fc25s7epm9qtk8rszbv3q5Pattern: ^intelligence_configuration_[0-7][0-9a-z]{25}$The rule identifier to execute within the selected Intelligence Configuration.
intelligence_configurationrule_01k6fc25s7epm9qtk8rszbv3q6Pattern: ^intelligence_configurationrule_[0-7][0-9a-z]{25}$The Conversation identifier to execute the Rule against.
conv_conversation_01k1etk2y5f1y9fpe2epfdtvv2Pattern: ^conv_conversation_[0-7][0-9a-z]{25}$Optional per-execution overrides applied to the stored rule before execution. When omitted, the stored rule executes unchanged. Only operators[].parameters is overridable; any other field is not part of this schema and is ignored.
Rule execution queued.
1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function createRuleExecution() {11const ruleExecution = await client.intelligence.v3.ruleExecutions.create({12intelligenceConfigurationId:13"intelligence_configuration_01k6fc25s7epm9qtk8rszbv3q5",14ruleId: "intelligence_configurationrule_01k6fc25s7epm9qtk8rszbv3q6",15conversationId: "conv_conversation_01k1etk2y5f1y9fpe2epfdtvv2",16});1718console.log(ruleExecution);19}2021createRuleExecution();