Validate a campaign
GET/api/v1/email/campaigns/{id}/validate
GET /email/campaigns/{id}/validate
curl -X GET 'https://www.unitpost.com/api/v1/email/campaigns/cmp_123/validate' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'User-Agent: my-app/1.0'Response · 200
{
"object": "campaign_validation",
"total_members": 1,
"sendable": 0,
"suppressed": 0,
"excluded": 0,
"missing_data": [
{
"contact_id": "contact_123",
"email": "customer@example.com",
"missing": [
"string"
]
}
],
"unresolved_variables": [
"string"
],
"can_send": false
}Run a non-mutating pre-send check and get the full readiness report: how many contacts will receive the campaign, how many are suppressed or excluded, which contacts are missing template variables, and a final can_send verdict. Nothing is sent or changed. Fix reported variable gaps with Update a campaign (variable_fallbacks / excluded_contact_ids), then launch with Send a campaign. Requires the campaigns:read capability.
Parameters1 field
| Field | Type | Description |
|---|---|---|
idrequired | string · path | — |
Response · 200 fields8 fields
| Field | Type | Description |
|---|---|---|
objectrequired | enumcampaign_validation | — |
total_membersrequired | integer | — |
sendablerequired | integer | — |
suppressedrequired | integer | — |
excludedrequired | integer | — |
missing_datarequired | object[] | — |
unresolved_variablesrequired | string[] | — |
can_sendrequired | boolean | — |
200401404