Sign a JSON credential
Returns a signed JSON credential generated from a provided valid payload.
Analytic events
- CREDENTIAL_WEB_SEMANTIC_SIGN_START
- CREDENTIAL_WEB_SEMANTIC_SIGN_SUCCESS
- CREDENTIAL_WEB_SEMANTIC_SIGN_FAIL
Request Body schema: application/jsonrequired
JSON credential payload to sign
required | object |
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
|
tag | string [ 1 .. 1024 ] characters Insert a case sensitive tag to reference this credential. The gets stored as part of the credential metadata and can be used to search for it in the credential registry. |
persist | boolean Default: false When set to
|
revocable | boolean Default: false When set to |
includeId | boolean Default: false When set to |
JSON Credential signed
Failed to sign JSON credential, invalid payload, etc
- Payload
- curl
- Node.js
- JavaScript
- Python
- C#
- Java
{- "payload": {
- "name": "Course credential",
- "description": "This credential shows that the person has attended the mention course and attained the relevant awards.",
- "type": [
- "EducationalOccupationalCredential",
- "AlumniCredential"
], - "credentialSubject": {
- "id": "did:example:abcdb1f712ebc6f1c276e12ec21",
- "givenName": "Jamie",
- "familyName": "Doe",
- "alumniOf": "<span lang=\"en\">Example University</span>"
}, - "credentialBranding": {
- "backgroundColor": "#B00AA0",
}, - "issuer": {
- "id": "did:issuer:abcdb1f712ebc6f1c276e12ec21",
- "name": "ABC University",
}, - "expirationDate": "2024-02-01T08:12:38.156Z",
- "issuanceDate": "2023-02-01T08:12:38.156Z"
}, - "proofType": "Ed25519Signature2018",
- "tag": "identifier123",
- "persist": false,
- "revocable": false,
- "includeId": true
}
- 200
{- "id": "873277c0-a162-11ea-8a1d-a111119347e6",
- "credential": {
- "id": "873277c0-a162-11ea-8a1d-a111119347e6",
- "type": [
- "VerifiableCredential",
- "AlumniCredential"
], - "issuer": {
- "id": "did:web:organization.com",
- "name": "Example University"
}, - "issuanceDate": "2020-05-02T12:06:29.156Z",
- "credentialStatus": {
- "type": "RevocationList2020Status",
- "revocationListIndex": 1,
- "revocationListCredential": "https://tenant.vii.mattr.global/core/v1/revocation-lists/cc641396-3750-43c8-b8b8-f30d74eb3fb3"
}, - "credentialSubject": {
- "givenName": "Jamie",
- "familyName": "Doe",
- "alumniOf": "Example University"
}, - "proof": {
- "type": "Ed25519Signature2018",
- "created": "2020-05-02T12:06:29Z",
- "jws": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJzdWIiOiIxMjM0NTY3ODkwIiwibmFtZSI6IkpvaG4gRG9lIiwiaWF0IjoxNTE2MjM5MDIyfQ.SflKxwRJSMeKKF2QT4fwpMeJf36POk6yJV_adQssw5c",
- "proofPurpose": "assertionMethod",
- "verificationMethod": "did:web:organization.com"
}, - "name": "Alumni Credential",
- "description": "This credential shows that the person has attended the mentioned university."
}, - "tag": "identifier123",
- "credentialStatus": {
- "type": "RevocationList2020Status",
- "revocationListIndex": 1,
- "revocationListCredential": "https://tenant.vii.mattr.global/core/v1/revocation-lists/cc641396-3750-43c8-b8b8-f30d74eb3fb3"
}, - "issuanceDate": "2020-05-02T12:06:29.156Z"
}