Schemas and tools
Start with a complete email example and its contract. The schemas and checks are here when you're ready to connect your service.
Draft artifacts
These downloads come from the same sources as the reader and Registry. They are working drafts; a shape check does not establish message authenticity, permission or safe execution.
- Publication email
The complete unsigned MIME illustration, with the generated MAP description.
- Native OpenAPI example
The illustrative publishing service’s native read and decision operations.
- MCP exchange
Illustrative tool schemas, reads, decisions and results for the same proposal.
- Implementation record schema
Service identity, exact type, binding and support evidence; artifact fields for distributed integrations.
- Core schema
Common description fields, types and structural constraints.
- Contract schema
Type identity, requirements, operation semantics, effects and bindings.
- JSON-LD context
The fixed context for offline processing of MAP descriptions.
- Shape vectors
27 executable valid and invalid cases against the Core and details schemas.
- JSON vectors
62 MAP JSON texts parsed within the 64 KiB description limit: each is refused, or accepted with its RFC 8785 canonical form.
- RFC 8785 vectors
9 JSON values with their canonical form and digest, including the Publication Approval example description.
- Runtime scenarios
54 scenario skeletons for service and consumer adapters. These are not executable runtime tests.
- Internet-Draft source
The generated individual -00 candidate in RFCXML. No IETF submission or adoption is claimed.
Contracts and examples
Each type has its own contract version and canonical digest. The Registry publishes types independently of packages.
Machine-readable catalogueCheck files from the command line
The npm package includes a mailschema command for local files. This example downloads the Campaign Send Approval contract and its complete description, then checks each. Nothing is uploaded or changed.
npm install mailschema@0.3.3
curl -O https://mailschema.org/artifacts/map-0.3/contracts/campaign-send-approval-0.1.json
curl -O https://mailschema.org/artifacts/map-0.3/examples/campaign-send-approval.json
npx mailschema contract campaign-send-approval-0.1.json
npx mailschema description campaign-send-approval.json --contract campaign-send-approval-0.1.jsoncontract prints the contract’s identifier and version, then its digest. A description names that digest in type.contractDigest, and implementations pin contracts by it. description prints the description’s @id, then the digest of the description itself; with --contract, it first checks that the description uses that contract as it allows. Each digest is the SHA-256 of the document’s RFC 8785 canonical JSON.
Valid type contract https://mailschema.org/types/campaign-send-approval 0.1
sha-256:de3c88a0712adb1d0c6e82f437b825c83520d8e1c44c7b032a2cfcfe5ce55731
Valid MAP 0.3 description urn:uuid:0199a6c2-4b1e-7c3a-9d2e-5f8a1b2c3d40
sha-256:850cebcbd01af512c9a360adfdc5f672d08f5bc54ae68539508b5eb98cc44be1An invalid file prints every reason on standard error and exits with status 1. mailschema implementation checks a Registry implementation record, and mailschema --help lists the commands. Checking does not authenticate a message, establish a service’s authority or perform an action.
Validate the sources
In a checkout of the repository, the specification check validates contracts, checks example digests, expands JSON-LD offline and runs the shape vectors. It also checks that runtime scenario references point to real requirements.
npm ci
npm run spec:check
npm run draft:checkAfter editing a contract or source example, run npm run spec:generate to update its projections. Runtime conformance requires service and consumer adapters with observable evidence.
Language packages
Each release carries the profile record, context and schemas byte for byte, verified by public registry readback.
- JavaScript · npm 0.3.3
MAP 0.3 processing, TypeScript definitions, the artifacts and a local CLI.
JavaScriptnpm install mailschema@0.3.3 - Python · PyPI 0.3.0
The profile record, context and schemas.
Pythonpip install mailschema==0.3.0 - Rust · crates.io 0.3.0
The profile record, context and schemas, embedded.
Rustcargo add mailschema@0.3.0 - Go · Go modules 0.3.0
The profile record, context and schemas, embedded.
Gogo get github.com/mailschema/go@v0.3.0 - Ruby · RubyGems 0.3.1
MAP 0.3 processing, the artifacts, and helpers for the description part and qualifying signatures.
Rubygem install mailschema -v 0.3.1