### Install dependencies and run specification checks Source: https://mailschema.org/tools Run these npm commands in a repository checkout to install dependencies and validate contracts, example digests, JSON-LD expansion, shape vectors, and runtime scenario references. Requires Node.js 24 or later. ```bash npm ci npm run spec:check npm run draft:check ``` -------------------------------- ### Local verification commands Source: https://mailschema.org/contribute Run these commands from the repository root to install dependencies, generate the specification, and verify the project. The browser and repository use the same parsers, and repository verification also checks examples, digests, and generated artifacts. ```bash npm ci npm run spec:generate npm run verify ``` -------------------------------- ### HTTP readReview request and response Source: https://mailschema.org/examples The installed integration selects readReview. The service supplies the current proposal, permitted decisions, and the actual content to inspect. The example omits credentials; a real read uses the account already authorized for this service. ```http GET /reviews?reference=urn%3Aexample%3Aproposal%3Ap7 HTTP/1.1 Host: service.example Accept: application/json HTTP/1.1 200 OK Content-Type: application/json { "review_id": "p7", "interaction": "urn:uuid:0199a6c2-4b1e-7c3a-9d2e-5f8a1b2c3d41", "service": { "id": "https://service.example", "tenant": "urn:example:tenant:7" }, "addressed_to": "owner@example.net", "subject": { "id": "urn:example:object:42", "title": "Publish the getting started guide" }, "contract": { "id": "https://mailschema.org/types/publication-approval", "version": "0.1", "contractDigest": "sha-256:de91a49de4cba91209be253456e7c56709791fff877a060560d4eada0cc9468c" }, "reference": "urn:example:proposal:p7", "revision": "p7-r4", "expires_at": "2026-10-03T08:00:00Z", "allowed_actions": [ "approve", "decline", "request-changes" ], "publication": { "summary": "Publish the approved getting started guide.", "requester": "Documentation editor", "content": { "id": "urn:example:content:42", "revision": "r4", "title": "Getting started", "digest": "sha-256:4ffdf504c44a73a059c09c9cb30362c04f593b3af405b83bc084bb045067f95c" }, "destinations": [ { "id": "https://docs.service.example/guide", "account": "urn:example:account:7", "visibility": "public" } ], "schedule": { "mode": "immediate" } }, "state": "awaiting_review", "content_artifact": { "media_type": "text/markdown", "text": "# Getting started\n\nCreate a workspace, connect your inbox and invite your team.\n" } } ``` -------------------------------- ### Install Python package via pip Source: https://mailschema.org/tools Install the mailschema Python package version 0.3.0 from PyPI. Provides the profile record, context, and schemas. ```bash pip install mailschema==0.3.0 ``` -------------------------------- ### Install mailschema and check contract and description Source: https://mailschema.org/tools Install the mailschema npm package (Node.js 22 or later), download the Campaign Send Approval contract and its complete description, then run the mailschema contract and description commands. Nothing is uploaded or changed. The contract command prints the contract's identifier and version, then its digest. The description command prints the description's @id and its own digest; with --contract it first checks that the description uses that contract. Each digest is the SHA-256 of the document's RFC 8785 canonical JSON. ```bash npm install mailschema@0.3.2 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.json ``` -------------------------------- ### Install Ruby gem via gem install Source: https://mailschema.org/tools Install the mailschema Ruby gem version 0.3.0 from RubyGems. Provides MAP 0.3 processing, artifacts, and helpers for the description part and qualifying signatures. ```bash gem install mailschema -v 0.3.0 ``` -------------------------------- ### Get Go module via go get Source: https://mailschema.org/tools Fetch the mailschema Go module version 0.3.0 from Go modules. Provides the profile record, context, and schemas embedded. ```bash go get github.com/mailschema/go@v0.3.0 ``` -------------------------------- ### Install JavaScript package via npm Source: https://mailschema.org/tools Install the mailschema JavaScript package version 0.3.2 from npm. Provides MAP 0.3 processing, TypeScript definitions, artifacts, and a local CLI. ```bash npm install mailschema@0.3.2 ``` -------------------------------- ### Expected output from mailschema contract and description commands Source: https://mailschema.org/tools Shows the output of the mailschema contract and description commands for the Campaign Send Approval example. The contract output prints the contract identifier and version, then its SHA-256 digest. The description output prints the description's @id and its own digest. ```text 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:850cebcbd01af512c9a360adfdc5f672d08f5bc54ae68539508b5eb98cc44be1 ```