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": "550e8400-e29b-41d4-a716-446655440001",
  "keyId": "550e8400-e29b-41d4-a716-446655440000"
}
'
{
  "success": true,
  "data": {
    "tokenId": "550e8400-e29b-41d4-a716-446655440002",
    "userId": "550e8400-e29b-41d4-a716-446655440001",
    "keyId": "550e8400-e29b-41d4-a716-446655440000",
    "purpose": "decrypt",
    "grantedAt": "2025-12-15T12:00:00Z",
    "expiresAt": "2025-12-15T12:03:00Z",
    "sourceIp": "192.168.1.1"
  }
}

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