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

# Compliance and opt-outs

> UCC content rules, promotional quiet hours, opt-out suppression, and the pre-flight compliance check for UgaText SMS.

UgaText enforces Uganda Communications Commission (UCC) and East African telecom anti-spam directives through a real-time 21-rule compliance engine. Every message is checked before it reaches the carrier.

## Content rules

> **Sender identity**
>
> Every broadcast must come from a verified alphanumeric [Sender ID](https://docs.ugatext.com/sender-ids.md) (3 to 11 characters) or the default `UGATEXT`. Impersonating banks, government agencies, or telecom operators (for example `MTN`, `AIRTEL`, `BOU`, `URA`) without authorization is rejected with `403 COMPLIANCE_BLOCKED`.

> **Prohibited content**
>
> These are blocked automatically (decision `BLOCK`):
>
> * Phishing links
> * Fake Mobile Money PIN prompts
> * Unlicensed loan scams
> * Betting or gambling broadcasts to unverified lists
> * Fraudulent impersonation

> **Promotional quiet hours**
>
> Promotional and marketing broadcasts may only be sent between **07:00 and 21:00 EAT** (`Africa/Kampala`). Transactional messages such as OTPs, payment receipts, and security alerts can be sent 24/7.

> **URL and link shortener inspection**
>
> Shortened URLs that hide malicious redirects or credential-harvesting domains are flagged for review (decision `REVIEW`) or blocked.

## Opt-outs

### Include an opt-out line

Marketing and promotional campaigns must end with clear unsubscribe instructions, for example `Reply STOP to unsubscribe`.

### Suppression list

A number is added to your opt-out suppression list immediately when:

* The recipient replies `STOP`, `UNSUBSCRIBE`, or `OPTOUT`.
* You add it from the dashboard or through the API (`/api/opt-outs`).

Sending promotional SMS to a suppressed number returns `422 NUMBER_SUPPRESSED_ON_OPT_OUT_LIST`.

> [!NOTE]
>
> In bulk broadcasts, suppressed numbers are filtered out before billing, so you are not charged for them.

## Pre-flight compliance check

Validate message copy before you send with `POST /compliance/inspect`.

```bash theme={null}
curl -X POST https://ugatext.com/api/v1/compliance/inspect \
  -H "Content-Type: application/json" \
  -d '{
    "sender_id": "UGATEXT",
    "message": "Your verification code is 482910. Valid for 10 minutes."
  }'
```

| Field | Description |
| - | - |
| `decision` | `APPROVE`, `REVIEW`, or `BLOCK`. |
| `risk_score` | Risk from 0 to 100. |
| `encoding` | `GSM-7` or `UCS-2`. |
| `sms_parts` | Number of segments the message uses. |
| `violations` | Rules the message breaks. |
| `warnings` | Issues that do not block sending. |

## Related errors

| Status | Code | Meaning |
| - | - | - |
| 403 | `COMPLIANCE_BLOCKED` | The message or Sender ID failed compliance checks. |
| 422 | `NUMBER_SUPPRESSED_ON_OPT_OUT_LIST` | The recipient opted out of promotional messages. |

See [Errors and limits](https://docs.ugatext.com/errors.md) for all error codes.


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