Retrieve asynchronous query status and results
Public beta
Conversation Insights, including the APIs, is currently available as a public beta release and the information contained in this document is subject to change. Some features are not yet implemented and others may be changed before the product is declared as generally available. Public beta products are not covered by the Twilio Support Terms or Twilio Service Level Agreement.
Conversation Insights is not PCI compliant or a HIPAA Eligible Service and should not be used in workflows that are subject to HIPAA or PCI.
Conversations products are only available in the new Twilio Console. If your account hasn't been migrated, you'll be redirected to the legacy Console where these products won't appear.
GET/v3/InsightsDomains/Conversations/QueryJobs/{operationId}
Base url: https://insights.twilio.com (base url)
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.
The unique identifier for the asynchronous query operation, in TTID format.
proc_job_01h9d8r0vte3hz8tykdj329t7rOperation status (may include results if COMPLETED)
The unique identifier for the asynchronous query operation, in TTID format.
proc_job_01h9d8r0vte3hz8tykdj329t7rThe valid status values for long-running operations.
PENDINGRUNNINGCANCELLEDCOMPLETEDFAILEDhttps://insights.twilio.com/v3/InsightsDomains/Conversations/QueryJobs/proc_job_01h9d8r0vte3hz8tykdj329t7rThe 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.
2026-05-25T14:32:17ZThe error details, present only when status is FAILED.
The URL to retrieve query results, present only when status is COMPLETED. Supports pagination via the pageSize and pageToken query parameters.
https://insights.twilio.com/v3/InsightsDomains/Conversations/QueryJobs/proc_job_01h9d8r0vte3hz8tykdj329t7r/ResultsThe identifier of the results resource, present only when status is COMPLETED. Equal to operationId, since results are keyed by the operation ID.
proc_job_01h9d8r0vte3hz8tykdj329t7rThe duration for how long results are retained, in ISO 8601 format.
P7D1// Download the helper library from https://www.twilio.com/docs/node/install2const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";34// Find your Account SID and Auth Token at twilio.com/console5// and set the environment variables. See http://twil.io/secure6const accountSid = process.env.TWILIO_ACCOUNT_SID;7const authToken = process.env.TWILIO_AUTH_TOKEN;8const client = twilio(accountSid, authToken);910async function fetchQueryJobStatus() {11const queryJob = await client.insights.v3.queryJobs("operationId").fetch();1213console.log(queryJob.operationId);14}1516fetchQueryJobStatus();
Response
1{2"operationId": "proc_job_01h9d8r0vte3hz8tykdj329t7r",3"status": "RUNNING",4"createdAt": "2026-05-25T14:30:00Z",5"statusUrl": "https://insights.twilio.com/v3/InsightsDomains/Conversations/QueryJobs/proc_job_01h9d8r0vte3hz8tykdj329t7r"6}