Address (PII) Protection Endpoint


METHOD: POST
ENDPOINT: https://dev.qupass.in/api/address

Description

The Address endpoint enables the protection and unprotection of structured and unstructured location data, including street addresses and locality details across all supported languages.

The returned token preserves the original character set across all supported languages, ensuring Unicode integrity and data stores’ locale compatibility.

Maintaining the same encoding space or range of symbols from which the original data was derived — for example, ensuring that a tokenized address in Hindi continues to use characters from the Devanagari Unicode block (U+0900–U+097F), while an address in English remains within the Latin-1 or Basic Latin Unicode blocks (U+0000–U+007F).

Examples

  • Input: H. No: 4, Indranagar Colony, Bengaluru (Latin)
    • QuFold_Token: McZaArOwx ZFpgYjtrY HKzDfUzYW 70VWWjdDi wopIwQCoX RcrIWXeZzl
      • ✅ Character set preserved (Latin block)
      • ✅ Encoding compatibility is maintained
    • FPE_Token: 5. S1: C, 6CFbn0UmR5 rPbE9q, DnTIsX7Gs
      • ✅ Length and Character set preserved (Latin block)
      • ✅ Encoding compatibility is maintained
  • Input: ఇంద్రనగర్ కాలనీ, బెంగళూరు (Telugu)
    • QuFold_Token: ఁబటఖ౮ఉళౘసఝమౚనఌ ఎఐౚఅఒథౚ౯ుఖౣందీ ూౖన౧ఎఛహఋచఢధంమఇ
      • ✅ Character set preserved (Telugu block)
      • ✅ Encoding compatibility is maintained
  • Input: इंद्रनगर कॉलोनी, बेंगलुरु (Devanagari)
    • QuFold_Token: उॲॺभखङिॐऺॾअ॰़ढ ऴढ़ॊ॔ैञॡधठठॎङभप ॺॆझऒैऴणओॷॱलॶॐॏॴॼ
      • ✅ Character set preserved (Devanagari block)
      • ✅ Encoding compatibility is maintained

QuantumFold tokens are not length-preserving — length may vary intentionally to introduce structural entropy and strengthen protection against pattern correlation and reverse inference.



Request Payload


  • HEADER PARAMETERS
    • x-api-key (required) Provides access to one or more functions in the API Playground.
    • Authorization (required) The JWT token issued upon successful authentication.
    • qu-token (required) QU token that you revceive at the time of login.

  • PAYLOAD DETAILS
    • id (required) Integer identifier for the request.
    • operation (required) Specifies the protection operation. Available: [protect | unprotect].
    • data (required) Array of values to be transformed.
    • options:
      • method - Transformation method; Available: [tokenise | fpe | mask | redact | passthrough].
        • Defaults to tokenise
      • scope - User-defined context string; differentiates tokens across applications or datasets. (e.g., app1, azure+app1).
        • Defaults to no-scope
      • lang - Language domain of the input. Supports most of the International and Indic languages. Look for supported languages
        • International: [en | de | fr | es | it | ru | ar | si | th | hi | ja | ko | zh]
        • Indic: [hi | te | kn | ta | bn | pa | gu | or | ml ]
        • Defaults to en
      • noise - Adds controlled randomness.
        • Defaults to 0, ensures deterministic tokenization within scope
        • Non-zero values produce possible distinct tokens for the repeated inputs

Sample Request


  	curl --location 'https://dev.qupass.in/api/address' \
  	--header 'x-api-key: <API_Key>' \
  	--header 'Authorization: <JWT_TOKEN>' \
  	--header 'qu-token: <QU_TOKEN>' \
  	--header 'Content-Type: application/json' \
  	--data '{
  		"id": 1,
  		"operation": "protect",
  		"data": [
          "H. No: 4, Indranagar Colony, Bengaluru",
          "H. No: 7, Banjara Hills Colony, Hyderabad",
          "H. No: 2, Salt Lake Colony, Kolkata"
  		],
  		"options": {
        "method": "tokenise",
        "scope": "App1"
  		}
  	}'
    package main

    import ( 
      "io" 
      "fmt"
      "strings" 
      "net/http" 
      )
      
    func main() { 
      API_Key := "<API_Key>"
      JWT_Token := "<JWT_TOKEN>"
      QU_Token := "<QU_TOKEN>"
      
      url := "https://dev.qupass.in/api/address"
      data := strings.NewReader(`{ 
          "id":1,
          "operation": "protect", 
          "data": [
            "H. No: 4, Indranagar Colony, Bengaluru",
            "H. No: 7, Banjara Hills Colony, Hyderabad",
            "H. No: 2, Salt Lake Colony, Kolkata"
          ],
          "options": {
            "method": "tokenise",
            "scope": "App1"
          } 
      }`)

      req, err := http.NewRequest("POST", url, data)
      if err != nil {
        fmt.Println(err)
        return
      }

      req.Header.Set("x-api-key", API_Key)
      req.Header.Set("Authorization", JWT_Token)
      req.Header.Set("qu-token", QU_Token)
      req.Header.Set("Content-Type", "application/json")

      client := &http.Client{}
      resp, err := client.Do(req)
      if err != nil {
        fmt.Println(err)
        return
      }
      defer resp.Body.Close()

      body, err := io.ReadAll(resp.Body)
      if err != nil {
        fmt.Println(err)
        return
      }

      fmt.Println(string(body))
    }
    import java.net.HttpURLConnection;
    import java.net.URI;
    import java.net.URL;
    import java.io.OutputStream;
    import java.io.InputStreamReader;
    import java.io.BufferedReader;
    import java.nio.charset.StandardCharsets;

    public class APIRequest {
        public static void main(String[] args) {
            try {
                String API_Key = "<API_Key>";
                String JWT_Token = "<JWT_TOKEN>";
                String QU_Token = "<QU_TOKEN>";

                URI uri = new URI("https://dev.qupass.in/api/address");

                String data = "{"
                        + "\"id\": 1,"
                        + "\"operation\": \"protect\","
                        + "\"data\": ["
                        + "\"H. No: 4, Indranagar Colony, Bengaluru\","
                        + "\"H. No: 7, Banjara Hills Colony, Hyderabad\","
                        + "\"H. No: 2, Salt Lake Colony, Kolkata\""
                        + "],"
                        + "\"options\": {"
                        + "\"method\": \"tokenise\","
                        + "\"scope\": \"App1\""
                        + "}"
                        + "}";

                URL url = uri.toURL();
                HttpURLConnection conn = (HttpURLConnection) url.openConnection();

                conn.setRequestMethod("POST");
                conn.setRequestProperty("x-api-key", API_Key);
                conn.setRequestProperty("Authorization", JWT_Token);
                conn.setRequestProperty("qu-token", QU_Token);
                conn.setRequestProperty("Content-Type", "application/json");
                conn.setDoOutput(true);

                // Send request body
                try (OutputStream os = conn.getOutputStream()) {
                    byte[] input = data.getBytes(StandardCharsets.UTF_8);
                    os.write(input, 0, input.length);
                }

                int statusCode = conn.getResponseCode();

                BufferedReader br;
                if (statusCode >= 200 && statusCode < 300) {
                    br = new BufferedReader(new InputStreamReader(conn.getInputStream(), StandardCharsets.UTF_8));
                } else {
                    br = new BufferedReader(new InputStreamReader(conn.getErrorStream(), StandardCharsets.UTF_8));
                }

                StringBuilder response = new StringBuilder();
                String line;
                while ((line = br.readLine()) != null) {
                    response.append(line.trim());
                }

                System.out.println(response.toString());

            } catch (Exception e) {
                e.printStackTrace();
            }
        }
    }
    const API_Key = "<API_Key>";
    const JWT_Token = "<JWT_TOKEN>";
    const QU_Token = "<QU_TOKEN>";

    const url = "https://dev.qupass.in/api/address";

    const data = {
      id: 1,
      operation: "protect",
      data: [
            "H. No: 4, Indranagar Colony, Bengaluru",
            "H. No: 7, Banjara Hills Colony, Hyderabad",
            "H. No: 2, Salt Lake Colony, Kolkata"
      ],
      options: {
        method: "tokenise",
        scope: "App1"
      }
    };

    fetch(url, {
      method: "POST",
      headers: {
        "x-api-key": API_Key,
        "Authorization": JWT_Token,
        "qu-token": QU_Token,
        "Content-Type": "application/json"
      },
      body: JSON.stringify(data)
    })
      .then(async (response) => {
        const text = await response.text(); // raw response like Python's response.text
        if (!response.ok) {
          throw new Error(`HTTP ${response.status}: ${text}`);
        }
        console.log(text);
      })
      .catch((error) => {
        console.error("Error:", error.message);
      });
    <?php

    $API_Key = "<API_Key>";
    $JWT_Token = "<JWT_TOKEN>";
    $QU_Token = "<QU_TOKEN>";

    $url = "https://dev.qupass.in/api/address";

    $headers = [
        "x-api-key: $API_Key",
        "Authorization: $JWT_Token",
        "qu-token: $QU_Token",
        "Content-Type: application/json"
    ];

    $data = [
        "id" => 1,
        "operation" => "protect",
        "data" => [
            "H. No: 4, Indranagar Colony, Bengaluru",
            "H. No: 7, Banjara Hills Colony, Hyderabad",
            "H. No: 2, Salt Lake Colony, Kolkata"
        ],
        "options" => [
            "method" => "tokenise",
            "scope" => "App1"
        ]
    ];

    $ch = curl_init($url);

    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    curl_setopt($ch, CURLOPT_POST, true);
    curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
    curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));

    $response = curl_exec($ch);

    if (curl_errno($ch)) {
        echo 'Error:' . curl_error($ch);
    } else {
        echo $response;
    }

    curl_close($ch);
    ?>
    import requests
    import json

    API_Key = "<API_Key>"
    JWT_Token = "<JWT_TOKEN>"
    QU_Token = "<QU_TOKEN>"

    url = 'https://dev.qupass.in/api/address'
    headers = {
      'x-api-key': API_Key,
      'Authorization': JWT_Token,
      'qu-token': QU_Token,
      'Content-Type': 'application/json'
    }

    data = {
      "id": 1,
      "operation": "protect",
      "data": [
            "H. No: 4, Indranagar Colony, Bengaluru",
            "H. No: 7, Banjara Hills Colony, Hyderabad",
            "H. No: 2, Salt Lake Colony, Kolkata"
      ],
      "options": {
        "method": "tokenise",
        "scope": "App1"
      }
    }

    response = requests.post(url, headers=headers, data=json.dumps(data))
    print(response.text)


Sample Data Payload and Output


PROTECTION SCENARIOS:

InputOutput
  {
    "operation": "protect",
    "data": [
        "H. No: 4, Indranagar Colony, Bengaluru",
        "H. No: 4, Indranagar Colony, Bengaluru",
        "H. No: 7, Banjara Hills Colony, Hyderabad",
        "H. No: 2, Salt Lake Colony, Kolkata"
    ],
    "method": "*" // [tokenise, fpe, .,]
  }
    {
      "operation": "protect",  
      "result": [
        "McZaArOwx ZFpgYjtrY HKzDfUzYW 70VWWjdDi wopIwQCoX RcrIWXeZzl",
        "McZaArOwx ZFpgYjtrY HKzDfUzYW 70VWWjdDi wopIwQCoX RcrIWXeZzl",
        "4vpjCxwf g9nV6CkU Sh926XKu KLLc0ylU TssWD8gr rZ6t8tkb myeSQviMLU",
        "SuiohR RPUI6f XOnEPa ixoDuy EPmefj fG9cHe uiXhhelxnNa7"
      ],
      "method": "tokenise"
    }
    {
      "operation": "protect",  
      "result": [
        "1lZQtaxDX iMRSLtNaD SDm0wSsVP EHymL6sWH lz8D8UHax AXSguEieDOJv6",
        "1lZQtaxDX iMRSLtNaD SDm0wSsVP EHymL6sWH lz8D8UHax AXSguEieDOJv6",
        "SbcDA36b ZlMdEAwH PkEA1omp npDmnUkr EnMSurhK pHsadYf4 OdArqeay6sZOl",
        "OxX27qD nWjInSE 1RJo7hy RjIxhyb WwxihqY eHLE6yi nivoLlcWl"
      ],
      "method": "tokenise",
      "scope": "App1" //SCOPE
    }
    {
      "operation": "protect",  
      "result": [
          "Zs8c7pS5w jJr2QCKgK 8jKUi5l6U 32ZplZkYS uSic8zaXN 8M3FCERitoj",
          "4loNt3JW1 g2fPNiUjc e6POvc0g4 pnzcHL61w z2tdfjH29 PeWyiNJnLf8",
          "zMdAkgoS eVE9zyZO LD4VhKL7 hcx4UiO7 GpCFfNqq UpRKIjzL 8Ksi5jVzoFs",
          "wemi5Gd Uh07gQu s5W0MP8 oFaMcij oNbRAHp M7ZxWs9 5Dp0P6l"
      ],
      "method": "tokenise",
      "noise": "2" //NOISE
    }
    {
      "operation": "protect",  
      "result": [
          "lhjCVs0kY rGdGw3m4E OTJF16lWt ai5eNJRxl aKeeyV3iR EmuR3are2otKN",
          "Evx8uCe9w 76X70m6E1 HmbkWVk3z qL2A15nlx 3JIZ6au0o eaGowOK2MFgSV",
          "KlkE3GUI NbDUcA7f fIh4w6AA Ejah97Po nnCPoWKU whOVgOn7 2RxmhQHOltTtfr",
          "psQ1Pvl VHnioZu THqpTd5 mAAqkm8 U5A8jGj rj7WJSH IK6i7Fdzd6"
      ],
      "method": "tokenise",
      "scope": "App1", //SCOPE
      "noise": "2" //NOISE
    }
    {
      "operation": "protect",  
      "result": [
          "5. S1: C, 6CFbn0UmR5 rPbE9q, DnTIsX7Gs",
          "5. S1: C, 6CFbn0UmR5 rPbE9q, DnTIsX7Gs",
          "4. Md: D, RTz8a4r Dqg6W mDQ8Cz, QOgYCxpLh",
          "y. OY: R, A6Py uXpZ MyRcrZ, ZpNTXsi"
      ],
      "method": "fpe" // FPE
    }

UNPROTECTION SCENARIOS:

InputOutput
  {
    "operation": "unprotect",
    "data": [
        "McZaArOwx ZFpgYjtrY HKzDfUzYW 70VWWjdDi wopIwQCoX RcrIWXeZzl",
        "McZaArOwx ZFpgYjtrY HKzDfUzYW 70VWWjdDi wopIwQCoX RcrIWXeZzl",
        "4vpjCxwf g9nV6CkU Sh926XKu KLLc0ylU TssWD8gr rZ6t8tkb myeSQviMLU",
        "SuiohR RPUI6f XOnEPa ixoDuy EPmefj fG9cHe uiXhhelxnNa7"
    ],
    "method": "tokenise"
  }
    {
      "operation": "unprotect",  
      "result": [
        "H. No: 4, Indranagar Colony, Bengaluru",
        "H. No: 4, Indranagar Colony, Bengaluru",
        "H. No: 7, Banjara Hills Colony, Hyderabad",
        "H. No: 2, Salt Lake Colony, Kolkata"
      ]
    }
  {
    "operation": "unprotect",
    "data": [
        "McZaArOwx ZFpgYjtrY HKzDfUzYW 70VWWjdDi wopIwQCoX RcrIWXeZzl",
        "McZaArOwx ZFpgYjtrY HKzDUzYW 70VWWjdDi wopIwQCoX RcrIWXeZzl", // INVALID
        "4vpjCxwf g9nV6CkU Sh926XKu KLLc0ylU TssWD8gr rZ6t8tkb myeSQviMLU",
        "SuiohR RPUI6f XOnEPa ixoDuy EPmefj fG9cHe uiXhhelxnNa7"
    ],
    "method": "tokenise"
  }
    {
      "operation": "unprotect",  
      "result": [
          "H. No: 4, Indranagar Colony, Bengaluru",
          "McZaArOwx ZFpgYjtrY HKzDUzYW 70VWWjdDi wopIwQCoX RcrIWXeZzl", // INVALID
          "H. No: 7, Banjara Hills Colony, Hyderabad",
          "H. No: 2, Salt Lake Colony, Kolkata"
      ],
      "discrepancy": {
        "invalid_token": [ //INVALID
          1 // INDEX
        ]
      }
    }
  {
    "operation": "unprotect",
    "data": [
        "McZaArOwx ZFpgYjtrY HKzDfUzYW 70VWWjdDi wopIwQCoX RcrIWXeZzl",
        "McZaArOwx ZFpgYjtrY HKzDfUzYW 70VWWjdDi wopIwQCoX RcrIWXeZzl",
        "4vpjCxwf g9nV6CkU Sh926XKu KLLc0ylU TssWD8gr rZ6t8tkb myeSQviMLU",
        "SuiohR RPUI6f XOnEPa ixoDuy EPmefj fG9cHe uiXhhelxnNa7"
    ],
    "method": "tokenise",
    "scope":"App2" //INVALID
  }
    {
      "operation": "unprotect",  
      "result": [
          "McZaArOwx ZFpgYjtrY HKzDfUzYW 70VWWjdDi wopIwQCoX RcrIWXeZzl",
          "McZaArOwx ZFpgYjtrY HKzDfUzYW 70VWWjdDi wopIwQCoX RcrIWXeZzl",
          "4vpjCxwf g9nV6CkU Sh926XKu KLLc0ylU TssWD8gr rZ6t8tkb myeSQviMLU",
          "SuiohR RPUI6f XOnEPa ixoDuy EPmefj fG9cHe uiXhhelxnNa7"
      ],
      "discrepancy": {
        "invalid_scope": [ //INVALID
          0, //INDEX
          1,
          2,
          3
        ]
      }
    }
  {
    "operation": "unprotect",
    "data": [
        "5. S1: C, 6CFbn0UmR5 rPbE9q, DnTIsX7Gs",
        "5. S1: C, 6CFbn0UmR5 rPbE9q, DnTIsX7Gs",
        "4. Md: D, RTz8a4r Dqg6W mDQ8Cz, QOgYCxpLh",
        "y. OY: R, A6Py uXpZ MyRcrZ, ZpNTXsi"
    ],
    "method": "fpe"
  }
    {
      "operation": "unprotect",  
      "result": [
          "H. No: 4, Indranagar Colony, Bengaluru",
          "H. No: 4, Indranagar Colony, Bengaluru",
          "H. No: 7, Banjara Hills Colony, Hyderabad",
          "H. No: 2, Salt Lake Colony, Kolkata"
      ]
    }