Skip to main content

Create a verifiable credential

Creates a generic W3C Verifiable Credential in JSON-LD format.

Request Body REQUIRED

Type of the credential, issuer and credential content.

credential object REQUIRED

Credential details

id string REQUIRED

Credential identifier.

issuer object REQUIRED

Issuer of the verifiable credential. It can be either a URI or an object containing an id property.

id string

DID of the issuer

name string

Issuer name

type string[] REQUIRED

This array contains the type and subtypes of credential. The type array always contains "VerifiableCredential" generic type and then custom subtypes like "VerfiableId", "StudentId" or "YourCustomType".

validUntil string

expiration date of the credential in ISO format.

credentialSubject object REQUIRED

A thing about which claims are made

id string

Object MAY contain an id

options object REQUIRED

Sets revocable flag for enabling revocation if true.

Responses
201

Success

Schema
@context string[]

The @context property ensures that two systems operating on the same DID document are using mutually agreed terminology. It can be one or more URIs.

id string

Credential identifier.

type string[]

This array contains the type and subtypes of credential.

issuer string

Issuer of the verifiable credential.

issuanceDate date-time

Date and time at which the information associated with the verifiable credential/presentation becomes valid.

credentialSubject object

A thing about which claims are made

id string

Object MAY contain an id

proof object

Cryptographic proofs that can be used to detect tampering and verify the authorship of a credential or presentation. An embedded proof is a mechanism where the proof is included in the data, such as a Linked Data Signature.

type string REQUIRED

Type of the object or the datatype of the typed value.

created date-time REQUIRED

Date and time at which proof has been created.

proofPurpose string REQUIRED

It expresses the purpose of the proof and ensures the information is protected by the signature.

verificationMethod string REQUIRED

Specifies the public key that can be used to verify the digital signature. Dereferencing a public key URL reveals information about the controller of the key, which can be checked against the issuer of the credential.

jws string REQUIRED

JSON Web Signature

400

Bad Request

Schema
type uri

An absolute URI that identifies the problem type. When dereferenced, it SHOULD provide human-readable documentation for the problem type.

title string

A short summary of the problem type.

status int32

Possible values: 400 ≤ value < 600

The HTTP status code generated by the origin server for this occurrence of the problem.

detail string

A human readable explanation specific to this occurrence of the problem.

instance uri

An absolute URI that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.

401

Unauthorized

Schema
type uri

An absolute URI that identifies the problem type. When dereferenced, it SHOULD provide human-readable documentation for the problem type.

title string

A short summary of the problem type.

status int32

Possible values: 400 ≤ value < 600

The HTTP status code generated by the origin server for this occurrence of the problem.

detail string

A human readable explanation specific to this occurrence of the problem.

instance uri

An absolute URI that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.

403

Forbidden

Schema
type uri

An absolute URI that identifies the problem type. When dereferenced, it SHOULD provide human-readable documentation for the problem type.

title string

A short summary of the problem type.

status int32

Possible values: 400 ≤ value < 600

The HTTP status code generated by the origin server for this occurrence of the problem.

detail string

A human readable explanation specific to this occurrence of the problem.

instance uri

An absolute URI that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.

500

Internal Server Error

Schema
type uri

An absolute URI that identifies the problem type. When dereferenced, it SHOULD provide human-readable documentation for the problem type.

title string

A short summary of the problem type.

status int32

Possible values: 400 ≤ value < 600

The HTTP status code generated by the origin server for this occurrence of the problem.

detail string

A human readable explanation specific to this occurrence of the problem.

instance uri

An absolute URI that identifies the specific occurrence of the problem. It may or may not yield further information if dereferenced.