POST /api/issuer/did:alyra:issuer.../issue HTTP/1.1
Authorization: Bearer <jwt>
Content-Type: application/json
{
"credential_type": "NationalID",
"schema_id": "schema-uuid",
"subject_did": "did:alyra:holder...",
"template_id": "template-uuid",
"attributes": {
"full_name": "Alice Smith",
"date_of_birth": "1990-05-15"
},
"expiration_date": "2027-01-01T00:00:00Z",
"evidence": [
{
"label": "photo_id",
"filename": "id-card.pdf",
"ipfs_hash": "Qm...",
"gateway_url": "https://gateway.pinata.cloud/ipfs/Qm...",
"content_type": "application/pdf",
"size": 120400
}
],
"evidence_required": ["photo_id"],
"extensions": []
}
Body
| Field | Type | Required | Description |
|---|---|---|---|
credential_type | string | Yes | Type label for the credential. |
schema_id | string | Yes | Schema used to validate attributes. |
subject_did | string | No | Holder DID. |
template_id | string | No | Issuer template used for the credential. |
attributes | object | Yes | Credential attribute values. |
expiration_date | string | No | ISO 8601 expiration timestamp. |
evidence | array | No | Evidence attachments already uploaded to IPFS. |
evidence_required | string[] | No | Evidence labels required by policy. |
extensions | string[] | No | Extension fields enabled for this credential. |
Response
201 Created
{
"success": true,
"message": "Credential issued successfully",
"credential": {
"credential": {
"id": "aly:uuid",
"issuer_did": "did:alyra:issuer...",
"owner_did": "did:alyra:holder...",
"credential_type": "NationalID",
"schema_id": "schema-uuid",
"credential_preview": {
"full_name": "Alice Smith"
},
"status": "active",
"signature_type": "bbs+",
"kyber_encrypted": true,
"evidence_attachments": [],
"created_at": "2026-06-27T00:00:00Z"
},
"jwt": "eyJhbGciOiJIUzI1NiJ9...",
"ipfs_hash": "Qm...",
"ipfs_gateway_url": "https://gateway.pinata.cloud/ipfs/Qm...",
"credential_hash": "sha256hex...",
"blockchain_tx_hash": "0x...",
"blockchain_tx": "0x...",
"id": "aly:uuid",
"on_chain": true
}
}