TwilioInsightsAsync

Retrieve asynchronous query status and results

Changed on

Poll the operation status. When status is COMPLETED, the response includes query results inline. When FAILED, the response includes error details conforming to the OperationError schema.

get/v3/InsightsDomains/Conversations/QueryJobs/{operationId}

Request

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

Path parameters

operationIdstring Proc_JobTtid required
Example:proc_job_01h9d8r0vte3hz8tykdj329t7r

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

Response

Operation status (may include results if COMPLETED)

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
createdAtstring date-time required
completedAtstring date-time nullable

The time when the operation reached a terminal state (CANCELLED, COMPLETED, or FAILED), in RFC 3339 UTC format. Null while the operation is still PENDING or RUNNING.

resultUrlstring uri nullable

The URL to retrieve query results, present only when status is COMPLETED. Supports pagination via the pageSize and pageToken query parameters.

resultIdstring nullable

The identifier of the results resource, present only when status is COMPLETED. Equal to operationId, since results are keyed by the operation ID.

resultRetentionPeriodstring duration nullable

The duration for how long results are retained, in ISO 8601 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",
  "completedAt": "2026-05-25T14:32:17Z",
  "error": {
    "code": 50001,
    "message": "Query execution timeout exceeded",
    "httpStatusCode": 504,
    "detail": "Query exceeded the 120s execution limit."
  },
  "resultUrl": "https://insights.twilio.com/v3/InsightsDomains/Conversations/QueryJobs/proc_job_01h9d8r0vte3hz8tykdj329t7r/Results",
  "resultId": "proc_job_01h9d8r0vte3hz8tykdj329t7r",
  "resultRetentionPeriod": "P7D"
}

Changes