# Anti-spam — suppression, stop-list, marking

> **TL;DR for agents:** Before each send the pipeline checks: 1) is the recipient email in `suppression`? 2) is the recipient domain/company in `stop-lists`? 3) does the rendered body trigger any `marking/patterns` regex? Any hit blocks the send and logs the reason.

## Suppress an email globally

Scope: `suppression:write`. Use this when a recipient asks to never be contacted again — bounces and unsubscribes also auto-fill this list.

```bash
curl -s -X POST "https://api.live-direct-marketing.online/api/suppression" \
  -H "Authorization: Bearer $LDM_KEY" -H "Content-Type: application/json" \
  -d '{"email":"do-not-contact@example.com","reason":"unsubscribed"}'
```

## Check before send

Scope: `suppression:read`. The pipeline calls this for every recipient — agents can call it manually for pre-flight checks.

```bash
curl -s -X POST "https://api.live-direct-marketing.online/api/suppression/check" \
  -H "Authorization: Bearer $LDM_KEY" -H "Content-Type: application/json" \
  -d '{"emails":["a@example.com","b@example.com"]}'
```

## Stop-list a whole company / domain

Scope: `stoplist:write`. For competitor/sensitive domains. Stops outreach to **any** recipient under that domain.

```bash
curl -s -X POST "https://api.live-direct-marketing.online/api/stop-lists" \
  -H "Authorization: Bearer $LDM_KEY" -H "Content-Type: application/json" \
  -d '{"value":"competitor.com","type":"DOMAIN","reason":"competitor"}'
```

## Marking pattern (auto-classify outbound content)

Scope: `marking:write`. Regex matched against subject+body. When triggered, the dialog is auto-tagged for review. Used for compliance keywords.

```bash
curl -s -X POST "https://api.live-direct-marketing.online/api/marking/patterns" \
  -H "Authorization: Bearer $LDM_KEY" -H "Content-Type: application/json" \
  -d '{"pattern":"(?i)(crypto|forex|gambling)","label":"sensitive","action":"block"}'
```
