Endpoint
Request
Authoring guidance
Choose the code carefully
Your tenant alias is automatically prepended as the author, so code: "national-id" becomes the canonical id <your-alias>:national-id. That id is what issuers will pass as presetId for the lifetime of the preset.
Unlike SD-JWT, the mDoc DocType (type) is not derived from the code. You supply both independently.
Presets are immutable once published.
Choose the DocType (type) to match the spec or ecosystem
type is the mDoc DocType — a short reverse-DNS string that identifies the document. ISO 18013-5 mDLs use org.iso.18013.5.1.mDL; ecosystem credentials should follow whatever convention that ecosystem has set (e.g. za.gov.home-affairs.passport).
The DocType matches verbatim against docType on the issued mDoc, and verifiers use it to identify the credential. If you’re targeting interoperability with an existing verifier population, pick the DocType they already expect.
Group attributes into namespaces with intent
mDoc has no flat-attribute model — every attribute lives inside a namespace. Use namespaces to group attributes that logically belong together or that come from a common authority. For ISO-18013-5-compliant credentials, follow the spec’s namespace conventions (e.g.org.iso.18013.5.1 for standard mDL fields). For ecosystem-specific extensions, use a namespace under the ecosystem’s domain.
Plan around the 365-day validity cap
mDoc credentials are capped at 365 days of validity, counted from issuance. There’s nostart: validFrom option as in SD-JWT — the window always starts the moment the credential is issued.
Plan reissuance / rotation accordingly. For credentials that need to live longer, the issuer will need to re-issue annually (typically driven from the credential’s own expiry signals).

