> ## Documentation Index
> Fetch the complete documentation index at: https://docs.orbit.devotel.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Compliance-gate error codes FAQ

> First-lookup FAQ for every compliance-gate error code: how gates surface, which gate family fired, and the tenant-owned fix per code — with a re-verify step and the escalation path when a re-submit is owed.

# Compliance-gate error codes FAQ

Every pre-send compliance gate in Orbit answers with a machine-readable
envelope — an `error.code`, an HTTP status, and `details` — naming the
exact gate that fired. This page is the first-stop FAQ: sort the
symptom, read the gate family, follow the per-code Q\&A, and know when to
fix it yourself versus when a ticket is owed.

> [!NOTE]
>
> Every gate on this page is tenant-owned — you toggle it on, register
> the sender, execute the BAA, or capture consent. The single
> platform-owned control (the US TCPA federal voice window) is called
> out where it fires. Orbit enforces the gates you turn on; approvals
> always come from the carrier or regulator, not from the platform.

> [!WARNING]
>
> This page describes Orbit's platform controls. It is **not legal
> advice.** Which laws apply to your traffic, and what posture is
> adequate, depends on your jurisdiction, your recipients, and what you
> send. Confirm with qualified counsel.

***

## 1. How send-gate errors surface

Every compliance-gate refusal follows the same envelope, regardless of
which gate fired or which surface triggered the send:

* **HTTP status.** `422` for a permanent posture gap, `403` for a
  consent / permission refusal, `409` for a lock / in-use conflict, and
  `500` / `503` for a transient gate-read failure.

* **`error.code`.** A stable string (`SENDER_ID_NOT_REGISTERED`,
  `MESSAGING_CONSENT_REQUIRED`, `TCPA_FEDERAL_DIALING_WINDOW_BLOCKED`,
  etc.) — copy it verbatim into your search and you land on the exact
  gate.

* **`error.details`.** Machine-readable context the dashboard surfaces
  in the send dialog toast and the API caller logs: which recipient,
  which country, whether the gate is tenant-owned or platform-owned.

Where to read it:

| Surface | Where the code appears |
| - | - |
| API response | `error.code` in the JSON envelope |
| Dashboard send dialog | Toast body, Send-history row, and the per-send detail drawer |
| Audit log | `action` column carrying `messages.<gate>_blocked` or the per-gate `compliance.<gate>` entry |
| Webhook delivery failure | `delivery_failure` event payload with `failure_reason.code` |

***

## 2. Gate families table

| Gate family | Source module | What it gates | When it fires |
| - | - | - | - |
| **Sender registration** | `apps/api/src/lib/sender-registration-gate.ts` | Alphanumeric sender-ID sends by country | Destination country demands sender registration and the sender has no `approved` row |
| **Recording consent** | `apps/api/src/lib/recording-consent-gate.ts` | Call / conference recording start | DID is in a two-party-consent jurisdiction AND the org opted into enforcement AND no consent receipt exists |
| **Country gate** | `apps/api/src/lib/compliance-country-gate.ts` | SMS sends to regulated destinations | Destination country is on the DB-backed `platform_compliance_country_overrides` registry and the tenant has no active compliance profile |
| **TCPA preflight** | `apps/api/src/lib/tcpa-preflight.ts` | SMS / MMS sends to US (+1) recipients | Org opted into the TCPA known-litigator check AND the recipient number is flagged on the litigator list with no matching consent |
| **Consent preflight** | `apps/api/src/lib/consent-preflight.ts` | Any gated-channel outbound send | Tenant enabled `consent_required` AND the recipient has no recorded affirmative opt-in (or it expired) |
| **Inbox AI gate** | `apps/api/src/lib/inbox-ai-gate.ts` | Inbound AI translation / classification / sentiment | Tenant has not opted out of a default-ON AI pipeline — this gate is permissive by design and never blocks |
| **HIPAA BAA gate** | `apps/api/src/lib/compliance/baa-gate.ts` | Any send when HIPAA mode is enabled | Org has `hipaa_required = true` but no executed, in-term BAA |

The per-code Q\&A below is organised by gate family, with each entry
following the same shape: symptom, root cause, tenant-owned fix,
re-verify step, and escalation path.

***

## 3. Per-code Q\&A

### Sender registration

#### `SENDER_ID_NOT_REGISTERED` — 422

**Symptom.** A send with a custom alphanumeric `from` value is refused
before dispatch, and the envelope carries `SENDER_ID_NOT_REGISTERED`.

**Root cause.** The destination country (`details.country`) requires
sender-ID registration and your alphanumeric sender has no registration
row at all. E.164 numbers, the platform default sender, and the shared
pool never raise this — only named alphanumerics fire it.

**Tenant-owned fix.** Register the sender under Settings → Sender IDs.
Read the country's requirements on
[`GET /api/v1/compliance/country-requirements`](https://docs.orbit.devotel.io/compliance/country-requirements)
first — the `registration` field tells you whether the destination
demands it.

**Re-verify.** Retry the send after registration reaches `approved`, or
switch to a numeric sender (which skips the probe).

**Escalate.** Never — sender registration is a tenant action. A
`rejected` row means the carrier declined; fix the cited gap and
re-submit.

***

#### `SENDER_ID_NOT_APPROVED` — 422

**Symptom.** Same as above, but the row exists and is stuck at
`pending`, `rejected`, or `expired`.

**Root cause.** The sender has a registration row, but it has not
cleared carrier review. The gate only passes `approved` rows.

**Tenant-owned fix.** Wait for `pending` → `approved` (lead times on
[`GET /api/v1/compliance/country-requirements`](https://docs.orbit.devotel.io/compliance/country-requirements)),
or fix the reviewer notes on a `rejected` row and re-submit.

**Re-verify.** Read the sender's status on
`GET /api/v1/developer/sender-ids` — once `approved`, re-send.

**Escalate.** A `rejected` row with no reviewer notes: open a ticket
with the sender-id asset id and country code.

***

#### `SENDER_ID_CHECK_UNAVAILABLE` — 503

**Symptom.** The gate's own read of the sender-ID compliance registry
failed.

**Root cause.** Transient DB or network blip — the gate refuses to guess
and fails open (registers) rather than silently skipping a regulator
gate.

**Tenant-owned fix.** Retry with backoff. This code is transient by
design and `Retry-After` friendly.

**Escalate.** Open a ticket with `meta.request_id` if it persists past
three retries.

***

### Recording consent

#### `RECORDING_CONSENT_REQUIRED` — 422

**Symptom.** A call-recording or conference-recording start is refused
with `RECORDING_CONSENT_REQUIRED`.

**Root cause.** Your DID is in a two-party-consent jurisdiction (US
states CA / IL / FL / MD / MA / NH / PA / WA / CT / MT / DE / HI / OR /
VT, or countries AE / KR / TR and most EU member states) AND your org
has opted into recording-consent enforcement via Settings → Compliance →
Recording — but no consent receipt was captured before the recording
start.

**Tenant-owned fix.** Capture consent through the IVR prompt (plays the
required notice and collects DTMF or speech confirmation) before
starting the recording. Pass the returned receipt id to the recording
start call.

**Re-verify.** After capturing a receipt, start the recording again with
the receipt id in the request payload.

**Escalate.** Never — the fix is capturing consent. The gate only fires
when your org explicitly turned on enforcement.

***

#### `RECORDING_CONSENT_INVALID` — 422

**Symptom.** You passed a receipt id but the recording start is still
refused with `RECORDING_CONSENT_INVALID`.

**Root cause.** One of five failures, named in `details.reason`:

* `RECEIPT_NOT_FOUND` — the receipt id doesn't match any row in your
  tenant's consent-receipt table.
* `RECEIPT_CONFERENCE_MISMATCH` — the receipt was minted for a different
  conference.
* `RECEIPT_REVOKED` — a participant withdrew consent (GDPR Art 7(3)).
* `RECEIPT_DECLINED` — a participant declined consent.
* `RECEIPT_EXPIRED` — the receipt's 24-hour TTL elapsed.

**Tenant-owned fix.** Re-collect consent for the current conference and
pass the fresh receipt id.

**Re-verify.** Start recording with the new receipt id.

**Escalate.** If `details.reason` contradicts the dashboard's consent
receipt ledger, open a ticket with the receipt id, conference id, and
`meta.request_id`.

***

### Country gate

#### `COMPLIANCE_PROFILE_REQUIRED` — 422

**Symptom.** An SMS send to a compliance-gated destination country is
refused with `COMPLIANCE_PROFILE_REQUIRED`.

**Root cause.** The destination country is on the
`platform_compliance_country_overrides` registry and your tenant has no
active (approved) compliance profile covering that country. This gate
consults the same DB-backed override registry used by the
send-preflight path — the set of gated countries is explicit per
country, not a static list.

**Tenant-owned fix.** Create and submit a compliance profile covering
the destination country. The dashboard wizard deep-links from the toast.

**Re-verify.** After the profile reaches `approved`, re-send; the gate
re-reads the profile on every call (no stale cache).

**Escalate.** Never — the fix is a tenant posture change. The full
profile lifecycle is on
[Compliance profile lifecycle errors](https://docs.orbit.devotel.io/compliance/compliance-profile-lifecycle-errors.md).

***

#### `COMPLIANCE_PROFILE_NOT_APPROVED` — 422

**Symptom.** Same as above, but a compliance profile exists — it is just
not in `approved` state.

**Root cause.** Your profile is `pending_review`, `rejected`, or
`expired`. The gate only passes `approved` profiles.

**Tenant-owned fix.** Wait for carrier review (`pending_review`), fix
reviewer notes and re-submit (`rejected`), or renew (`expired`).

**Re-verify.** Read the profile status on
`GET /api/v1/compliance/profiles`; once `approved`, re-send.

**Escalate.** A rejected profile with no reviewer notes: open a ticket
with the profile id.

***

#### `COMPLIANCE_NUMBER_TYPE_NOT_COVERED` — 422

**Symptom.** A number purchase is refused even though a compliance
profile is approved — the carrier rejects the order because the
approved bundle does not cover this NUMBER TYPE in the number's
country (for example an approved LOCAL-only bundle vs a MOBILE number).

**Root cause.** The requirement group behind your approved profile was
validated for one number type; the number you picked needs its own
carrier approval. This is not transient — retrying with the same
profile fails identically, so the dashboard never shows
"temporarily unavailable" for it.

**Tenant-owned fix.** Choose a number type your profile already covers,
or contact support to widen the approved profile to the missing number
type. The error `details` name `required_number_type` and
`country_code` when the carrier rejection carries them.

**Re-verify.** Re-attempt the purchase with a covered number type, or
after support confirms the widened approval.

**Escalate.** Support — the widening happens in the carrier review of
your compliance bundle, not in the dashboard.

***

### TCPA preflight

#### `MESSAGING_TCPA_KNOWN_LITIGATOR` — 403

**Symptom.** An SMS or MMS send to a +1 (US) recipient is refused with
`MESSAGING_TCPA_KNOWN_LITIGATOR`.

**Root cause.** Your org opted into the TCPA known-litigator check (a
tenant-level opt-in) and the recipient's phone number matched the
litigator list (Numeracle or the platform seed) with no recorded
affirmative consent for that (contact, channel) pair.

**Tenant-owned fix.** Either capture written, verifiable consent for the
recipient and record it as an `opted_in` consent row before re-sending,
or remove the recipient from the send. The gate permits a consented
bypass — once a matching `opted_in` consent row exists, the send
proceeds with an audit breadcrumb.

**Re-verify.** Confirm the consent row is present (check Contacts →
Consent in the dashboard) and re-send. The send passes on the consented
path.

**Escalate.** If a non-litigator number is blocked, open a ticket with
the redacted phone (the envelope shows first five digits) and
`meta.request_id`. The full gate is on
[TCPA Known-Litigator Gate](https://docs.orbit.devotel.io/compliance/tcpa-known-litigator.md).

***

### Consent preflight

#### `MESSAGING_CONSENT_REQUIRED` — 403

**Symptom.** An outbound send on a gated channel is refused with
`MESSAGING_CONSENT_REQUIRED`.

**Root cause.** Your org enabled the `consent_required` gate (off by
default) and the recipient has no recorded affirmative opt-in for this
channel, or the recorded opt-in has expired. `details.consent_expired:
true` means a grant exists but its `valid_until` window elapsed;
`false` means no opt-in was ever recorded.

**Tenant-owned fix.** If expired: re-capture consent for the contact.
If missing: capture a confirmed opt-in before sending. Transactional /
OTP sends are exempt by default (`exempt_transactional: true`) — only
marketing and un-categorised sends are gated.

**Re-verify.** Record the opt-in (the dashboard Consent surface or
`POST /api/v1/compliance/consent`), then re-send.

**Escalate.** Never — the fix lives in your consent ledger.

***

### HIPAA BAA gate

#### `HIPAA_BAA_REQUIRED` — 422

**Symptom.** A send is refused with `HIPAA_BAA_REQUIRED` and
`details.reason` names one of `not_signed`, `pending`, `expired`, or
`verification_unavailable`.

**Root cause.** Your org set `hipaa_required: true` in org settings, but
the Business Associate Agreement is not `executed` and in-term. The
gate reads the canonical BAA columns on `organizations` (`baa_status`,
`baa_executed_at`) — it does not consult the legacy JSONB mirror.

**Tenant-owned fix.** Execute the BAA on the
[BAA flow](https://docs.orbit.devotel.io/compliance/baa.md) — attest PHI scope, preview, e-sign by
typing the name. Until `baa_status = executed`, HIPAA mode refuses
every send.

**Re-verify.** Read current BAA status on
`GET /api/v1/compliance/baa`; once `executed`, re-send.

**Escalate.** If the BAA flow itself is blocked by a workspace-role
restriction, the 403 path is on
[Troubleshooting: HIPAA enable blocked](https://docs.orbit.devotel.io/troubleshooting/hipaa-enable-baa-not-executed.md).

***

#### `HIPAA_BAA_GATE_DB_FAIL` — 500

**Symptom.** The BAA gate's own database read failed.

**Root cause.** A transient pgbouncer or Postgres blip — the gate
refuses to guess whether a BAA is in place and fails closed, because
transmitting PHI without a verified BAA carries regulatory exposure
(45 CFR § 164.504(e)).

**Tenant-owned fix.** Retry with backoff.

**Escalate.** Open a ticket with `meta.request_id` if it persists past
three retries.

***

***

## 4. Escalation path

Use this decision fork to decide whether you fix it yourself or open a
ticket:

| Situation | Action |
| - | - |
| A permanent 4xx code (422, 403, 409) and you can change the tenant posture | Fix it — register the sender, execute the BAA, capture consent, or attach the profile |
| A permanent 4xx code and a carrier / regulator action is blocking (rejected registration, declined profile) | Fix the cited gap and re-submit; the carrier reviews, not the platform |
| A transient 5xx code (500, 503) that clears on retry | Retry with backoff — these are designed to be `Retry-After` friendly |
| A transient 5xx code that persists past three retries | Open a ticket with the code, HTTP status, `meta.request_id`, and the referencing asset id |
| A 4xx code persists after the documented posture fix | Open a ticket — include the code, `meta.request_id`, the asset id you changed, and the destination country |
| The envelope contradicts what your dashboard shows (e.g., a profile reads `approved` on GET but the gate says `REQUIRED`) | Open a ticket — this is a platform inconsistency, not a posture gap |

***

## 5. Legal-mandate note

Every compliance gate on this page is **tenant-owned.** You decide
whether to enable TCPA litigator checks, whether to require consent
preflight, whether to opt into recording-consent enforcement, and which
countries to gate. The platform enforces the posture you configured; it
does not impose compliance on your behalf. The sole exception is the
**US TCPA federal voice dialing window** (8 AM–9 PM recipient-local for
+1 campaign / dialer voice) — that guard is platform-global with no
tenant toggle.

> [!NOTE]
>
> The full posture model is documented per the platform's compliance
> architecture — every gate you can toggle, and the one you cannot, is
> on [Send Gates](https://docs.orbit.devotel.io/compliance/send-gates.md). The federal voice guard is
> on [The TCPA federal voice guard](https://docs.orbit.devotel.io/concepts/tcpa-federal-voice-guard.md).

***

## See also

* [Send-gate decision fork](https://docs.orbit.devotel.io/compliance/send-gate-decision-fork.md) — the
  canonical decision tree: which gate fires, in what order, with what
  outcome.
* [Troubleshooting blocked-class errors](https://docs.orbit.devotel.io/compliance/troubleshooting-blocked-class-errors.md)
  — the companion deep-dive for class-level send refusals, including the
  block classification taxonomy.
* [Compliance send-gate error codes](https://docs.orbit.devotel.io/compliance/troubleshooting-compliance-error-codes.md)
  — the full enumerated error-code surface with the full per-code walkthrough
  and cross-reference map.
* [Compliance profile lifecycle errors](https://docs.orbit.devotel.io/compliance/compliance-profile-lifecycle-errors.md)
  — the profile attach / mutate / delete 422 / 409 codes the country gate
  and sender-registration gates defer to.
* [Send Gates](https://docs.orbit.devotel.io/compliance/send-gates.md) — the canonical pre-send gate
  inventory and the per-gate tenant opt-in model.
* [TCPA Known-Litigator Gate](https://docs.orbit.devotel.io/compliance/tcpa-known-litigator.md) — the
  consented-bypass companion to the TCPA preflight gate.
* [HIPAA](https://docs.orbit.devotel.io/compliance/hipaa.md) and [BAA](https://docs.orbit.devotel.io/compliance/baa.md) — the BAA state
  machine, the e-sign flow, and the PHI vocabulary.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.