MaillyDocs

Preview audience resolution

POST
/audiences/preview

Resolves an {audiences, contacts, exclude…} selection without saving it and returns the count and a sample.

Authorization

bearerAuth
headerAuthorizationBearer <token>

Mailly API key(Authorization: Bearer )

Request Body

application/json
  1. body
include?
exclude?
contacts?array<string>
audiences?array<string>
sampleLimit?number

Sample size, default 20, max 100

[key: string]?unknown

Response Body

Resolution result

application/json
  1. response
success*boolean
selection*
count*number
sample*array<>
directRecipientCount?number
includedContactCount?number
excludedContactCount?number
audiences?array<>
[key: string]?unknown
curl -X POST 'https://api.mailly.site/audiences/preview' \  -H 'Content-Type: application/json' \  -d '{  "property1": null,  "property2": null}'
{  "success": true,  "selection": {    "property1": null,    "property2": null  },  "count": 0,  "sample": [    {      "property1": null,      "property2": null    }  ],  "directRecipientCount": 0,  "includedContactCount": 0,  "excludedContactCount": 0,  "audiences": [    {      "property1": null,      "property2": null    }  ],  "property1": null,  "property2": null}