A credential template defines the schema for a verifiable credential — what attributes it contains, which are required, and which are always disclosed to verifiers. Templates are reusable: create one “Web Development Completion” template and use it to credential hundreds of youth.
The code field you set here determines the type URI — the bridge between issuers and verifiers across the ecosystem. When an opportunity provider creates a credential template, the type URI in the response is what employment providers reference in their presentation template to request matching credentials. Share this URI with any verifying partner who needs to check credentials of this type.
Short identifier (e.g. web-dev-completion). The API uses this to generate the full type URI in the response.
description
string
No
Description of what this credential represents
attributes
object
Yes
Key-value map of attribute definitions (see below)
Deprecation notice: The type field is deprecated for SD-JWT templates. Use code instead. If you pass type, the API will return a deprecation warning. Existing templates using type continue to work, but all new templates should use code.
Think carefully about alwaysDisclosed. This is a first-class concept, not a footnote:
alwaysDisclosed: true — The attribute is always visible to verifiers. Use for essential information like programme name and completion date.
alwaysDisclosed: false — The youth chooses whether to share this attribute. Use for sensitive information like assessment scores, personal identifiers, or anything the youth might reasonably want to keep private.
In the example above, Thandi can share her “Web Development Completion” credential with an employer while withholding her assessment score — that’s her choice, not the issuer’s or the verifier’s.
YoID provides ecosystem presets — standardised credential structures for common use cases. Partners can create a template directly from a preset, or customise one based on a preset.