Create or replace a country compliance config
Creates the config for country_code or fully replaces the existing one. Omitted optional fields go
back to their defaults: require_dnc_check becomes true, require_opt_in becomes false,
blocked_prefixes becomes [], and consent_script and require_ai_disclosure become null. The change
takes effect on the next call, message or email to that country.
Loosening a config (longer hours, more attempts, DNC off) places your outreach outside the country’s defaults. That is a legal decision, which is why only the workspace owner can make it.
Retention coupling. After saving, the workspace retention window (GET /api/compliance/retention) is set
to the smallest data_retention_days across all country configs. Saving a Colombia config with 30 days
therefore shortens retention for the whole workspace, and the next daily sweep deletes accordingly.
Side effects. Writes the config and updates the workspace retention window. Writes an audit entry. Future call greetings use the new recording and AI-disclosure notices.
Idempotency. Safe to retry. This is a full replace keyed by country.
Access
- Required scope:
full. Signed-in users need theownerrole; admins are refused. - Rate limit: General API — 120 (Starter), 200 (Growth), 300 (Business) or 600 (Enterprise) requests/min per workspace. See Rate limits.
- Plan: Available on every plan. The route passes through a compliance plan gate, but the feature is enabled on every tier, so the gate does not refuse today.
Authentication
Workspace API key: jl_ followed by 64 lowercase hex characters, created by the workspace owner in the
dashboard (Settings → API Keys) and sent as Authorization: Bearer jl_.... The plaintext is shown once,
at creation; Jelliu stores only a SHA-256 hash. A workspace can hold up to 25 active keys.
Operations restricted to admins or owners reject keys without the full scope with 403, and say so in
their description. No key, whatever its scope, can mint or revoke API keys or rotate a webhook secret —
that requires a signed-in owner session. A revoked key stops authenticating within about 10 seconds.
See Authentication.
Request
A country Jelliu has written compliance rules for (ISO 3166-1 alpha-2, upper case). The country of a number is resolved from its dialling prefix. Defaults shown are the built-in ones. All seven require a recording notice, run the DNC check and default the AI-disclosure notice to off.
CO: Colombia (+57). Ley 1581 de 2012 (data protection) and the Registro de Números Excluidos under Ley 2300 de 2023. Calls 08:00–20:00 America/Bogota, 3 per day, 10 total, opt-in required, 365-day retention.MX: Mexico (+52). LFPDPPP and the Profeco REPEP registry. Calls 08:00–21:00 America/Mexico_City, 3 per day, 10 total, 365 days.BR: Brazil (+55). LGPD and Não Me Perturbe. Calls 08:00–20:00 America/Sao_Paulo, 3 per day, 8 total, opt-in required, recording notice in Portuguese, 365 days.US: United States (+1, which also covers Canada and the Caribbean). TCPA/TSR and the National DNC Registry. Calls 08:00–21:00 America/New_York, 3 per day, 15 total, recording notice in English, 730 days.AR: Argentina (+54). Ley 25.326. Calls 08:00–20:00 America/Argentina/Buenos_Aires, 3 per day, 10 total, 365 days.CL: Chile (+56). Ley 19.628. Calls 08:00–20:00 America/Santiago, 3 per day, 10 total, 365 days.PE: Peru (+51). Ley 29733. Calls 08:00–20:00 America/Lima, 3 per day, 10 total, 365 days.
Open every call to this country with a recording notice (consent_script, or a generic notice when it is null).
Maximum calls to one contact per local day (midnight in the call-hours time zone).
The local window in which outreach is allowed. start is inclusive and end is exclusive. When start is later
than end, the window wraps past midnight. At check time, the workspace’s own time zone setting, when present,
replaces timezone.
Retention for this country, in days (minimum 30 here, although the workspace window accepts values from 1). The smallest value across configs becomes the workspace retention window.
The recording notice the agent reads at the start of the call, in the callee’s language. null uses the country default script.
Block numbers that belong to any workspace contact marked do-not-call. The suppression list is checked regardless.
Requires a prior voice_call consent record before this country may be called. Enforced since
2026-09-15, and ONLY from this saved value: setting it true here makes the call gate refuse a
contact with no live granted consent (code: no_opt_in), which marks the contact invalid in a
campaign while the campaign continues. Leaving it false, or never saving a config for the
country, enforces nothing. Calls that name no contact are not blocked, because the consent
ledger is keyed by contact.
E.164 prefixes that are never contacted (plain string prefix match), e.g. premium-rate or landline ranges.
Open calls to this country by saying the caller is an AI. true or false is this workspace’s decision.
null or omitted inherits the country default, which is false for every supported country. An agent’s own
disclose_ai setting overrides this.
Response
A saved per-country compliance config. Fields left null fall back to the country default when a call is placed.

