Skip to contentSkip to navigationSkip to topbar

Fetch an audience snapshot by ID


(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/AudienceSnapshots/{audienceSnapshotId}

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

Retrieves audience snapshot metadata by its ID.

Works for snapshots from any source (AUDIENCE or STORE).

Use ListAudienceSnapshotProfiles to retrieve paginated profile data.


Request

fetch-audience-snapshot-request page anchor

Path parameters

fetch-audience-snapshot-path-parameters page anchor
Property nameTypeRequiredDescription
audienceSnapshotIdstring
required

Unique identifier for the audience snapshot following TTID format. Format: aud_snapshot_{uuidv7-encoded}

Example: aud_snapshot_01h9d8r0vte3hz8tykdj329t7rPattern: ^aud_snapshot_[a-zA-Z0-9]{26}$Max length: 100

200400401403404429500

OK - Audience snapshot metadata retrieved

SchemaExample
Property nameTypeRequiredDescriptionChild properties
audienceSnapshotIdstring
read-only

Optional

Unique identifier for the audience snapshot following TTID format. Format: aud_snapshot_{uuidv7-encoded}

Example: aud_snapshot_01h9d8r0vte3hz8tykdj329t7rPattern: ^aud_snapshot_[a-zA-Z0-9]{26}$Max length: 100

source
oneOf:
read-only

Optional

Defines the source of profiles for this audience snapshot. It has exactly one of two shapes, and there is no type field: tell them apart by which fields are present.

  • An audience source has audienceId: the snapshot was taken from an existing audience.
  • A store source has storeId and criteria: the snapshot queried a store directly with inline criteria.

profileCountinteger
read-only

Optional

Total number of profiles in the audience snapshot

Example: 15420Minimum: 0

partitionCountinteger

Optional

Number of partitions the audience snapshot is split into, between 1 and 500. Unless overridden via partitionCountOverride, the system automatically determines the optimal number.

Example: 4Minimum: 1Maximum: 500

variablesarray[object]
read-only

Optional

Variable expressions included for each profile in the audience snapshot.


tagsobject
read-only

Optional

Tags for organizing and categorizing resources as key-value pairs.

  • Maximum of 10 key-value pairs
  • Maximum size of a tag key is 128 characters
  • Maximum size of a tag value is 256 characters
  • Keys and values must be non-empty and URL-safe: only unreserved characters (A-Z, a-z, 0-9, -, ., _, ~) are allowed. Tags are echoed back in the tags query parameter of the list endpoints, so anything you can store here can also be filtered on.
  • Keys cannot use the reserved twilio__ prefix
Example: {"environment":"production","campaign":"q1-2026"}Max properties: 10

createdAtstring<date-time>
read-only

Optional

Timestamp when the audience snapshot was created

Example: 2026-01-15T10:00:00Z

completedAtstring<date-time>
read-only

Optional

Timestamp when the audience snapshot completed

Example: 2026-01-15T10:03:45Z

profilesExpiresAtstring<date-time>

Optional

When the audience snapshot's profile data expires. After this time, profile data is permanently deleted and ListAudienceSnapshotProfiles returns a 404. The snapshot metadata remains retrievable via FetchAudienceSnapshot.

Maximum 30 days from creation. Defaults to 7 days.

Example: 2026-01-22T10:00:00Z
Fetch an audience snapshot by IDLink to code sample: Fetch an audience snapshot by ID
1
curl -X GET "https://audiences.twilio.com/preview/AudienceSnapshots/aud_snapshot_01h9d8r0vte3hz8tykdj329t7r" \
2
-u $TWILIO_API_KEY:$TWILIO_API_SECRET

Response

Note about this response
1
{
2
"audienceSnapshotId": "aud_snapshot_01h9d8r0vte3hz8tykdj329t7r",
3
"source": {
4
"audienceId": "aud_audience_01h9d8r0vte3hz8tykdj329t7r"
5
},
6
"profileCount": 15420,
7
"partitionCount": 4,
8
"variables": [
9
{
10
"expression": "profile.address.email",
11
"displayName": "email"
12
},
13
{
14
"expression": "profile.trait.Contact.firstName",
15
"displayName": "first_name"
16
}
17
],
18
"tags": {
19
"environment": "production"
20
},
21
"createdAt": "2026-01-15T10:00:00Z",
22
"completedAt": "2026-01-15T10:03:45Z",
23
"profilesExpiresAt": "2026-01-22T10:00:00Z"
24
}