DocumentationLocale coverage

Locale coverage

GET /campaigns/{id}/locale-coverage — audience counts per language.

Before sending a multi-locale campaign, check how many opted-in contacts match each language. The locale coverage endpoint summarizes audience distribution for a campaign's audienceFilter.

Required scope: campaigns:read.

GET https://api.mailingcore.com/campaigns/{id}/locale-coverage
Authorization: Bearer mc_live_xxxx
X-Tenant-Id: clxxxxxxxx

Example

curl "https://api.mailingcore.com/campaigns/clxcampaign.../locale-coverage" \
  -H "Authorization: Bearer mc_live_xxxx" \
  -H "X-Tenant-Id: clxxxxxxxx"

Typical response:

[
  { "locale": "en", "count": 1240, "hasTemplate": true },
  { "locale": "es", "count": 890, "hasTemplate": true },
  { "locale": "it", "count": 45, "hasTemplate": false },
  { "locale": null, "count": 12, "hasTemplate": false }
]
FieldDescription
localeContact locale (null = not set)
countContacts matching the campaign filter
hasTemplateWhether a published template variant exists for that locale

Multi-locale strategy

MailingCore routes each contact to the template version that matches their locale field (see locale variants in template versions: es, en, it, fr, ca, de).

  1. Set contact locale on import

    Pass locale in upsert or bulk import so routing is deterministic.

  2. Publish locale variants

    Create template versions with the same localeGroupId for each language you support.

  3. Check coverage

    Call GET /campaigns/{id}/locale-coverage. Fix gaps where hasTemplate: false but count is high.

  4. Send or split campaigns

    Either send one campaign (locale-aware fan-out) or run separate campaigns per audienceFilter.locale for full control over subject and timing.

Contacts without locale

Contacts with locale: null may fall back to a locale-neutral template version or your tenant default. Set locale during sync to avoid silent mismatches.

Related