Troubleshooting: template variant missing (NO_VARIANT_FOR_CHANNEL)
A render or send against a reusable content template failed with HTTP 422 and the error codeNO_VARIANT_FOR_CHANNEL. That means the template you
referenced has no variant authored for the channel you asked for, and
walking the template’s fallback_chain found no other channel variant to
substitute. The request is valid — the template simply does not cover that
channel. This page shows how variant resolution works and where the missing
variant belongs.
What template variants are
A reusable content template (POST /messages/content-templates) is a single
template entry that carries one variant per channel — the per-channel
renderer bound to that template. Each variant holds the channel-rendered
copy:
bodyfor SMS and other text channels,media_urlsfor MMS,componentsfor WhatsApp structured sends,subjectplusbody_html/body_textfor email,suggestionsfor RCS.
variants map, keyed by channel name, so
one template entry can serve many channels. You author variants through the
content-templates endpoints (POST / PATCH
/messages/content-templates) and preview any channel with
POST /messages/content-templates/:id/render.
How fallback_chain resolution walks channels
When the requested channel has no variant, the resolver walks the template’sfallback_chain — an ordered list of channel names — and uses the first
variant it finds:
- If the target channel has a variant, the resolver returns it as a
primaryresolution. - Otherwise it walks
fallback_chainin order, skips the target channel itself, and returns the first variant that exists as afallbackresolution. - If the chain exhausts with no variant anywhere, the resolver returns
null— and the caller raises the 422.
fallback_chain decides priority,
and a chain entry that names a channel with no authored variant is simply
skipped over.
The 422 result contract
When resolution returnsnull, the API responds with HTTP 422:
requested_channel on a successful render is always paired with a
rendered_channel field, which tells you whether the response used the
primary channel or a fallback hop. When every hop misses, there is no
rendered_channel — resolution returned null and the request fails closed
instead of guessing a channel.
Fix: add a variant for the channel
Add the missing variant to the template, or extend itsfallback_chain:
- Fetch the template (
GET /messages/content-templates/:id) and look at itsvariantsmap — find which channel keys exist. - Author the variant for the channel you need — for example a WhatsApp
variant with the right
components, or an email variant withsubjectandbody_html— viaPATCH /messages/content-templates/:id. - If you intended the send to substitute another channel when yours is
missing, add that channel to
fallback_chainand make sure a variant for it actually exists on the template. - Re-run
POST /messages/content-templates/:id/renderwithtarget_channelset to the failing channel; it returns the variant and reportsresolution: "primary"or"fallback"so you can confirm the resolution path before you send.
Where the mistake usually lives
The chain and the variant are authored in two different places, and mostNO_VARIANT_FOR_CHANNEL errors are a mismatch between the two:
- A fallback chain entry with no authored variant. The template names
whatsappinfallback_chain, but nobody authored the WhatsApp variant — the hop is skipped, and if nothing else resolves you get the 422. - The default channel covers less than you think. Templates have a
default_channel, and renders without an explicittarget_channeluse it. If you only authored the SMS variant but the default channel points at WhatsApp, every unparameterised render fails. - A flow-builder step references a template that doesn’t cover the
flow’s channel. In the multi-channel fallback flow builder,
a step that renders a template against
rcsorwhatsapponly succeeds when that template carries a variant for the channel the step targets.
See also
- Fallback on terminal DLR — the multi-channel delivery-level fallback flow and how channel ladders escalate a failed send.
- Error code reference —
the registry entry for
NO_VARIANT_FOR_CHANNEL.