Credential templates
A credential template defines the fields and the format of a credential. Every credential you issue from a template has the same structure, so you define the fields once and reuse the template as often as you need.
For example, a Digital Visa template may include:
- Visa holder's name
- Passport number
- Visa type (for example tourist, work or study)
- Issuing country
- Date of issue
- Expiry date
- Issuing authority
- Visa conditions (for example length of stay or number of entries)
You can then issue many visas from this template, each with different values.
The credential formats you can choose depend on your ecosystem:
- EU Digital Identity: JSON-LD, SD-JWT or mDoc. You can also import a JSON-LD template.
- Microsoft Entra: JWT-VC.
- cheqd: AnonCreds or JSON-LD. You can also import AnonCreds and JSON-LD templates.
- Indicio: AnonCreds or JSON-LD. You can also import AnonCreds and JSON-LD templates.
- Polygon: JSON-LD. You can also import a JSON-LD template.
For a side-by-side view of formats per ecosystem, see Compatibility.
Before you start
Make sure you have:
- An API key for your ecosystem.
- An organization in that ecosystem.
Steps
This example creates a JSON-LD credential template in the EU Digital Identity ecosystem. The steps are the same for other formats and ecosystems.
- Open the API Reference and select the EU Digital Identity Ecosystem API under Hovi Connect API.

- Go to the Credential Templates section.

- Open POST - Create Template (JSON-LD) and click Test Request.

- Enter your API key as a Bearer Token, fill in the body parameters and click Send.

The response includes the new template's credentialTemplateId, which you use when you issue credentials.
To be able to revoke credentials later, create an EU Digital Identity SD-JWT template with supportRevocation set to true. See Revoke a credential.
EU Digital Identity options (JSON-LD, SD-JWT and mDoc templates):
credentialScope(optional): the scope wallets use to ask for this credential, for ecosystems that define their own scope values, for exampleeu.europa.ec.eudi.pid.1. If you leave it out, Hovi generates one from the credential type. It can't contain spaces, double quotes or backslashes, and you can't change it after the template is created.authorization: trueon an attribute: when you issue with the authorization code flow, this attribute is filled from the holder's sign-in instead ofcredentialValues. Its name must match the sign-in detail exactly, for examplegiven_nameoremail. Top-level attributes only.
What happens next
Issue a credential from your template. The Credential Templates endpoints also let you list, update and delete templates; see the Credential Templates endpoints.