Skip to contentSkip to navigationSkip to topbar

Fetch a computed trait operation


(new)

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

(warning)

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/ComputedTraitOperations/{computedTraitOperationId}

Base url: https://audiences.twilio.com (base url)

Status of a long-running operation named by operationId on the response to a Computed Traits mutation. Returns 404 for an operation that is not a Computed Traits operation.

Poll until a terminal state (COMPLETED, FAILED, CANCELED), honoring Retry-After.


Request

fetch-computed-trait-operation-request page anchor

Path parameters

fetch-computed-trait-operation-path-parameters page anchor
Property nameTypeRequiredDescription
computedTraitOperationIdstring
required

The computedTraitOperationId identifier


200401403404429500

OK - The trait operation

SchemaExample
Property nameTypeRequiredDescriptionChild properties
operationIdstring
read-only

Optional

Unique identifier for a long-running operation started via a Computed Traits flow, following TTID format. Same prefix as CohortOperationId. Format: cmp_operation_{uuidv7-encoded}

Example: cmp_operation_01h9d8r0vte3hz8tykdj329t7rPattern: ^cmp_operation_[a-zA-Z0-9]{26}$Max length: 100

statusenum<string>
read-only

Optional

Current status of the operation.

  • PENDING: Operation is waiting to be processed
  • RUNNING: Operation is in progress
  • COMPLETED: Operation finished successfully
  • FAILED: Operation failed (check error field)
  • CANCELED: Operation was canceled before it finished
Example: RUNNINGPossible values:
PENDINGRUNNINGCOMPLETEDFAILEDCANCELED

createdAtstring<date-time>
read-only

Optional

When the operation was created

Example: 2026-09-16T14:22:40Z

statusUrlstring<uri>
read-only

Optional

Absolute URL of this operation

Example: https://audiences.twilio.com/preview/ComputedTraitOperations/cmp_operation_01h9d8r0vte3hz8tykdj329t7rMax length: 500

completedAtstring<date-time> or null
read-only

Optional

When the operation reached a terminal state; null until then

Example: 2026-09-16T14:31:05Z

payloadobject

Optional

Operation-specific metadata


resultobject or null

Optional

Operation output, present when COMPLETED


errorobject or null

Optional

Twilio API Standards OperationError: error details for a failed long-running operation. RFC 9457 inspired, without status, because the GET that returns the operation is itself a 200. Present when FAILED.


resultIdstring or null
read-only

Optional

The computed trait, when COMPLETED; null otherwise

Example: cmp_computedtrait_01h9d8r0vte3hz8tykdj329t9fPattern: ^cmp_computedtrait_[a-zA-Z0-9]{26}$Max length: 100

resultUrlstring<uri> or null
read-only

Optional

Absolute URL of the computed trait, when COMPLETED; null otherwise

Example: https://audiences.twilio.com/preview/ComputedTraits/cmp_computedtrait_01h9d8r0vte3hz8tykdj329t9fMax length: 500
Fetch a computed trait operationLink to code sample: Fetch a computed trait operation
1
curl -X GET "https://audiences.twilio.com/preview/ComputedTraitOperations/computedTraitOperationId" \
2
-u $TWILIO_API_KEY:$TWILIO_API_SECRET

Response

Note about this response
1
{
2
"operationId": "cmp_operation_01h9d8r0vte3hz8tykdj329t7r",
3
"status": "PENDING",
4
"statusUrl": "https://audiences.twilio.com/preview/ComputedTraitOperations/cmp_operation_01h9d8r0vte3hz8tykdj329t7r",
5
"createdAt": "2026-09-16T14:22:40Z",
6
"payload": {
7
"operationType": "CREATE",
8
"computedTraitId": "cmp_computedtrait_01h9d8r0vte3hz8tykdj329t9f"
9
}
10
}