Skip to main content
POST /api/issuer/did:alyra:issuer123/issue HTTP/1.1
Content-Type: application/json
Authorization: Bearer <JWT>
X-Issuer-DID: did:alyra:issuer123

{
  "template_id": "employee-card-v1",
  "holder_did": "did:alyra:holder456",
  "attributes": {
    "full_name": "Alice Anderson",
    "employee_id": "EMP-001",
    "department": "R&D"
  },
  "expires_at": "2026-01-01T00:00:00Z"
}

Path Parameters

ParamDescription
didIssuer DID authorized to issue credentials

Request Body

FieldTypeRequiredDescription
template_idstringCredential template ID configured for this issuer
holder_didstringTarget holder who will receive the credential
attributesobjectKey/value pairs matching template holder/issuer fields
expires_atstringOptional ISO timestamp for credential expiry

Response

200 OK
{
  "success": true,
  "credential": {
    "id": "cred-789",
    "template_id": "employee-card-v1",
    "holder_did": "did:alyra:holder456",
    "issuer_did": "did:alyra:issuer123",
    "credential_preview": {
      "full_name": "Alice Anderson",
      "employee_id": "EMP-001",
      "department": "R&D"
    },
    "status": "active"
  },
  "ipfs_hash": "Qm...",
  "blockchain_tx_hash": "0xabc123"
}
Requires issuer authentication and the template must belong to the requesting DID. The backend uploads credential preview to IPFS and anchors the hash on-chain when blockchain client is configured.