Skip to contentSkip to navigationSkip to topbar

On-demand Rule execution


(information)

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


Request

create-rule-execution-request page anchor

Authentication

authentication page anchor
Encoding type:application/json
Schema
Property nameTypeRequiredPIIDescriptionChild properties
intelligenceConfigurationIdstring
required
Not PII

The Intelligence Configuration identifier to execute the Rule within.

Example: intelligence_configuration_01k6fc25s7epm9qtk8rszbv3q5Pattern: ^intelligence_configuration_[0-7][0-9a-z]{25}$

ruleIdstring
required

The rule identifier to execute within the selected Intelligence Configuration.

Example: intelligence_configurationrule_01k6fc25s7epm9qtk8rszbv3q6Pattern: ^intelligence_configurationrule_[0-7][0-9a-z]{25}$

conversationIdstring
required

The Conversation identifier to execute the Rule against.

Example: conv_conversation_01k1etk2y5f1y9fpe2epfdtvv2Pattern: ^conv_conversation_[0-7][0-9a-z]{25}$

ruleobject

Optional

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.


202400404422429500

Rule execution queued.

On-demand Rule executionLink to code sample: On-demand Rule execution
1
// Download the helper library from https://www.twilio.com/docs/node/install
2
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
3
4
// Find your Account SID and Auth Token at twilio.com/console
5
// and set the environment variables. See http://twil.io/secure
6
const accountSid = process.env.TWILIO_ACCOUNT_SID;
7
const authToken = process.env.TWILIO_AUTH_TOKEN;
8
const client = twilio(accountSid, authToken);
9
10
async function createRuleExecution() {
11
const ruleExecution = await client.intelligence.v3.ruleExecutions.create({
12
intelligenceConfigurationId:
13
"intelligence_configuration_01k6fc25s7epm9qtk8rszbv3q5",
14
ruleId: "intelligence_configurationrule_01k6fc25s7epm9qtk8rszbv3q6",
15
conversationId: "conv_conversation_01k1etk2y5f1y9fpe2epfdtvv2",
16
});
17
18
console.log(ruleExecution);
19
}
20
21
createRuleExecution();