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

# Post email rulesevaluate



## OpenAPI

````yaml /openapi.json post /email-rules/evaluate
openapi: 3.1.1
info:
  title: Anima API
  version: 0.1.0
  description: >-
    The Anima API provides programmatic access to unified infrastructure for AI
    agents: create and manage agents; send and receive email; place phone calls
    and send/receive SMS and voice; store and retrieve vault credentials; manage
    agent identity; and configure webhooks for real-time events. Authenticate
    using a Bearer token or an API key passed via the X-API-Key header.
  contact:
    name: Anima Labs
    url: https://useanima.sh
    email: support@useanima.sh
  license:
    name: MIT
    url: https://opensource.org/licenses/MIT
servers:
  - url: https://api.useanima.sh/v1
    description: Production
security:
  - BearerAuth: []
  - ApiKeyAuth: []
paths:
  /email-rules/evaluate:
    post:
      operationId: emailRule.evaluate
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                address:
                  type: string
                  minLength: 1
                  maxLength: 320
                  description: The address to test
                direction:
                  enum:
                    - SEND
                    - RECEIVE
                  type: string
                  description: >-
                    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:
                  type: string
                  pattern: ^[cC][^\s-]{8,}$
                  description: >-
                    Evaluate as this agent. Omit to evaluate against org-wide
                    rules only.
              required:
                - address
                - direction
              description: Request body for testing an address against the configured rules
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  allowed:
                    type: boolean
                    description: Whether this address is permitted in this direction
                  reason:
                    enum:
                      - no-rules
                      - explicit-allow
                      - explicit-block
                      - allowlist-default-deny
                    type: string
                    description: >-
                      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:
                    anyOf:
                      - enum:
                          - agent
                          - org
                        type: string
                      - type: 'null'
                    description: >-
                      Which scope decided, or null when nothing matched and the
                      default applied
                  matchedRuleId:
                    anyOf:
                      - type: string
                        pattern: ^[cC][^\s-]{8,}$
                      - type: 'null'
                    description: >-
                      The rule that decided, or null when the verdict came from
                      a default
                required:
                  - allowed
                  - reason
                  - scope
                  - matchedRuleId
                description: >-
                  The verdict the send path or ingest would reach for this
                  address
components:
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: >-
        JWT Bearer token obtained from authentication. Pass as: Authorization:
        Bearer <token>
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: 'API key for programmatic access. Pass as: X-API-Key: <your-key>'

````