Overview
A credential template defines the schema for a verifiable credential — it specifies what attributes the credential will contain. Templates are reusable, so you create them once and use them to issue many credentials with different data.
The type field you set in a credential template is later used by verifiers in the credential presentation flow.
Endpoint
POST https://test.didxtech.com/me-creds/api/templates/credentials
Request
curl -X POST "https://test.didxtech.com/me-creds/api/templates/credentials" \
-H "Authorization: Bearer <access_token>" \
-H "Content-Type: application/json" \
-d '{
"name": "University Student Card",
"description": "Digital student identification card for university students",
"type": "UniversityCard",
"attributes": {
"studentId": {
"type": "string",
"name": "Student ID",
"description": "Unique student identification number",
"required": true,
"alwaysDisclosed": false
},
"fullName": {
"type": "string",
"name": "Full Name",
"description": "Student'\''s full legal name",
"required": true,
"alwaysDisclosed": true
},
"enrollmentDate": {
"type": "string",
"name": "Enrollment Date",
"description": "Date when student enrolled",
"required": true,
"alwaysDisclosed": false
},
"degreeProgram": {
"type": "string",
"name": "Degree Program",
"description": "Academic program of study",
"required": true,
"alwaysDisclosed": false
}
}
}'
Attribute Fields
Each attribute in the template acts like a form field. The following properties configure each one:
| Field | Type | Description |
|---|
type | string | Data type (string, date, etc.) |
name | string | Human-readable label for the attribute |
description | string | Description of the attribute |
required | boolean | Whether this attribute must be present |
alwaysDisclosed | boolean | If true, this attribute is always shared when the credential is presented |
Response
HTTP 201 Created
{
"data": {
"id": "tpl_6421a8905c17830c188e2e2f",
"name": "University Student Card",
"description": "Digital student identification card for university students",
"type": "https://metadata.paradym.id/types/university-card-v1",
"format": "sd-jwt-vc",
"attributes": {
"studentId": {
"type": "string",
"name": "Student ID",
"description": "Unique student identification number",
"required": true,
"alwaysDisclosed": false
},
"fullName": {
"type": "string",
"name": "Full Name",
"description": "Student's full legal name",
"required": true,
"alwaysDisclosed": true
},
"enrollmentDate": {
"type": "date",
"name": "Enrollment Date",
"description": "Date when student enrolled",
"required": true,
"alwaysDisclosed": false
},
"degreeProgram": {
"type": "string",
"name": "Degree Program",
"description": "Academic program of study",
"required": true,
"alwaysDisclosed": false
}
},
"createdAt": "2025-01-20T11:27:37.051Z",
"updatedAt": "2025-01-20T11:27:37.051Z",
"archivedAt": null,
"status": "active"
},
"links": {
"self": "https://test.didxtech.com/me-creds/api/templates/credentials/tpl_6421a8905c17830c188e2e2f",
"issuances": "https://test.didxtech.com/me-creds/api/templates/credentials/tpl_6421a8905c17830c188e2e2f/issuances"
},
"meta": {
"version": "1.0",
"totalAttributes": 4
}
}
Key Response Fields
| Field | Description |
|---|
id | Unique template identifier — save this for use in Step 3 |
type | A URI identifying the credential category, used by verifiers during presentation |
format | sd-jwt-vc — enables selective disclosure of attributes |
status | active once the template is ready for use |