---
title: "POST /email-rules/evaluate"
method: POST
path: "/email-rules/evaluate"
---

# POST /email-rules/evaluate

`POST /email-rules/evaluate`

## Request

- Base URL: `https://api.useanima.sh/v1`
- URL: `https://api.useanima.sh/v1/email-rules/evaluate`
- Auth: one of:
  - HTTP bearer
  - API key in header `X-API-Key`

## Request body

- object: Request body for testing an address against the configured rules
  - `address` string, required: The address to test
  - `direction` 'SEND' | 'RECEIVE', required: SEND governs who this org's agents may email (enforced when a send is attempted); RECEIVE governs whose mail is accepted for them (enforced at ingest, before the message is stored or any webhook fires). Reply-scope is not implemented.
  - `agentId` string: Evaluate as this agent. Omit to evaluate against org-wide rules only.

## Response `200`

OK

- object: The verdict the send path or ingest would reach for this address
  - `allowed` boolean, required: Whether this address is permitted in this direction
  - `reason` 'no-rules' | 'explicit-allow' | 'explicit-block' | 'allowlist-default-deny', required: Why. 'allowlist-default-deny' means no rule names this address but an allow-list is active and does not cover it — the case operators most often mistake for a bug.
  - `scope` 'agent' | 'org', nullable, required: Which scope decided, or null when nothing matched and the default applied
  - `matchedRuleId` string, nullable, required: The rule that decided, or null when the verdict came from a default

---

[API](https://skmtc.dev/useanima/apis/anima-api.md) · [All operations](https://skmtc.dev/useanima/apis/anima-api/llms.txt) · [OpenAPI document](https://skmtc.dev/useanima/apis/anima-api/revisions/aaa148188980?raw)
