Skip to main content

Create Sample

POST 

/directories/:directoryId/samples

Creates a mailing list subset (sample) or batch subset in a directory based off of an existing sample definition

This API call is only available to XM Directory users.
Parent ID

The parentId provided must be either a XM Directory mailing List ID (prefix: CG) or a XM Directory transaction batch ID (prefix: BT). On success, the resulting ID will be of the same type.

Types of criteria used in each parent type

Any sample definition that contains filters or logic related to transaction data is only applicable AND required when providing a batchID. If creating a sample from a mailing list, transaction filters are not allowed and will return an error. If creating a sample from a batch, transaction filters are required and lack thereof will return an error.

Use samplePercentage OR maxSampleSize

Requests must include either samplePercentage OR maxSampleSize. Do not include both properties in the same request.

Request​

Responses​

Successful Create Sample response