TwilioInsightsAsync

Submit an asynchronous query

Changed on

Submit a long-running semantic query against the Conversations domain. Returns 202 Accepted with an operationId and a Location header pointing to the QueryJobs status endpoint for polling.

post/v3/InsightsDomains/Conversations/QueryJobs

Request

  • Base URL
    https://insights.twilio.com
  • URL
    https://insights.twilio.com/v3/InsightsDomains/Conversations/QueryJobs
  • Auth
    HTTP basic

Headers

Idempotency-Keystring uuid
Example:01890a5d-aa0f-7c80-b8e6-0242ac140004

A client-generated UUIDv7 key that ensures idempotent behavior. Submitting the same key with an identical request returns the same operation without re-execution. Scoped to Account + Region. Retained for 24 hours.

Request body

domainstring

The business domain to execute the query against

Example request

{
  "domain": "Conversations",
  "query": {
    "measures": [
      "OperatorResult.Count"
    ],
    "dimensions": [
      "DateCreated",
      "OperatorResults"
    ],
    "filters": [
      {
        "op": "AND",
        "expressions": [
          {
            "op": "IN",
            "field": "OperatorResult.Value",
            "values": [
              "positive",
              "negative"
            ]
          }
        ]
      }
    ],
    "orderBy": [
      {
        "field": "OperatorResults.CreatedDate",
        "direction": "DESC"
      }
    ]
  }
}

Response

Async query accepted

operationIdstring Proc_JobTtid required

The unique identifier for the asynchronous query operation, in TTID format.

status'PENDING' | 'RUNNING' | 'CANCELLED' | 'COMPLETED' | 'FAILED' required

The valid status values for long-running operations.

statusUrlstring uri required

The URI to poll for operation status.

createdAtstring date-time required

The time when the operation was accepted, in RFC 3339 UTC format.

Example response

{
  "operationId": "proc_job_01h9d8r0vte3hz8tykdj329t7r",
  "statusUrl": "https://insights.twilio.com/v3/InsightsDomains/Conversations/QueryJobs/proc_job_01h9d8r0vte3hz8tykdj329t7r",
  "createdAt": "2026-05-25T14:30:00Z"
}

Changes