TwilioInsightsConfig

Register a custom measure field mapping

Changed on

Registers a custom field for the account. entityMetadata.sourceType selects where the field's value comes from, and the matching property on entityMetadata (intelligenceOperator for INTELLIGENCE_OPERATOR) carries its details. Only the MEASURE category is supported for now.

The request is validated before the mapping is created:

  • name contains only letters, digits and _, and is not already registered for the account (otherwise 409);
  • description, when present, is at most 150 characters;
  • for INTELLIGENCE_OPERATOR, the operator has an active version with outputFormat JSON, and entityMetadata.intelligenceOperator.field is one or two .-separated segments that resolve to a number or integer property in that version's output schema (otherwise 400);
  • the account has a free slot in the category; by default an account can register up to 3 custom measures (otherwise 403). Use GET /v3/ControlPlane/ConversationInsights/CustomFieldMappingsCapacity to check the remaining slots.

Create-only: if a mapping with the same name already exists for the account, 409 is returned with the existing mapping's id and nothing is changed. To modify an existing mapping, use PATCH /v3/ControlPlane/ConversationInsights/CustomFieldMappings/{mappingId}.

post/v3/ControlPlane/ConversationInsights/CustomFieldMappings

Request

  • Base URL
    https://insights.twilio.com
  • URL
    https://insights.twilio.com/v3/ControlPlane/ConversationInsights/CustomFieldMappings
  • Auth
    HTTP basic

Request body

category'MEASURE' required

The category of the custom field. Supported values:

  • MEASURE: a numeric value that can be aggregated and queried as a measure in Conversations Insights.
namestring required

Name of the custom field, used to reference it in Insights queries. Contains only letters, digits and _, and must not be empty. Must be unique within the account across every sourceType; registering an existing name returns 409. Cannot be changed after registration.

descriptionstring

Optional, free-text description of this custom field mapping, up to 150 characters. Display-only — not part of any uniqueness check.

Example request

{
  "name": "LeadScore",
  "description": "Lead quality score derived from sentiment analysis",
  "entityMetadata": {
    "intelligenceOperator": {
      "operatorId": "intelligence_operator_01kcgy1ew0e9x8re6jq542zt8b",
      "operatorName": "Sentiment Analysis",
      "field": "leadScore"
    }
  }
}

Response

The custom field mapping was created.

idstring

The unique identifier of the custom field mapping.

category'MEASURE' required

The category of the custom field. Supported values:

  • MEASURE: a numeric value that can be aggregated and queried as a measure in Conversations Insights.
namestring required

Name of the custom field, unique within the account.

descriptionstring

Optional, free-text description supplied at registration time. Display-only — not part of any uniqueness check.

createdAtstring date-time

When the mapping was registered.

updatedAtstring date-time nullable

When the mapping was last modified via PATCH. Null until the first update.

Example response

{
  "id": "convinsights_mapping_01m31967b7em08vh1pqgbam3mj",
  "name": "LeadScore",
  "description": "Lead quality score derived from sentiment analysis",
  "entityMetadata": {
    "intelligenceOperator": {
      "operatorId": "intelligence_operator_01kcgy1ew0e9x8re6jq542zt8b",
      "operatorName": "Sentiment Analysis",
      "field": "leadScore"
    }
  },
  "createdAt": "2026-08-13T14:30:00Z",
  "updatedAt": "2026-09-30T10:00:00Z"
}

Changes

    • breaking

      added the new required request property /

    • breaking

      removed from the request property oneOf list

    • breaking

      the request property type changed from no type to object

    • breaking

      the response's property type changed from no type to object for status

    • breaking

      removed the success response with the status

    • info

      added the new optional request property /

    • info

      removed discriminator from request property

    • info

      added the non-success response with the status

    • info

      added the optional property / to the response with the status

    • info

      removed discriminator from response property for the response status

    • info

      removed from the response property oneOf list for the response status

    • info

      added the required property / to the response with the status

    • info

      endpoint added