Create a Web Credential configuration
Creates a new Web Credential configuration, a specific set of rules and parameters that are used to create and validate a particular type of verifiable credential. These rules and parameters define how the credential is structured and what data it contains when issued.
Analytic events
- CREDENTIAL_WEB_SEMANTIC_CREDENTIAL_CONFIGURATION_CREATE_START
- CREDENTIAL_WEB_SEMANTIC_CREDENTIAL_CONFIGURATION_CREATE_SUCCESS
- CREDENTIAL_WEB_SEMANTIC_CREDENTIAL_CONFIGURATION_CREATE_FAIL
Request Body schema: application/jsonrequired
The Credential Configuration payload
name required | string [ 1 .. 1024 ] characters Insert a meaningful name for the credential. This string is displayed on the top part of the credential in the holder's digital wallet. It is recommended to limit this value to 18 characters as any additional characters are not displayed on the credential. |
description | string <= 1024 characters Insert a meaningful description for the credential. This string is displayed below the name field on the credential in the holder's digital wallet. It is recommended to limist this value to 38 characters as any additional characters are not displayed on the credential. |
type required | string [ 1 .. 1024 ] characters Used to differentiate between different Web credential configurations on your tenant. Thus, its value must:
|
additionalTypes | Array of strings Additional credential types that can be referenced. Each entry must be 1-1024 characters long, with no whitespaces allowed. |
contexts | Array of strings Additional JSON-LD contexts to be included in the credential. As part of the credential issuance MATTR VII will auto-inject the following contexts, which reference the W3C Verifiable Credential definitions:
|
required | object Issuer details and branding for issued credentials. Refer to this video to learn more about branding best practices. |
proofType | string This is an optional field which defines the cryptographic algorithm used to sign the credential. The credential Issuer's DID must contain a key that supports the corresponding signing capability. If no
|
object Additional branding that will be applied to issued credentials. Refer to this video to learn more about branding best practices. | |
object This is where you specify how to map claims (user attributes) into issued credentials. Each field in the object corresponds to a claim in the issued credential, and contains one or more from the following attributes:
Example
| |
persist | boolean Default: false When set to
|
revocable | boolean Default: true When set to |
includeId | boolean Default: false When set to |
claimSourceId | string <uuid> References the unique identifier of a claims source that can be used to retrieve claims and include them in the issued credential. |
object Used to determine when will issued credentials expire. Can include any combination of |
Web Credential configuration created
Bad Request
- Payload
- curl
- Node.js
- JavaScript
- Python
- C#
- Java
{- "name": "Course credential",
- "description": "This credential shows that the person has attended a course.",
- "type": "CourseCredential",
- "additionalTypes": [
- "AlumniCredential",
- "EducationCredential"
], - "issuer": {
- "name": "ABC University",
}, - "proofType": "Ed25519Signature2018",
- "credentialBranding": {
- "backgroundColor": "#B00AA0",
}, - "claimMappings": {
- "firstName": {
- "mapFrom": "claims.given_name",
- "required": true
}, - "address": {
- "mapFrom": "claims.address.formatted"
}, - "providerSubjectId": {
- "mapFrom": "authenticationProvider.subjectId"
}
}, - "persist": false,
- "revocable": true,
- "includeId": true,
- "claimSourceId": "78e1b90c-401d-45bb-89c0-938da4d44c60",
- "expiresIn": {
- "years": 0,
- "months": 3,
- "weeks": 0,
- "days": 0,
- "hours": 0,
- "minutes": 0,
- "seconds": 0
}
}
- 201
- 400
{- "id": "983c0a86-204f-4431-9371-f5a22e506599",
- "name": "Course credential",
- "description": "This credential shows that the person has attended a course.",
- "type": "CourseCredential",
- "additionalTypes": [
- "AlumniCredential",
- "EducationCredential"
], - "issuer": {
- "name": "ABC University",
}, - "proofType": "Ed25519Signature2018",
- "credentialBranding": {
- "backgroundColor": "#B00AA0",
}, - "claimMappings": {
- "firstName": {
- "mapFrom": "claims.given_name",
- "required": true
}, - "address": {
- "mapFrom": "claims.address.formatted"
}, - "providerSubjectId": {
- "mapFrom": "authenticationProvider.subjectId"
}
}, - "persist": false,
- "revocable": true,
- "includeId": true,
- "claimSourceId": "78e1b90c-401d-45bb-89c0-938da4d44c60",
- "expiresIn": {
- "years": 0,
- "months": 3,
- "weeks": 0,
- "days": 0,
- "hours": 0,
- "minutes": 0,
- "seconds": 0
}
}
Retrieve all Web Credential configurations
Returns a list of all Web Credential Configurations on your tenant.
Analytic events
- CREDENTIAL_WEB_SEMANTIC_CREDENTIAL_CONFIGURATION_RETRIEVE_LIST_START
- CREDENTIAL_WEB_SEMANTIC_CREDENTIAL_CONFIGURATION_RETRIEVE_LIST_SUCCESS
- CREDENTIAL_WEB_SEMANTIC_CREDENTIAL_CONFIGURATION_RETRIEVE_LIST_FAIL
query Parameters
Web Credential configurations retrieved
Bad Request
- curl
- Node.js
- JavaScript
- Python
- C#
- Java
- 200
- 400
{- "nextCursor": "Y3JlYXRlZEF0PTIwMjAtMDgtMjVUMDY6NDY6MDkuNTEwWiZpZD1hNjZmZmVhNS04NDhlLTQzOWQtODBhNC1kZGE1NWY1M2UzNmM",
- "data": [
- {
- "id": "983c0a86-204f-4431-9371-f5a22e506599",
- "name": "Course credential",
- "description": "This credential shows that the person has attended a course.",
- "type": "CourseCredential",
- "additionalTypes": [
- "AlumniCredential",
- "EducationCredential"
], - "issuer": {
- "name": "ABC University",
}, - "proofType": "Ed25519Signature2018",
- "credentialBranding": {
- "backgroundColor": "#B00AA0",
}, - "claimMappings": {
- "firstName": {
- "mapFrom": "claims.given_name",
- "required": true
}, - "address": {
- "mapFrom": "claims.address.formatted"
}, - "providerSubjectId": {
- "mapFrom": "authenticationProvider.subjectId"
}
}, - "persist": false,
- "revocable": true,
- "includeId": true,
- "claimSourceId": "78e1b90c-401d-45bb-89c0-938da4d44c60",
- "expiresIn": {
- "years": 0,
- "months": 3,
- "weeks": 0,
- "days": 0,
- "hours": 0,
- "minutes": 0,
- "seconds": 0
}
}
]
}
Retrieve a Web Credential configuration
Retrieve a Web Credential configuration by providing its ID.
Analytic events
- CREDENTIAL_WEB_SEMANTIC_CREDENTIAL_CONFIGURATION_RETRIEVE_START
- CREDENTIAL_WEB_SEMANTIC_CREDENTIAL_CONFIGURATION_RETRIEVE_SUCCESS
- CREDENTIAL_WEB_SEMANTIC_CREDENTIAL_CONFIGURATION_RETRIEVE_FAIL
Web Credential configuration retrieved
Bad Request
The Credential Configuration is not found
- curl
- Node.js
- JavaScript
- Python
- C#
- Java
- 200
- 400
- 404
{- "id": "983c0a86-204f-4431-9371-f5a22e506599",
- "name": "Course credential",
- "description": "This credential shows that the person has attended a course.",
- "type": "CourseCredential",
- "additionalTypes": [
- "AlumniCredential",
- "EducationCredential"
], - "issuer": {
- "name": "ABC University",
}, - "proofType": "Ed25519Signature2018",
- "credentialBranding": {
- "backgroundColor": "#B00AA0",
}, - "claimMappings": {
- "firstName": {
- "mapFrom": "claims.given_name",
- "required": true
}, - "address": {
- "mapFrom": "claims.address.formatted"
}, - "providerSubjectId": {
- "mapFrom": "authenticationProvider.subjectId"
}
}, - "persist": false,
- "revocable": true,
- "includeId": true,
- "claimSourceId": "78e1b90c-401d-45bb-89c0-938da4d44c60",
- "expiresIn": {
- "years": 0,
- "months": 3,
- "weeks": 0,
- "days": 0,
- "hours": 0,
- "minutes": 0,
- "seconds": 0
}
}
Update a Web Credential configuration
Updates an existing Web Credential configuration by providing its ID.
Analytic events
- CREDENTIAL_WEB_SEMANTIC_CREDENTIAL_CONFIGURATION_UPDATE_START
- CREDENTIAL_WEB_SEMANTIC_CREDENTIAL_CONFIGURATION_UPDATE_SUCCESS
- CREDENTIAL_WEB_SEMANTIC_CREDENTIAL_CONFIGURATION_UPDATE_FAIL
path Parameters
Request Body schema: application/jsonrequired
Update a Credential Configuration
name required | string [ 1 .. 1024 ] characters Insert a meaningful name for the credential. This string is displayed on the top part of the credential in the holder's digital wallet. It is recommended to limit this value to 18 characters as any additional characters are not displayed on the credential. |
description | string <= 1024 characters Insert a meaningful description for the credential. This string is displayed below the name field on the credential in the holder's digital wallet. It is recommended to limist this value to 38 characters as any additional characters are not displayed on the credential. |
type required | string [ 1 .. 1024 ] characters Used to differentiate between different Web credential configurations on your tenant. Thus, its value must:
|
additionalTypes | Array of strings Additional credential types that can be referenced. Each entry must be 1-1024 characters long, with no whitespaces allowed. |
contexts | Array of strings Additional JSON-LD contexts to be included in the credential. As part of the credential issuance MATTR VII will auto-inject the following contexts, which reference the W3C Verifiable Credential definitions:
|
required | object Issuer details and branding for issued credentials. Refer to this video to learn more about branding best practices. |
proofType | string This is an optional field which defines the cryptographic algorithm used to sign the credential. The credential Issuer's DID must contain a key that supports the corresponding signing capability. If no
|
object Additional branding that will be applied to issued credentials. Refer to this video to learn more about branding best practices. | |
object This is where you specify how to map claims (user attributes) into issued credentials. Each field in the object corresponds to a claim in the issued credential, and contains one or more from the following attributes:
Example
| |
persist | boolean Default: false When set to
|
revocable | boolean Default: true When set to |
includeId | boolean Default: false When set to |
claimSourceId | string <uuid> References the unique identifier of a claims source that can be used to retrieve claims and include them in the issued credential. |
object Used to determine when will issued credentials expire. Can include any combination of |
Web Credential configuration updated
Bad Request
The Credential Configuration is not found
- Payload
- curl
- Node.js
- JavaScript
- Python
- C#
- Java
{- "name": "Course credential",
- "description": "This credential shows that the person has attended a course.",
- "type": "CourseCredential",
- "additionalTypes": [
- "AlumniCredential",
- "EducationCredential"
], - "issuer": {
- "name": "ABC University",
}, - "proofType": "Ed25519Signature2018",
- "credentialBranding": {
- "backgroundColor": "#B00AA0",
}, - "claimMappings": {
- "firstName": {
- "mapFrom": "claims.given_name",
- "required": true
}, - "address": {
- "mapFrom": "claims.address.formatted"
}, - "providerSubjectId": {
- "mapFrom": "authenticationProvider.subjectId"
}
}, - "persist": false,
- "revocable": true,
- "includeId": true,
- "claimSourceId": "78e1b90c-401d-45bb-89c0-938da4d44c60",
- "expiresIn": {
- "years": 0,
- "months": 3,
- "weeks": 0,
- "days": 0,
- "hours": 0,
- "minutes": 0,
- "seconds": 0
}
}
- 200
- 400
- 404
{- "id": "983c0a86-204f-4431-9371-f5a22e506599",
- "name": "Course credential",
- "description": "This credential shows that the person has attended a course.",
- "type": "CourseCredential",
- "additionalTypes": [
- "AlumniCredential",
- "EducationCredential"
], - "issuer": {
- "name": "ABC University",
}, - "proofType": "Ed25519Signature2018",
- "credentialBranding": {
- "backgroundColor": "#B00AA0",
}, - "claimMappings": {
- "firstName": {
- "mapFrom": "claims.given_name",
- "required": true
}, - "address": {
- "mapFrom": "claims.address.formatted"
}, - "providerSubjectId": {
- "mapFrom": "authenticationProvider.subjectId"
}
}, - "persist": false,
- "revocable": true,
- "includeId": true,
- "claimSourceId": "78e1b90c-401d-45bb-89c0-938da4d44c60",
- "expiresIn": {
- "years": 0,
- "months": 3,
- "weeks": 0,
- "days": 0,
- "hours": 0,
- "minutes": 0,
- "seconds": 0
}
}
Delete a Web Credential configuration
Deletes an existing Web Credential configuration by providing its ID.
Analytic events
- CREDENTIAL_WEB_SEMANTIC_CREDENTIAL_CONFIGURATION_DELETE_START
- CREDENTIAL_WEB_SEMANTIC_CREDENTIAL_CONFIGURATION_DELETE_SUCCESS
- CREDENTIAL_WEB_SEMANTIC_CREDENTIAL_CONFIGURATION_DELETE_FAIL
Web Credential configuration deleted
Bad Request
The Credential Configuration is not found
- curl
- Node.js
- JavaScript
- Python
- C#
- Java
- 400
- 404
{- "code": "BadRequest",
- "message": "Validation Error",
- "details": [
- {
- "location": "params",
- "msg": "Invalid value",
- "param": "id",
- "value": "abc"
}
]
}