ReferenceCampaigns API
Preview a campaign
GET
Counts recipients and how many are outside the 24-hour window. tierDailyLimit is the channel tier. No price and no cost are returned. Nothing is sent.
bearerheader
AuthorizationBearer <token>Key issued in Settings → Developer → API key. Inbox methods need the Inbox scope. Campaigns methods need the Campaigns scope.
campaignId*stringCampaign id returned by create or list.
application/json- response
campaignId*stringCampaign id.
segmentId*stringSegment id used as the audience.
contentMode*stringWhether the campaign sends a template or session text.
Value in
"template""text"recipientCount*numberMembers in the segment.
closedWindowCount*numberMembers outside the 24-hour window.
tierDailyLimit*|How many template sends this channel may start in a rolling 24 hours. Taken from the channel tier, not from a field you set. Null when the tier is unknown or unlimited.
exceedsTierDailyLimit*booleanTrue when a template send would pass the channel tier.
warnings*array<>Warnings for this preview. Nothing is sent.
curl -X GET 'https://api.1msg.io/api/v1/campaigns/string/preview'{ "campaignId": "cm3campaign01", "segmentId": "cm3segment01", "contentMode": "template", "recipientCount": 12, "closedWindowCount": 3, "tierDailyLimit": 1000, "exceedsTierDailyLimit": false, "warnings": [ { "code": "closed_window_skipped", "message": "Closed-window recipients will be skipped." } ]}