---
title: "Check if rule matches email"
method: POST
path: "/api/e2/guard/{id}/check"
tags: ["Guard"]
---

# Check if rule matches email

`POST /api/e2/guard/{id}/check`

Test a guard rule against a specific email to see if it would match.

## Path parameters

- `id` string, required

## Request body

- object
  - `structuredEmailId` string, required — ID of the email to test against the rule

## Response `200`

Response for status 200

- union
  - object
    - `matched` boolean, required
    - `matchDetails` object[]
      - `criteria` string, required
      - `value` string, required
    - `reason` string
  - object
    - `matched` false, required
    - `error` string, required

## Other responses

- `400` — Response for status 400
- `401` — Response for status 401
- `500` — Response for status 500

---

[API](https://skmtc.dev/stainless-api/apis/inbound-email-api.md) · [All operations](https://skmtc.dev/stainless-api/apis/inbound-email-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/stainless-api/inbound-email-api/revisions/e279d3cb940b/schema)
