ReferenceCampaigns API
Validate template variable bindings for all segment members
POST
Verifies that every required template slot resolves to a non-empty value for all members of the campaign's segment.
- Takes no request body. Requires
segmentIdto be set on the campaign before validation when the template has required slots. - Returns
valid(boolean),totalmember count,invalidCount, andinvalidRecipients(memberId,name,missingSlots).
Canonical template slot keys (content.variables and content.bindings):
header_media_url— public HTTPS media URL when the template has anIMAGE,VIDEO, orDOCUMENTheader.header_1..N— text header placeholders{{1}}..{{N}}.'1'..N(or'body_1'..N) — body placeholders{{1}}..{{N}}.button_url_0..N— dynamic URL button suffix values by button index0..N(URL-encoded on send).
bearerheader
AuthorizationBearer <API key>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
valid*booleanTrue when every segment member can fill all required template slots.
total*numberNumber of segment members checked.
invalidCount*numberNumber of members with at least one missing slot.
invalidRecipients*array<>Members that still have unresolved required slots after bindings and static variables.
curl -X POST 'https://api.1msg.io/api/v1/campaigns/string/validate-variables'Example Response
{ "valid": true, "total": 150, "invalidCount": 3, "invalidRecipients": [ { "memberId": "cm3member01", "name": "Ana Silva", "missingSlots": [ "2", "button_url_0" ] } ]}