JSON Schema Reference

Machine‑readable JSON Schema (draft‑2020‑12) definitions for all TCF message types.

Message Envelope Schema

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://tcf-spec.com/schemas/v0.4/envelope.json",
  "title": "TCF Message Envelope",
  "type": "object",
  "required": ["tcf_version", "message_id", "timestamp", "sender", "content"],
  "properties": {
    "tcf_version": {
      "type": "string",
      "pattern": "^\\d+\\.\\d+$"
    },
    "message_id": {
      "type": "string",
      "format": "uuid"
    },
    "timestamp": {
      "type": "string",
      "format": "date-time"
    }
  }
}
📥 Download full schema

Text Content Schema

{
  "$id": "https://tcf-spec.com/schemas/v0.4/content/text.json",
  "type": "object",
  "required": ["type", "body"],
  "properties": {
    "type": { "const": "text" },
    "body": { "type": "string", "minLength": 1 },
    "format": { "enum": ["plain", "markdown", "html"] }
  }
}

Download All Schemas

All schemas are available at https://tcf-spec.com/schemas/v0.4/ and can be used with any JSON Schema validator.

📦 Download schemas.zip