Skip to main content
GET
/
credential
/
{credentialId}
Get Credential
curl --request GET \
  --url https://api.example.com/credential/{credentialId}
{
  "credential": {
    "id": "507f1f77bcf86cd799439011",
    "resourceType": "DOCUMENT",
    "status": "PENDING",
    "proofs": [
      "<array>"
    ],
    "data": [
      {
        "label": "Consent statement",
        "type": "string",
        "value": "I consent to the terms and conditions",
        "hidden": false,
        "fields": [
          {}
        ]
      }
    ],
    "name": "Identity Document",
    "internalId": "internal-12345"
  },
  "w3cCredential": {
    "@context": [
      "https://www.w3.org/ns/credentials/v2",
      "https://humanos.id/schemas/credential/v1"
    ],
    "id": "https://humanos.id/credentials/crd_abc123",
    "type": [
      "VerifiableCredential"
    ],
    "issuer": "did:web:humanos.id",
    "issuanceDate": "2025-01-01T00:00:00Z",
    "validFrom": "2025-01-01T00:00:00Z",
    "validUntil": "2026-01-01T00:00:00Z",
    "credentialSubject": {
      "id": "did:key:z6MkExample123",
      "data": [
        {
          "label": "pdf",
          "type": "pdf",
          "value": "JVBERi0xLjQKJeLjz9...",
          "hidden": false
        }
      ]
    },
    "proof": [
      {
        "type": "DataIntegrityProof",
        "cryptosuite": "eddsa-jcs-2022",
        "proofPurpose": "assertionMethod",
        "verificationMethod": "did:web:humanos.id#key-1",
        "proofValue": "z58DAdFfa9SkqZMVPxAQpic7ndSayn1PzZs6ZjWp1CktyGesjuTSwRdoWhAfGFCF5bppETSTojQCrfFPP2oumHKtz",
        "actionType": "CREATE",
        "actionProof": "0x1234567890abcdef",
        "createdAt": "2025-01-01T00:00:00Z"
      }
    ]
  },
  "pdf": "JVBERi0xLjQKJeLjz9..."
}

Headers

API-Version
string

Pin responses to a specific API version (YYYY-MM-DD). When omitted, defaults to the version stored in your issuer config or today's date.

Pattern: ^\d{4}-\d{2}-\d{2}$
Example:

"2026-03-03"

Path Parameters

credentialId
string
required

Unique identifier of the credential. Must be a valid MongoDB ObjectId.

Example:

"507f1f77bcf86cd799439011"

Query Parameters

includePdf
boolean
default:false

Whether to include the PDF content for document type credentials

Example:

false

Response

Returns the W3C Verifiable Credential structure, internalId and optionallly the PDF content in its most updated version

credential
object
required

Credential full entity

w3cCredential
object
required

W3C Verifiable Credential in JSON-LD format

Example:
{
"@context": [
"https://www.w3.org/ns/credentials/v2",
"https://humanos.id/schemas/credential/v1"
],
"id": "https://humanos.id/credentials/crd_abc123",
"type": ["VerifiableCredential"],
"issuer": "did:web:humanos.id",
"issuanceDate": "2025-01-01T00:00:00Z",
"validFrom": "2025-01-01T00:00:00Z",
"validUntil": "2026-01-01T00:00:00Z",
"credentialSubject": {
"id": "did:key:z6MkExample123",
"data": [
{
"label": "pdf",
"type": "pdf",
"value": "JVBERi0xLjQKJeLjz9...",
"hidden": false
}
]
},
"proof": [
{
"type": "DataIntegrityProof",
"cryptosuite": "eddsa-jcs-2022",
"proofPurpose": "assertionMethod",
"verificationMethod": "did:web:humanos.id#key-1",
"proofValue": "z58DAdFfa9SkqZMVPxAQpic7ndSayn1PzZs6ZjWp1CktyGesjuTSwRdoWhAfGFCF5bppETSTojQCrfFPP2oumHKtz",
"actionType": "CREATE",
"actionProof": "0x1234567890abcdef",
"createdAt": "2025-01-01T00:00:00Z"
}
]
}
pdf
string

Base64-encoded PDF document (only included when includePdf=true and resource type is DOCUMENT)

Example:

"JVBERi0xLjQKJeLjz9..."