Validate an email message

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

POST
/v1/messages/validate/email

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

Authorization

apiKey
headerx-api-key<token>

Request Body

application/json
  1. body
conversationId?|null|null
metadata?|null
channel*"email"
Value in"email"
to*array<|>
Items1 <= items
cc?array<|>|null|null
bcc?array<|>|null|null
from?|null
email*

Response Body

ValidateEmailResponse

application/json
  1. response
valid*true
Value intrue
from*
recipientCount*integer
Range-9007199254740991 <= value <= 9007199254740991
content*
Example Request
import { createClient } from "samva";const samva = createClient({ apiKey: process.env.SAMVA_API_KEY! });const result = await samva.messages.validateEmail({  "channel": "email",  "to": [    {      "contactId": "example"    }  ],  "email": {}});
Example Response
{  "valid": true,  "from": {    "email": "string",    "name": "string"  },  "recipientCount": -9007199254740991,  "content": {    "source": "inline",    "subject": "string",    "hasHtml": true,    "hasText": true  }}

Related documentation