Decoding

Decode Privacy Twins

Decode Privacy Twins back to original sensitive values. Creates an audit trail entry recording who accessed the data and for what purpose.

Requires the continuationId from the original encoding, the text containing Privacy Twins, and the hashes of the original values to decode.

SDK Usage:

const decoded = await client.decode({
  continuationId: 'cont-7f3a-4b2c-9d1e-8f6a5c3b2d1e',
  data: 'Maria Garcia, SSN: 987-65-4321',
  sensitiveHashes: ['a1b2c3d4...'],
  authorization: {
    token: 'your-jwt-token',
    purpose: 'Customer support ticket #12345'
  }
});
post/api/scanner/decode

Request body

continuationIdstring required

Continuation ID from the original encoding operation

datastring required

Text containing Privacy Twins to decode

sensitiveHashesstring[] required

Array of original value hashes to decode

Example request

{
  "authorization": {
    "purpose": "Customer support ticket",
    "type": "jwt"
  }
}

Response

Decoded successfully

successboolean
decodedDatastring

Text with Privacy Twins replaced by original values

continuationIdstring
errorstring

Example response

{
  "auditLog": {
    "accessedBy": "jane.smith@example.com",
    "timestamp": "2026-02-12T18:45:00.000Z",
    "purpose": "Customer support ticket"
  }
}

Changes