Skip to contentSkip to navigationSkip to topbar
Page tools
Useful for sharing or LLM
Accelerate development with AI

On this page
Looking for more inspiration?Visit the

Operations


What is an operation

what-is-an-operation page anchor

An Operation resource tracks the status of an asynchronous request, such as generating a snapshot or updating or deleting a cohort. When you send a request that Cohorts processes asynchronously, the API returns HTTP 202 Accepted and includes an Operation resource that you can poll to monitor progress.

1
curl -X GET 'https://audiences.twilio.com/preview/CohortOperations/cmp_operation_01h9d8r0vte3hz8tykdj329t7r' \
2
-u $TWILIO_API_KEY:$TWILIO_API_SECRET

Sample response:

1
{
2
"operationId": "cmp_operation_01h9d8r0vte3hz8tykdj329t7r",
3
"status": "COMPLETED",
4
"statusUrl": "/preview/CohortOperations/cmp_operation_01h9d8r0vte3hz8tykdj329t7r",
5
"createdAt": "2026-01-15T10:00:00Z",
6
"completedAt": "2026-01-15T10:00:04Z",
7
"resultUrl": "/preview/CohortSnapshots/cmp_cohortsnapshot_01h9d8r0vte3hz8tykdj329t7r",
8
"result": {
9
"cohortSnapshotId": "cmp_cohortsnapshot_01h9d8r0vte3hz8tykdj329t7r",
10
"profileCount": 15420
11
}
12
}

StatusDescription
PENDINGThe request is queued for processing.
RUNNINGTwilio is actively processing the request.
COMPLETEDThe request finished successfully. result and, if applicable, resultUrl are populated.
FAILEDThe request failed. Check the error field for details.
CANCELLEDThe request was cancelled.

Poll the operation until its status is COMPLETED, FAILED, or CANCELLED. Poll with exponential back-off rather than at a fixed, high-frequency interval.


  • Learn about Snapshots.
  • See the Cohorts API reference.