Hypersign.Id
Hypersign.idEntity StudioIdentity Wallet
  • 💬Welcome!
  • Hypersign KYC
    • Introduction
    • Integrations
      • KYC Service
      • Widget Configuration
      • Environments
        • Development
        • Production
      • Webhook
    • KYC Widget
      • Integrations
        • Backend Integration
          • Generate AccessTokens
          • Generate KYC Session Id
        • Frontend Integration
      • Data Capture
        • Data Vault Setup
        • Capture Facial Recognition
        • Capture ID Document
        • Capture zk-proof and KYC token
        • Capture User Consent
      • User Data
        • idToken
    • Hypersign ID Wallet
    • On-Chain KYC
      • Contracts Deployment
      • Use Cases
      • Supported Blockchains
      • KYC Token Metadata
    • Dashboard
      • User Sessions
      • User Session Details
      • Usage
      • Credit
    • Concepts
      • Facial Recognition
      • ID Verification (via OCR)
      • Reusable KYC
      • Encrypted Data Vault (EDV)
      • Facial Authentication
      • Issuer Marketplace
      • Security
      • Privacy
      • Credentials Types
        • Personhood Credential
        • Passport / Govt. ID Credential
      • zk Proof Types
        • Proof Of Personhood (PoP)
        • Proof Of KYC (PoK)
        • Proof Of Age (PoA)
      • Uniqueness Check
      • Credential Revocability
      • Machine Readable Zone (MRZ)
      • Liveliness Check
      • Zero Knowledge Proof (zkp)
        • Introduction
        • zk-SNARK
        • Circuits
        • SSI and ZKP
    • Tutorials
      • How to Integrate KYC in minutes?
      • How to add your team member?
  • Hypersign SSI
    • Introduction
    • Setup SSI Service
      • Create Your First DID
      • Credits
    • 🔗API Reference
      • Service Authentication API
      • DID
      • Schema
      • Verifiable Credential
      • Verifiable Presentation
        • Presentation Template
        • Presentation
    • 🎰API Playground
    • 🏑SSI Playground
  • Hypersign Developer Dashboard
    • Service
      • Managing API keys
      • Network Fee
    • Members & Roles
      • Members
        • Assign Role To Member
      • Invitations
        • Member Access Admin's Dashboard
      • Roles & Permissions
        • Permissions List
    • Security
      • Login
      • Multi factor Authentication (MFA)
  • Hypersign Identity Network
    • Introduction
    • Validators & Delegators
      • Installation of Node
      • Running a Testnet Validator Node
    • Governance
      • Proposals
        • Blockchain Node Upgrade
        • Community Pool Spend Proposal
        • Blockchain Parameter Change Proposal
        • Text Proposal
      • Delegation
    • Faucet (testnet)
    • Developers
      • HID-Node Codebase
      • ⚙️Setup Local hid-network Tutorial
        • Running one-node local hid network
        • Create and fund new account
        • Transfer funds
        • Connect Keplr to local hid network
      • Hypersign SSI Toolkit
        • Hypersign DID SDK
        • Hypersign Schema SDK
        • Hypersign Verifiable Credential SDK
        • Hypersign Verifiable Presentation SDK
        • OfflineSigner
    • Blockchain & ID Explorer
  • Core Concepts
    • Introduction
    • Decentralized Identifier (DID)
      • DID Registry
      • Private and Public DID
      • DID Authentication
      • DID Communication (DIDComm)
      • Adding multiple controller to DID
      • Adding multiple verification methods
      • Verification Method vs Recovery Signature
      • Blockchain Account Id
      • DID Threshold
      • Verifiable Condition
      • Verification Relationships
        • Authorization Capabilities (zCap)
    • Schema
      • Schema Registry
      • Schema.org
    • Verifiable Credential (VC)
      • Credential Revocation Registry
      • Issuing a Credential to Multiple Subjects
      • Bearer Credential
      • Single-Use Credential
    • Verifiable Presentation (VP)
    • Specifications
      • Supported Signature Algorithms
      • Client Specification
        • EVM based chains
        • Cosmos based chains
  • Ecosystem
    • Forum
    • Github
    • HID Explorer
    • Eiko
    • MetaAuth
  • Privacy Policy
Powered by GitBook
On this page
Edit on GitHub
  1. Hypersign SSI
  2. API Reference

Verifiable Credential

PreviousSchemaNextVerifiable Presentation

Last updated 2 years ago

Please before proceeding. Once you generated the access_token, you can pass this token as bearer authorization token in the header for all APIs.

Issue a verifiable credential

An issuer may issue a to a subject using this API. The credential document is signed by issuer's identity key and its status is registered on the blockchain.

Entity Studio SSI API base URL:

NOTE: A developer may choose to store the verifiable credential in application's data vault securely or they may not to. Pass true for request body property persist to store the credential document, false otherwise.

Verify an issued verifiable credential document

A signed verifiable credential must has signature of the issuer. Any one may verify an issued credential document. The verification result state the following facts:

  • This document was issued by intended issuer

  • This document have not been tampered

  • This document have not been revoked

Fetch a verifiable credential and/or its status by Id

Pass false value to parameter retrieveCredential to only retrieve status of the credential

Fetch list of verifiable credentials

Update credential status of a verifiable credential

NOTE: Verifying a credential document is different than verifying a n. Verification result of later, also states that "Only intended subject holds this document and not one else".

🔗
verifiable presentatio
generate access token
verifiable credential
https://api.entity.hypersign.id
get
Authorizations
Path parameters
credentialIdstringRequired
Query parameters
retrieveCredentialbooleanOptional
Header parameters
AuthorizationstringOptional

Bearer <access_token>

OriginstringOptional

Origin as you set in application cors

Responses
200
Resolved credential detail
application/json
404
Credential with id vc:hid:testnet:...... not found
application/json
get
GET /api/v1/credential/{credentialId} HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
{
  "credentialDocument": {
    "@context": [
      "https://www.w3.org/2018/credentials/v1",
      {
        "hs": "https://api.jagrat.hypersign.id/hypersign-protocol/hidnode/ssi/schema/sch:hid:testnet:...........:1.0:"
      },
      {
        "name": "hs:name"
      },
      "https://w3id.org/security/suites/ed25519-2020/v1"
    ],
    "id": "vc:hid:testnet:......",
    "type": [
      "VerifiableCredential",
      "nameschema"
    ],
    "expirationDate": "2027-12-10T18:30:00Z",
    "issuanceDate": "2027-12-10T18:30:00Z",
    "issuer": "did:hid:testnet:..........",
    "credentialSubject": {
      "id": "did:hid:testnet:..............."
    },
    "credentialSchema": {
      "id": "sch:hid:testnet:...............",
      "type": "JsonSchemaValidator2018"
    },
    "credentialStatus": {
      "id": "https://api.jagrat.hypersign.id/hypersign-protocol/hidnode/ssi/credential/vc:hid:testnet:...............",
      "type": "CredentialStatusList2017"
    },
    "proof": {
      "type": "Ed25519Signature2020",
      "created": "2023-01-25T17:01:02Z",
      "verificationMethod": "did:hid:testnet:...............#key-${id}",
      "proofPurpose": "assertionMethod",
      "proofValue": "z5LairjrBYkc5FtP.......................EXFHm37aDvcMtCvnYfmvQ"
    }
  },
  "credentialStatus": {
    "claim": {
      "id": "vc:hid:testnet:................",
      "currentStatus": "vc:hid:testnet:................",
      "statusReason": "Credential is active"
    },
    "issuer": "did:hid:testnet:..............",
    "issuanceDate": "2023-01-25T16:59:21Z",
    "expirationDate": "2023-01-25T16:59:21Z",
    "credentialHash": "ae93886f2a............3f6d1c6ae4..........393d43730",
    "proof": {
      "type": "Ed25519Signature2020",
      "created": "2023-01-25T17:01:02Z",
      "verificationMethod": "did:hid:testnet:...............#key-${id}",
      "proofPurpose": "assertionMethod",
      "proofValue": "z5LairjrBYkc5FtP.......................EXFHm37aDvcMtCvnYfmvQ",
      "updated": "2023-01-25T17:01:02Z"
    }
  },
  "persist": true,
  "retrieveCredential": true
}
get
Authorizations
Query parameters
pagenumberOptional

Page value

Default: 1
limitnumberOptional

Fetch limited list of data

Default: 10
Header parameters
AuthorizationstringOptional

Bearer <access_token>

OriginstringOptional

Origin as you set in application cors

Responses
200
List of credentials
application/json
404
Error in finding resource
application/json
get
GET /api/v1/credential HTTP/1.1
Host: 
Authorization: Bearer JWT
Accept: */*
[
  {
    "totalCount": 12,
    "data": [
      "vc:hid:testnet:............"
    ]
  }
]
post
Authorizations
Header parameters
AuthorizationstringOptional

Bearer <access_token>

OriginstringOptional

Origin as you set in application cors

Body
credentialDocumentall ofRequired

credential document

Responses
200
verification result of credential
application/json
400
Error occured at the time of verifying credential
application/json
404
Resource not found
application/json
post
POST /api/v1/credential/verify HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 1018

{
  "credentialDocument": {
    "@context": [
      "https://www.w3.org/2018/credentials/v1",
      {
        "hs": "https://api.jagrat.hypersign.id/hypersign-protocol/hidnode/ssi/schema/sch:hid:testnet:...........:1.0:"
      },
      {
        "name": "hs:name"
      },
      "https://w3id.org/security/suites/ed25519-2020/v1"
    ],
    "id": "vc:hid:testnet:......",
    "type": [
      "VerifiableCredential",
      "nameschema"
    ],
    "expirationDate": "2027-12-10T18:30:00Z",
    "issuanceDate": "2027-12-10T18:30:00Z",
    "issuer": "did:hid:testnet:..........",
    "credentialSubject": {
      "id": "did:hid:testnet:..............."
    },
    "credentialSchema": {
      "id": "sch:hid:testnet:...............",
      "type": "JsonSchemaValidator2018"
    },
    "credentialStatus": {
      "id": "https://api.jagrat.hypersign.id/hypersign-protocol/hidnode/ssi/credential/vc:hid:testnet:...............",
      "type": "CredentialStatusList2017"
    },
    "proof": {
      "type": "Ed25519Signature2020",
      "created": "2023-01-25T17:01:02Z",
      "verificationMethod": "did:hid:testnet:...............#key-${id}",
      "proofPurpose": "assertionMethod",
      "proofValue": "z5LairjrBYkc5FtP.......................EXFHm37aDvcMtCvnYfmvQ"
    }
  }
}
{
  "verified": true,
  "results": [
    {
      "proof": {
        "type": "Ed25519Signature2020",
        "created": "2023-01-25T17:01:02Z",
        "verificationMethod": "did:hid:testnet:...............#key-${id}",
        "proofPurpose": "assertionMethod",
        "proofValue": "z5LairjrBYkc5FtP.......................EXFHm37aDvcMtCvnYfmvQ",
        "Context": [
          "https://www.w3.org/2018/credentials/v1",
          {
            "hs": "https://api.jagrat.hypersign.id/hypersign-protocol/hidnode/ssi/schema/sch:hid:testnet:z3KX4ZqoizKTaED645aV4aE8dBbnSpmQYe3xfzVBJadPY:1.0:"
          },
          {
            "name": "hs:name"
          },
          "https://w3id.org/security/suites/ed25519-2020/v1"
        ]
      },
      "verified": true,
      "verificationMethod": {
        "id": "did:hid:testnet:................................#key-${id}",
        "type": "Ed25519VerificationKey2020",
        "controller": "did:hid:method:..............",
        "publicKeyMultibase": "z28ScfSszr.............j8nCwx4DBF6nAUHu4p"
      },
      "purposeResult": {
        "valid": true
      }
    }
  ],
  "statusResult": {
    "verified": true
  }
}
patch
Authorizations
Path parameters
credentialIdstringRequired
Header parameters
AuthorizationstringOptional

Bearer <access_token>

OriginstringOptional

Origin as you set in application cors

Body
namespacestringRequired

Namespace to be added in vcId.

Example: testnet
statusstringRequired

Credential status

Example: LIVE / SUSPEND / REVOKE
statusReasonstringRequired

Credential status Reason

Example: Reason
issuerDidstringRequired

issuerDid of the credential

verificationMethodIdstringRequired

Verification Method id for did updation

Example: did:hid:testnet:........#key-${idx}
Responses
200
Credential Updated
application/json
400
Error occured at the time of creating credential
application/json
404
did:hid:testnet:........#key-${idx} not found
application/json
patch
PATCH /api/v1/credential/status/{credentialId} HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 162

{
  "namespace": "testnet",
  "status": "LIVE / SUSPEND / REVOKE",
  "statusReason": "Reason",
  "issuerDid": "text",
  "verificationMethodId": "did:hid:testnet:........#key-${idx}"
}
{
  "credentialDocument": {
    "@context": [
      "https://www.w3.org/2018/credentials/v1",
      {
        "hs": "https://api.jagrat.hypersign.id/hypersign-protocol/hidnode/ssi/schema/sch:hid:testnet:...........:1.0:"
      },
      {
        "name": "hs:name"
      },
      "https://w3id.org/security/suites/ed25519-2020/v1"
    ],
    "id": "vc:hid:testnet:......",
    "type": [
      "VerifiableCredential",
      "nameschema"
    ],
    "expirationDate": "2027-12-10T18:30:00Z",
    "issuanceDate": "2027-12-10T18:30:00Z",
    "issuer": "did:hid:testnet:..........",
    "credentialSubject": {
      "id": "did:hid:testnet:..............."
    },
    "credentialSchema": {
      "id": "sch:hid:testnet:...............",
      "type": "JsonSchemaValidator2018"
    },
    "credentialStatus": {
      "id": "https://api.jagrat.hypersign.id/hypersign-protocol/hidnode/ssi/credential/vc:hid:testnet:...............",
      "type": "CredentialStatusList2017"
    },
    "proof": {
      "type": "Ed25519Signature2020",
      "created": "2023-01-25T17:01:02Z",
      "verificationMethod": "did:hid:testnet:...............#key-${id}",
      "proofPurpose": "assertionMethod",
      "proofValue": "z5LairjrBYkc5FtP.......................EXFHm37aDvcMtCvnYfmvQ"
    }
  },
  "credentialStatus": {
    "claim": {
      "id": "vc:hid:testnet:................",
      "currentStatus": "vc:hid:testnet:................",
      "statusReason": "Credential is active"
    },
    "issuer": "did:hid:testnet:..............",
    "issuanceDate": "2023-01-25T16:59:21Z",
    "expirationDate": "2023-01-25T16:59:21Z",
    "credentialHash": "ae93886f2a............3f6d1c6ae4..........393d43730",
    "proof": {
      "type": "Ed25519Signature2020",
      "created": "2023-01-25T17:01:02Z",
      "verificationMethod": "did:hid:testnet:...............#key-${id}",
      "proofPurpose": "assertionMethod",
      "proofValue": "z5LairjrBYkc5FtP.......................EXFHm37aDvcMtCvnYfmvQ",
      "updated": "2023-01-25T17:01:02Z"
    }
  },
  "persist": true,
  "retrieveCredential": true
}
  • Issue a verifiable credential
  • POST/api/v1/credential/issue
  • Verify an issued verifiable credential document
  • POST/api/v1/credential/verify
  • Fetch a verifiable credential and/or its status by Id
  • GET/api/v1/credential/{credentialId}
  • Fetch list of verifiable credentials
  • GET/api/v1/credential
  • Update credential status of a verifiable credential
  • PATCH/api/v1/credential/status/{credentialId}
post
Authorizations
Header parameters
AuthorizationstringOptional

Bearer <access_token>

OriginstringOptional

Origin as you set in application cors

Body
schemaIdstringOptional

schemaId for credential Schema

subjectDidstringRequired

holder did of the credential

issuerDidstringRequired

issuerDid of the credential

expirationDatestringRequired

Date in ISOString format

Example: 2027-12-10T18:30:00.000Z
fieldsobjectRequired

Credential Data fields

Example: {"name":"Random name"}
namespacestringRequired

Namespace to be added in vcId.

Example: testnet
verificationMethodIdstringRequired

Verification Method id for did updation

Example: did:hid:testnet:........#key-${idx}
persistbooleanRequired

Persist in edv

Example: true
Responses
201
Credential Created
application/json
400
Error occured at the time of creating credential
application/json
404
Resource not found
application/json
post
POST /api/v1/credential/issue HTTP/1.1
Host: 
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 234

{
  "schemaId": "text",
  "subjectDid": "text",
  "issuerDid": "text",
  "expirationDate": "2027-12-10T18:30:00.000Z",
  "fields": {
    "name": "Random name"
  },
  "namespace": "testnet",
  "verificationMethodId": "did:hid:testnet:........#key-${idx}",
  "persist": "true"
}
{
  "credentialDocument": {
    "@context": [
      "https://www.w3.org/2018/credentials/v1",
      {
        "hs": "https://api.jagrat.hypersign.id/hypersign-protocol/hidnode/ssi/schema/sch:hid:testnet:...........:1.0:"
      },
      {
        "name": "hs:name"
      },
      "https://w3id.org/security/suites/ed25519-2020/v1"
    ],
    "id": "vc:hid:testnet:......",
    "type": [
      "VerifiableCredential",
      "nameschema"
    ],
    "expirationDate": "2027-12-10T18:30:00Z",
    "issuanceDate": "2027-12-10T18:30:00Z",
    "issuer": "did:hid:testnet:..........",
    "credentialSubject": {
      "id": "did:hid:testnet:..............."
    },
    "credentialSchema": {
      "id": "sch:hid:testnet:...............",
      "type": "JsonSchemaValidator2018"
    },
    "credentialStatus": {
      "id": "https://api.jagrat.hypersign.id/hypersign-protocol/hidnode/ssi/credential/vc:hid:testnet:...............",
      "type": "CredentialStatusList2017"
    },
    "proof": {
      "type": "Ed25519Signature2020",
      "created": "2023-01-25T17:01:02Z",
      "verificationMethod": "did:hid:testnet:...............#key-${id}",
      "proofPurpose": "assertionMethod",
      "proofValue": "z5LairjrBYkc5FtP.......................EXFHm37aDvcMtCvnYfmvQ"
    }
  },
  "credentialStatus": {
    "claim": {
      "id": "vc:hid:testnet:................",
      "currentStatus": "vc:hid:testnet:................",
      "statusReason": "Credential is active"
    },
    "issuer": "did:hid:testnet:..............",
    "issuanceDate": "2023-01-25T16:59:21Z",
    "expirationDate": "2023-01-25T16:59:21Z",
    "credentialHash": "ae93886f2a............3f6d1c6ae4..........393d43730"
  },
  "persist": true
}