Register a custom measure field mapping
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.
POST/v3/ControlPlane/ConversationInsights/CustomFieldMappings
Base url: https://insights.twilio.com (base url)
Registers a custom field for an account under a category, sourced from an
upstream entity — selected via the entityMetadata.sourceType
discriminator, which determines the required shape of entityMetadata.
Only the MEASURE category is supported for now.
For sources with a resolvable field-path concept, validates that
entityMetadata.field resolves on the entity's latest active version by
calling that source's own resolution API (the Intelligence fetch-operator
API for sourceType: INTELLIGENCE_OPERATOR), then performs an idempotent
upsert keyed on (accountSid, category, name).
entityMetadata.sourceType plus that variant's own identity field
(operatorId for INTELLIGENCE_OPERATOR) must match the existing
registration's owner for the upsert to succeed — a mismatch returns
409. Enforces the per-account, per-category capacity limit.
application/jsonThe type of field being registered. Only MEASURE is supported.
MEASURECustomer-facing name for the field; becomes the ClickHouse Map key and
the platform field alias. Unique per account across every
sourceType — the Map key namespace is account-global.
LeadScorePattern: ^[A-Za-z0-9_]+$Optional, free-text description of this custom field mapping. Display-only — not part of any uniqueness check.
Lead quality score derived from sentiment analysisMax length: 150Reference to the upstream entity that sources this field. Shape is
selected by the sourceType discriminator and owned by that upstream, not
by this API — adding a new upstream means adding a variant here, not
changing the request shape.
Every variant carries sourceType via EntityMetadataBase, so a client
that does not recognise a newly added variant can still deserialize the
common fields rather than failing outright.
The owner check for idempotent upserts is scoped to sourceType plus that
variant's own identity field (operatorId for INTELLIGENCE_OPERATOR); a
mismatch against an existing registration's owner returns 409.
The name was already registered for this operator and was updated in-place.
TTID for conversation insights custom field mapping
convinsights_mapping_01m31967b7em08vh1pqgbam3mjThe type of field being registered. Only MEASURE is supported.
MEASUREOptional, free-text description supplied at registration time. Display-only — not part of any uniqueness check.
Lead quality score derived from sentiment analysisMax length: 150Reference to the upstream entity that sources this field. Shape is
selected by the sourceType discriminator and owned by that upstream, not
by this API — adding a new upstream means adding a variant here, not
changing the request shape.
Every variant carries sourceType via EntityMetadataBase, so a client
that does not recognise a newly added variant can still deserialize the
common fields rather than failing outright.
The owner check for idempotent upserts is scoped to sourceType plus that
variant's own identity field (operatorId for INTELLIGENCE_OPERATOR); a
mismatch against an existing registration's owner returns 409.
When the mapping was registered.
2026-08-13T14:30:00ZWhen the mapping was last materially modified in-place. Null until the first update-in-place.
2026-08-13T14:30:00Z1// 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 createCustomFieldMapping() {11const customFieldMapping =12await client.insights.v3.customFieldMappings.create({13category: "MEASURE",14name: "LeadScore",15description: "Lead quality score derived from sentiment analysis",16entityMetadata: {17sourceType: "INTELLIGENCE_OPERATOR",18operatorId: "OPxxxx",19operatorName: "Sentiment Analysis",20field: "leadScore",21},22});2324console.log(customFieldMapping.id);25}2627createCustomFieldMapping();
Response
1{2"category": "MEASURE",3"createdAt": "2009-07-06T20:30:00Z",4"description": "Lead quality score derived from sentiment analysis",5"entityMetadata": {},6"id": "id",7"name": "LeadScore",8"updatedAt": "2009-07-06T20:30:00Z"9}