Fetch a computed trait
Beta
Twilio Cohorts is currently available as a Private Beta product and the information contained in this document is subject to change. You acknowledge and agree that your use of Twilio Cohorts is subject to the terms of the Services in Private Beta. This means that some features are not yet implemented and others may be changed before the product is declared as Generally Available. Private Beta products are not covered by the Twilio Support Terms or Twilio Service Level Agreement.
Not a HIPAA Eligible Service or PCI Compliant
Twilio Cohorts is not a HIPAA Eligible Service or PCI compliant and should not be enabled in workflows that are subject to HIPAA or PCI.
GET/preview/ComputedTraits/{computedTraitId}
Base url: https://audiences.twilio.com (base url)
Returns the computed trait's configuration, including the effective
traitKey and parameters after overrides. Its Status is a separate
sub-resource.
Supports If-None-Match; returns 304 Not Modified when the ETag matches.
Optional
Used for conditional requests. If the ETag matches, the server returns 304 Not Modified, reducing bandwidth and improving performance.
100The computedTraitId identifier
OK - The computed trait's configuration
Optional
Unique identifier for a computed trait following TTID format.
Format: cmp_computedtrait_{uuidv7-encoded}
cmp_computedtrait_01h9d8r0vte3hz8tykdj329t9fPattern: ^cmp_computedtrait_[a-zA-Z0-9]{26}$Max length: 100Optional
Human-readable name of the computed trait
Marketing frequency capMin length: 1Max length: 128Optional
Optional description of the computed trait
Whether the profile has hit its weekly marketing send capMax length: 1024Optional
Tags for organizing and categorizing resources as key-value pairs.
- Maximum of 10 key-value pairs
- Maximum size of a tag key is 128 characters
- Maximum size of a tag value is 256 characters
- Keys and values must be non-empty and URL-safe: only unreserved characters
(
A-Z,a-z,0-9,-,.,_,~) are allowed. Tags are echoed back in thetagsquery parameter of the list endpoints, so anything you can store here can also be filtered on. - Keys cannot use the reserved
twilio__prefix
{"environment":"production","campaign":"q1-2026"}Max properties: 10Optional
The profiles store the computation is performed on: its profiles are the ones computed over, and the computed value is written back onto them.
Optional
What the computed trait runs: one of the shapes listed, told apart by which
field is present. Phase one has a single shape, the reference
(definitionId).
The oneOf is declared now so later shapes are additive. Phase two (inline
definitions, out of scope) adds a shape carrying expression instead of
definitionId. Each shape requires its own field and sets
additionalProperties: false, so a body matches exactly one; a body with
both fields, or neither, matches none and returns 400. When reading a
computed trait, check which field is present rather than assuming
definitionId.
Optional
Whether values are being computed and kept current
trueOptional
The trait the value is written to: definition.traitKey when
overridden, otherwise the definition's own traitKey.
SendIntelligence.weeklyCapMax length: 256Optional
The parameter values a run binds: each parameter's defaultValue from
the definition's parameterSchema, with any definition.parameters
overrides merged over them.
{"windowDays":7}Max properties: 32Optional
When the computed trait was created
2026-09-16T14:22:40ZOptional
When the computed trait's configuration last changed
2026-09-16T14:22:40ZOptional
The ComputedTraitOperation tracking this change, on the response to a create,
an enable, or a parameter change only. Never returned by a GET of the
trait, so it is never stale. Poll
GET /preview/ComputedTraitOperations/{operationId}.
cmp_operation_01h9d8r0vte3hz8tykdj329t7rPattern: ^cmp_operation_[a-zA-Z0-9]{26}$Max length: 1001curl -X GET "https://audiences.twilio.com/preview/ComputedTraits/computedTraitId" \2-u $TWILIO_API_KEY:$TWILIO_API_SECRET
Response
1{2"id": "cmp_computedtrait_01h9d8r0vte3hz8tykdj329t9f",3"displayName": "Marketing frequency cap",4"description": "Whether the profile has hit its weekly marketing send cap",5"tags": {6"team": "lifecycle"7},8"storeId": "mem_store_01h9d8r0vte3hz8tykdj329t7r",9"definition": {10"definitionId": "twilio.frequency_cap",11"parameters": {12"windowDays": 713},14"traitKey": "SendIntelligence.weeklyCap"15},16"isEnabled": true,17"traitKey": "SendIntelligence.weeklyCap",18"parameters": {19"windowDays": 7,20"maxSends": 521},22"createdAt": "2026-09-16T14:22:40Z",23"updatedAt": "2026-09-16T14:22:40Z"24}