Skip to contentSkip to navigationSkip to topbar

List profiles in a cohort snapshot


(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/CohortSnapshots/{cohortSnapshotId}/Profiles

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

Retrieves a paginated list of profiles in a specific cohort snapshot, including their variable results.


Partitioning

partitioning page anchor

Use the partition query parameter to retrieve profiles from a specific partition (0-indexed). By default, profiles from all partitions are aggregated.


Token-based pagination via pageSize and pageToken. Note that this endpoint returns profile data and so enforces a larger page window than the metadata endpoints -- including a minimum below which a request is rejected with 400. See the pageSize parameter for the exact bounds.


Authentication

authentication page anchor
Property nameTypeRequiredDescription
cohortSnapshotIdstring
required

The cohortSnapshotId identifier

Property nameTypeRequiredDescription
partitioninteger

Optional

Optional zero-based partition number to retrieve profiles from. When omitted, returns profiles from all partitions aggregated. When specified, returns only profiles from that partition (better performance for large snapshots). Must be less than the snapshot's partitionCount.

Minimum: 0Maximum: 499

pageSizeinteger

Optional

Maximum number of items to return in a single response.

Profile-data endpoints use a larger page window than the metadata endpoints: pageSize must be between 50 and 1000, and defaults to 100 when omitted. A pageSize below the 50 minimum is rejected with 400.

Default: 100Minimum: 50Maximum: 1000

pageTokenstring

Optional

An opaque, URL-safe cursor identifying the page of results to return. Pass back the meta.nextToken value from the previous response. If omitted, the API returns the first page of results.

The token's encoding and contents are an implementation detail and may change without notice, so do not decode, construct or modify one -- a malformed token is rejected. Carry it through unchanged.

Max length: 500

200401403404429500

OK - Paginated list of profiles in the cohort snapshot

SchemaExample
Property nameTypeRequiredDescriptionChild properties
profilesarray[object]

Optional

Paginated list of profiles in this cohort snapshot


metaobject

Optional

Pagination metadata for list responses

List profiles in a cohort snapshotLink to code sample: List profiles in a cohort snapshot
1
curl -X GET "https://audiences.twilio.com/preview/CohortSnapshots/cohortSnapshotId/Profiles?PageSize=20" \
2
-u $TWILIO_ACCOUNT_SID:$TWILIO_AUTH_TOKEN

Response

Note about this response
1
{
2
"profiles": [
3
{
4
"profileId": "mem_profile_01h9d8r0vte3hz8tykdj329t7r",
5
"variables": {
6
"email": [
7
"jane@example.com"
8
],
9
"first_name": "Jane"
10
}
11
}
12
],
13
"meta": {
14
"key": "profiles",
15
"pageSize": 1
16
}
17
}