Retrieve domain metadata
Public beta
Conversation Insights, including the APIs, is currently available as a public beta release and the information contained in this document is subject to change. 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 the Twilio Support Terms or Twilio Service Level Agreement.
Conversation Insights 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.
GET/v3/InsightsDomains/Conversations/Metadata
Base url: https://insights.twilio.com (base url)
Returns available cubes, measures, and dimensions for the Conversations domain.
successful operation
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 at twilio.com/console5// Provision API Keys at twilio.com/console/runtime/api-keys6// and set the environment variables. See http://twil.io/secure7// For local testing, you can use your Account SID and Auth token8const accountSid = process.env.TWILIO_ACCOUNT_SID;9const apiKey = process.env.TWILIO_API_KEY;10const apiSecret = process.env.TWILIO_API_SECRET;11const client = twilio(apiKey, apiSecret, { accountSid: accountSid });1213async function fetchMetadata() {14const metadata = await client.insights.v3.metadata.fetch();1516console.log(metadata.domain);17}1819fetchMetadata();
Response
1{2"cubes": [3{4"name": "name",5"description": "description",6"measures": [7{8"name": "name",9"description": "description",10"type": "type",11"aggregation": "aggregation"12}13],14"dimensions": [15{16"name": "name",17"description": "description",18"type": "type"19}20]21}22],23"domain": "Insights"24}