Skip to main content
POST
/
api
/
v1
/
keys
/
grant-access
Grant decrypt access
curl --request POST \
  --url https://api.digitalreceiptprotocol.org/api/v1/keys/grant-access \
  --header 'Content-Type: application/json' \
  --data '
{
  "userId": "usr_f8e7d6c5-b4a3-4c2d-1e0f-9a8b7c6d5e4f",
  "keyId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"
}
'
{
  "success": true,
  "data": {
    "tokenId": "tok_9a8b7c6d-5e4f-3a2b-1c0d-e9f8a7b6c5d4",
    "userId": "usr_f8e7d6c5-b4a3-4c2d-1e0f-9a8b7c6d5e4f",
    "keyId": "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d",
    "purpose": "decrypt",
    "grantedAt": "2025-12-18T10:35:00Z",
    "expiresAt": "2025-12-18T10:38:00Z",
    "sourceIp": "192.168.1.100"
  }
}

Body

application/json
userId
string<uuid>
required

User ID requesting access

Example:

"550e8400-e29b-41d4-a716-446655440001"

keyId
string<uuid>
required

Key ID to grant access for

Example:

"550e8400-e29b-41d4-a716-446655440000"

Response

Access granted successfully

success
boolean
Example:

true

data
object