Body
| Field | Type | Required | Description |
|---|---|---|---|
verifier_did | string | ✅ | DID of the verifier receiving access |
purpose | string | ✅ | Reason for consent (stored on-chain) |
data_categories | array | ✅ | Attributes being shared |
expires_at | integer | ➖ | Optional Unix timestamp for expiry (0 = no expiry) |
Response
200 OK
Consents are written to both MongoDB (consentscollection) and the SSI Registry smart contract. UseGET /api/wallet/:did/consentsto enumerate active consents orPOST .../consents/:consent_id/revoketo revoke.