XooCode(){

Message

Message is a CreativeWork subtype for any single message from a sender to one or more recipients: emails, chat messages, SMS, push notifications, internal communications. It has 9 properties of its own: sender, recipient, toRecipient, ccRecipient, bccRecipient, dateSent, dateReceived, dateRead, and messageAttachment.

The type hierarchy is Thing → CreativeWork → Message. Use Message for generic message content. For email specifically, use the more specific EmailMessage subtype. Message markup is mostly read by Gmail and email clients, not standard search results, so it appears most often in email markup contexts (Gmail rich snippets in confirmation emails) rather than on public web pages.

Full example of schema.org/Message json-ld markup

The markup is verified as valid with Rich Results Test from Google.

Highlight legend:Required by GoogleRecommendedOptional
schema.org/Message
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Message",
  "@id": "https://xoocode.com/messages/internal-2026-04-14-001#message",
  "name": "Re: XooCon keynote outline",
  "sender": {
    "@type": "Person",
    "name": "Tomas Herrera",
    "email": "tomas@xoocode.com"
  },
  "toRecipient": {
    "@type": "Person",
    "name": "Lena Vasquez",
    "email": "lena@xoocode.com"
  },
  "ccRecipient": {
    "@type": "Person",
    "name": "Marcus Webb",
    "email": "marcus@xoocode.com"
  },
  "dateSent": "2026-04-14T14:30:00-04:00",
  "dateReceived": "2026-04-14T14:30:02-04:00",
  "dateRead": "2026-04-14T15:12:00-04:00",
  "text": "Sharing the updated keynote outline. The AI-assisted markup demo is the centerpiece, with 10 minutes for live coding.",
  "messageAttachment": {
    "@type": "DigitalDocument",
    "name": "XooCon 2026 keynote outline v3.pdf",
    "url": "https://xoocode.com/internal/xoocon-2026-keynote-v3.pdf"
  }
}
</script>

sender and recipient variants

sender identifies who sent the message. recipient is the generic catch-all for the receiver. toRecipient, ccRecipient, and bccRecipient are email-style specifics. Each takes a Person, Organization, ContactPoint, or Audience. For a single direct recipient, recipient alone is sufficient; for email-style messaging with cc and bcc, use the explicit variants.

dateSent, dateReceived, dateRead

Three timestamps for the message lifecycle. dateSent is when the sender sent it. dateReceived is when it arrived. dateRead is when the recipient opened it (read receipt). All take DateTime in ISO 8601 format. Most messages only have dateSent; the others depend on whether you have read receipts or detailed delivery tracking.

Minimal valid version

The smallest markup that still produces a valid Message entity. Use it as the floor. Reach for the advanced example above when you want search engines and AI agents to understand more about your content.

schema.org/Message (minimal)
<script type="application/ld+json">
{
  "@context": "https://schema.org",
  "@type": "Message",
  "sender": { "@type": "Person", "name": "Tomas Herrera" },
  "toRecipient": { "@type": "Person", "name": "Lena Vasquez" },
  "dateSent": "2026-04-14T14:30:00-04:00",
  "text": "Sharing the updated keynote outline."
}
</script>

Google rich results this unlocks

Markup matching this example makes your page eligible for the following Google Search rich results. The primary target drives the required / recommended property classification in the advanced code block above.

Common Message mistakes

Mistakes that pass validation but silently fail to earn rich results or mislead consumers walking the graph. Avoid these and your markup will be ahead of most sites in the wild.

  1. 01

    Using Message for an email

    Wrong
    "@type": "Message" for an email
    Right
    "@type": "EmailMessage" for emails specifically

    EmailMessage is the email-specific subtype. Email clients (Gmail) read EmailMessage to trigger email-specific behavior. Use generic Message only for non-email message content (chat, SMS, push notifications).

  2. 02

    recipient as a string

    Wrong
    "recipient": "lena@xoocode.com"
    Right
    "recipient": { "@type": "Person", "name": "Lena Vasquez", "email": "lena@xoocode.com" }

    recipient (and sender) expect Person, Organization, ContactPoint, or Audience objects. A bare email string loses the structured information. Use the structured form so consumers can match the recipient to a known entity.

About the example data

An internal team message from Xoo Code's developer advocate Tomas Herrera to Lena Vasquez about the upcoming XooCon keynote.

Comments

Loading comments...

Leave a comment