---
title: "Validate an email message"
method: POST
path: "/v1/messages/validate/email"
tags: ["Messages"]
---

# Validate an email message

`POST /v1/messages/validate/email`

## Request

- Base URL: `https://api.samva.dev`
- URL: `https://api.samva.dev/v1/messages/validate/email`
- Auth: API key in header `x-api-key`

Resolves recipients, sender, and inline or published-template content without sending anything, creating contacts or messages, or counting toward your quota.

## Request body

- EmailSendMessagePayload
  - `conversationId` string
  - `metadata` MessageMetadata, nullable
  - `channel` 'email', required
  - `to` EmailRecipient[], required
    - union
      - object
        - `contactId` string, required
      - object
        - `email` string, required
        - `name` string, nullable
        - `displayName` string, nullable
  - `cc` EmailRecipient[], nullable
    - union
      - object
        - `contactId` string, required
      - object
        - `email` string, required
        - `name` string, nullable
        - `displayName` string, nullable
  - `bcc` EmailRecipient[], nullable
    - union
      - object
        - `contactId` string, required
      - object
        - `email` string, required
        - `name` string, nullable
        - `displayName` string, nullable
  - `from` EmailSender, nullable
    - `email` string, required
    - `name` string, nullable
  - `email` EmailContent, required
    - `subject` string, nullable
    - `html` string, nullable
    - `text` string, nullable
    - `attachments` EmailAttachment[], nullable
      - `filename` string, required
      - `content` string, nullable
      - `mediaId` string
      - `contentType` string, required
      - `size` integer, required
    - `publicationId` string
    - `inputContractId` string
    - `templateId` string
    - `templateSlug` string, nullable
    - `templateData` TemplateData
    - `locale` string
    - `timeZone` string
    - `inReplyToMessageId` string
    - `replyTo` string[], nullable
    - `unsubscribeGroupId` string
    - `tracking` EmailTrackingOverrideV1: Requested per-send engagement tracking policy. Recipient opt-out takes precedence, then explicit fields, organization defaults, and product defaults.
      - `opens` boolean: Override open tracking for this send. Omit to inherit the organization default. A recipient tracking opt-out always disables tracking.
      - `clicks` boolean: Override click tracking for this send. Omit to inherit the organization default. A recipient tracking opt-out always disables tracking.
    - `footer` EmailFooterOverride
      - `enabled` boolean, nullable

## Response `200`

ValidateEmailResponse

- ValidateEmailResponse
  - `valid` true, required
  - `from` object, required
    - `email` string, required
    - `name` string, nullable, required
  - `recipientCount` integer, required
  - `content` object, required
    - `source` 'inline' | 'template', required
    - `subject` string, required
    - `hasHtml` boolean, required
    - `hasText` boolean, required

## Other responses

- `401`: UnauthorizedError
- `403`: ForbiddenError
- `404`: ResourceNotFoundError
- `422`: ValidationError
- `500`: InternalError
- `503`: SenderNotReadyError
- `504`: GatewayTimeoutError

---

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