---
title: "Run Guardian checks on an email message"
method: GET
path: "/v1/email-messages/{emailMessageId}/guardian"
tags: ["Email messages"]
---

# Run Guardian checks on an email message

`GET /v1/email-messages/{emailMessageId}/guardian`

Validate an email message's content against Guardian rules and return any errors and warnings. Errors must be resolved before the email can be published, warnings are advisory.

## Response `200`

Successful.

- EmailMessageGuardianResponse
  - `errors` GuardianRule[], required — Validation errors. These must be resolved before the email can be published.
    - `rule` 'unsupportedContactProperties' | 'missingFallbackContactProperties' | 'unsupportedEventProperties' | 'missingFallbackEventProperties' | 'unsupportedDataVariables' | 'invalidCustomDataVariables' | 'missingRequiredDataVariables' | 'missingButtonHrefs' | 'invalidButtonHrefs' | 'shortenedYouTubeButtonHrefs' | 'missingLinkHrefs' | 'invalidLinkHrefs' | 'shortenedYouTubeLinkHrefs' | 'shortenedYouTubeImageHrefs' | 'emailWithoutMailtoButtonHrefs' | 'emailWithoutMailtoLinkHrefs' | 'emailWithoutMailtoImageHrefs' | 'bareArrayNodes' | 'missingSocialIconHrefs', required — The identifier of the Guardian rule that fired.
    - `title` string, required — A short summary of the rule.
    - `description` string, required — A longer explanation of why the issue matters.
    - `items` object[], required — The specific elements that triggered the rule.
      - `label` string, required — A human-readable label for the item (for example, link text or a property name).
      - `codeName` string — Machine-readable identifier when the rule refers to a property or variable, when applicable.
  - `warnings` GuardianRule[], required — Validation warnings. These are advisory and do not block publishing.
    - `rule` 'unsupportedContactProperties' | 'missingFallbackContactProperties' | 'unsupportedEventProperties' | 'missingFallbackEventProperties' | 'unsupportedDataVariables' | 'invalidCustomDataVariables' | 'missingRequiredDataVariables' | 'missingButtonHrefs' | 'invalidButtonHrefs' | 'shortenedYouTubeButtonHrefs' | 'missingLinkHrefs' | 'invalidLinkHrefs' | 'shortenedYouTubeLinkHrefs' | 'shortenedYouTubeImageHrefs' | 'emailWithoutMailtoButtonHrefs' | 'emailWithoutMailtoLinkHrefs' | 'emailWithoutMailtoImageHrefs' | 'bareArrayNodes' | 'missingSocialIconHrefs', required — The identifier of the Guardian rule that fired.
    - `title` string, required — A short summary of the rule.
    - `description` string, required — A longer explanation of why the issue matters.
    - `items` object[], required — The specific elements that triggered the rule.
      - `label` string, required — A human-readable label for the item (for example, link text or a property name).
      - `codeName` string — Machine-readable identifier when the rule refers to a property or variable, when applicable.

## Other responses

- `400` — Invalid `emailMessageId`.
- `401` — Invalid API key or content API not enabled for this team.
- `404` — Email message not found.
- `405` — Wrong HTTP request method.
- `409` — Email message uses MJML format.

---

[API](https://skmtc.net/loops/apis/loops-openapi-spec.md) · [All operations](https://skmtc.net/loops/apis/loops-openapi-spec/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/loops/loops-openapi-spec/versions/96c4b50b8b95/schema)
