Sign a JSON credential
/v2/credentials/web-semantic/signReturns a signed JSON credential generated from a provided valid payload.
Roles
Analytics Events
Authorization
bearerAuth In: header
Request Body
application/json
JSON credential payload to sign
TypeScript Definitions
Use the request body type in TypeScript.
Sign JSON credential request
Response Body
application/json
application/json
curl -X POST "https://example.com/v2/credentials/web-semantic/sign" \ -H "Content-Type: application/json" \ -d '{ "payload": { "type": [ "EducationalOccupationalCredential", "AlumniCredential" ], "credentialSubject": { "id": "did:example:abcdb1f712ebc6f1c276e12ec21", "givenName": "Jamie", "familyName": "Doe", "alumniOf": "<span lang=\\"en\\">Example University</span>" }, "issuer": { "id": "did:issuer:abcdb1f712ebc6f1c276e12ec21", "name": "ABC University" } } }'{ "id": "873277c0-a162-11ea-8a1d-a111119347e6", "credential": { "@context": [ "https://www.w3.org/2018/credentials/v1", "https://mattr.global/contexts/vc-extensions/v2", "https://w3id.org/vc-revocation-list-2020/v1", "https://optionalschema.example/" ], "type": [ "VerifiableCredential", "AlumniCredential" ], "issuer": "string", "issuanceDate": "2020-05-02T12:06:29.156Z", "credentialStatus": { "id": "https://tenant.vii.mattr.global/v1/revocation-lists/cc641396-3750-43c8-b8b8-f30d74eb3fb3#1", "type": "RevocationList2020Status", "revocationListIndex": 1, "revocationListCredential": "https://tenant.vii.mattr.global/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": "EXAMPLE_JWS_TOKEN_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": { "id": "https://tenant.vii.mattr.global/v1/revocation-lists/cc641396-3750-43c8-b8b8-f30d74eb3fb3#1", "type": "RevocationList2020Status", "revocationListIndex": 1, "revocationListCredential": "https://tenant.vii.mattr.global/v1/revocation-lists/cc641396-3750-43c8-b8b8-f30d74eb3fb3" }, "issuanceDate": "2020-05-02T12:06:29.156Z"}How would you rate this page?