Preview canonical email targeting and exact reachable recipients.
curl --request GET \
--url https://api.sendrealm.com/campaigns/{id}/audience-preview \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sendrealm.com/campaigns/{id}/audience-preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/campaigns/{id}/audience-preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"status": "ready",
"exact": true,
"calculated_at": "2023-11-07T05:31:56Z",
"targeting": {
"version": 1,
"base": {
"type": "all_contacts"
},
"excluded_audience_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"contact_rules": {
"kind": "group",
"operator": "and",
"children": "<array>"
},
"push_rules": {
"kind": "group",
"operator": "and",
"children": "<array>"
}
},
"effective_targeting": {
"version": 1,
"base": {
"type": "all_contacts"
},
"excluded_audience_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"contact_rules": {
"kind": "group",
"operator": "and",
"children": "<array>"
},
"push_rules": {
"kind": "group",
"operator": "and",
"children": "<array>"
}
},
"matched_contacts": 123,
"matched_devices": 123,
"reachable_email_contacts": 123,
"reachable_push_contacts": 123,
"reachable_push_devices": 123,
"by_platform": [
{
"platform": "<string>",
"devices": 123
}
]
},
"status": 123,
"metadata": {
"total": 123,
"items": 123,
"limit": 123,
"after": "<string>",
"next": "<string>",
"has_more": true
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}Campaigns
Preview Email Campaign Audience
Inspect canonical email targeting and reachable recipients.
GET
/
campaigns
/
{id}
/
audience-preview
Preview canonical email targeting and exact reachable recipients.
curl --request GET \
--url https://api.sendrealm.com/campaigns/{id}/audience-preview \
--header 'Authorization: Bearer <token>'const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.sendrealm.com/campaigns/{id}/audience-preview', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.sendrealm.com/campaigns/{id}/audience-preview"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text){
"data": {
"status": "ready",
"exact": true,
"calculated_at": "2023-11-07T05:31:56Z",
"targeting": {
"version": 1,
"base": {
"type": "all_contacts"
},
"excluded_audience_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"contact_rules": {
"kind": "group",
"operator": "and",
"children": "<array>"
},
"push_rules": {
"kind": "group",
"operator": "and",
"children": "<array>"
}
},
"effective_targeting": {
"version": 1,
"base": {
"type": "all_contacts"
},
"excluded_audience_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"contact_rules": {
"kind": "group",
"operator": "and",
"children": "<array>"
},
"push_rules": {
"kind": "group",
"operator": "and",
"children": "<array>"
}
},
"matched_contacts": 123,
"matched_devices": 123,
"reachable_email_contacts": 123,
"reachable_push_contacts": 123,
"reachable_push_devices": 123,
"by_platform": [
{
"platform": "<string>",
"devices": 123
}
]
},
"status": 123,
"metadata": {
"total": 123,
"items": 123,
"limit": 123,
"after": "<string>",
"next": "<string>",
"has_more": true
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}{
"status": 123,
"error": {
"code": "<string>",
"message": "<string>",
"details": "<string>",
"issues": [
{
"code": "<string>",
"path": "<string>",
"message": "<string>"
}
]
}
}Select the campaign’s project explicitly and use
resources.read. This preview provides reach evidence without launching the campaign. Review the campaign’s readiness and use its project-aware dashboard handoff for production scheduling or launch.Authorizations
Integration key for backend workloads, or a scoped personal key (sr_user_) for account discovery and supported project operations. MCP accepts only personal keys.
Headers
Explicit project context. Required for personal-key project resource calls; integration keys retain their configured default. MCP clients supply project_id in each tool call instead.