light-mode-image
Learn
API ReferenceJSON credentials

Sign a JSON credential

Roles

adminissuermanaged-issuer

Analytics Events

CREDENTIAL_WEB_SEMANTIC_SIGN_STARTCREDENTIAL_WEB_SEMANTIC_SIGN_SUCCESSCREDENTIAL_WEB_SEMANTIC_SIGN_FAIL
POST/v2/credentials/web-semantic/sign

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

Authorization

bearerAuth
AuthorizationBearer <token>

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": [        "string"      ],      "credentialSubject": {},      "issuer": {        "id": "string",        "name": "string"      }    }  }'
{  "id": "string",  "credential": {    "@context": [      "string"    ],    "type": [      "string"    ],    "issuer": "string",    "issuanceDate": "2019-08-24T14:15:22Z",    "credentialStatus": {      "id": "string",      "type": "string",      "revocationListIndex": 0,      "revocationListCredential": "string"    },    "credentialSubject": {      "givenName": "string",      "familyName": "string",      "alumniOf": "string"    },    "proof": {      "type": "string",      "created": "2019-08-24T14:15:22Z",      "jws": "string",      "proofPurpose": "string",      "verificationMethod": "string"    },    "name": "string",    "description": "string"  },  "tag": "string",  "credentialStatus": {    "id": "string",    "type": "string",    "revocationListIndex": 0,    "revocationListCredential": "string"  },  "issuanceDate": "string"}

How would you rate this page?