This is the multi-page printable view of this section. Click here to print.

Return to the regular view of this page.

API Playground Documentation

This is a repository for Protegrity API Playground documentation.

The documentation is available in the HTML format and can be viewed using your browser. You can also print and download the .pdf files of the required documentation.

1 - About API Playground

Summary of the capability

Protegrity API Playground is a free to use platform that lets you test the core functionality of Protegrity data security suite: sensitive data discovery and protection.

Our data protection service secures data while keeping its analytical utility. By leveraging Protegrity Vaultless Tokenization it preserves features of the data it receives: its format, length, language – and in some cases, also position and case. Referential integrity of protected data is kept intact. Protection consistency is maintained, too: every time you send a specific data point to the API, it will be protected the same way, i.e. “New York” will always be tokenized to “xYs fpsE”, etc. The API allows for data re-identification, i.e., retrieval to its original form.

Our GenAI security engine is powered by advanced context-aware models to classify and automatically protect your datasets, preparing them for use with your GenAI applications.

With the API Playground we strive for creating a valuable exploration platform for individuals and companies interested in Protegrity’s offering. We encourage feedback from the community.

Note that the Protegrity API Playground is not an official Protegrity product. It is intended for preliminary functionality testing and use of synthetic data is strongly advised. Performance has been limited by design (see the Usage & Limitations section). The platform is for demonstration purposes only and may not be an exact representation of the product.

2 - Key Concepts

Key concepts used by the API Playground

Data-Centric Security

A process of data de-identification that removes sensitivity from the original data in order to render it worthless in unauthorized hands. Data-Centric Security is commonly implemented through tokenization, encryption, FPE, hashing, and masking.

Sensitive Data Discovery

A process of detection and classification of sensitive data using advanced language models. Sensitive data includes personally identifiable information, commercially sensitive information, or otherwise confidential attributes associated with an individual.

Tokenization

Data tokenization is a reversible method of data protection. In tokenization, sensitive data is substituted with a randomly generated surrogate value known as a token. Generated token may be configured to be format, length, and language-preserving. Additional controls, such as adhering to a date range or passing the Luhn check are available. Tokenization is the most popular data protection method among Protegrity’s clients. Learn more about Protegrity Vaultless Tokenization.

Encryption

Encryption is an alternative method of reversible data protection. It uses mathematical algorithms and cryptographic keys to change data into “binary ciphertext,” rendering the encrypted data unreadable and unusable. To access the original data, a user needs to present an encryption key, which reverses the encryption process and unlocks the data.

External IV (Coming Soon)

A user-defined input added to a tokenization request used to differentiate generated tokens from the same initial value.

3 - Usage & Limitations

Limits of the API

To ensure fair use of the API service, we enforce rate limits on API requests.

These limits are:

  • Request Rate: 50 per second
  • Burst: up to 100
  • Quota: 10,000 requests per user
  • Max. Payload Size: 1MB

Note: Users are removed from the platform after 30 days of inactivity.

4 - Getting Started

Learn how to get started with Protegrity API Playground

This section groups together useful resources for getting started with the Playground: the initial setup and step-by-step guides that walk you through the registration, your IDE setup and a handful of examples of how to interact with the platform.

First-Time Users

New to the Playground? Perform the following steps and start using our APIs:

  • Sign–up to the Playground – see the steps in the Registration section.
  • Change your temporary passoword – see the steps in the Set Password section.

4.1 - Registration

Creating a user account

Before you can start using Protegrity API Playground, you need to register using the form on the official API Playground webpage. Once successful, you will receive an email from us with your unique API Key and the temporary password.

Registered already? Your first stop should be the user management section for setting your unique password – and then you’re good to go!

If you’re a first-time user you may want to take a look at one of our Getting Started guides. So far we have published them for Postman and VS Studio Code – REST.

4.2 - Postman Guide

Using Protegrity API Playground with Postman

For organizations handling sensitive data, finding a secure and efficient way to test data protection solutions is crucial. The Protegrity API Playground offers a straightforward way to test Protegrity’s data protection features. The Playground grants you 10,000 API requests after registration to use as you see fit: protecting names, addresses, credit card numbers – or any other data your organization considers secure. This guide will walk you through the setup process and show you sample API calls. And for those who prefer to skip the reading, check out our video guides: Registration & Setup or Using the API.

Choose your language & IDE

The best way to start with the Playground is to use our preconfigured Postman collection: import it into Postman, and you are good to go. This guide will leverage the collection to show you the login process and how to use the API. This is no precondition to accessing the Playground: you can use the code samples from the webpage and an IDE of your choice.

Registration

To register with Protegrity API Playground, fill out the form on the API Playground landing page. The information you provide is collected for user management and analytics. It is protected with Protegrity’s technology, ensuring that only authorized team members can view it in clear text. We are drinking our own champagne – it would be unwise not to!

Registration with Protegrity API Playground is straightforward

Once registered, you will receive an email from us. It will include your temporary password and your API key. Note: You will need both to make any calls to the Playground.

Welcome Email with your temporary password and API key

Login

As a first-time user, you will need to update your password. Choose a secure password (8 characters long, to include a unique character, a lowercase letter, an uppercase letter, and a number) and send it to the /change-password endpoint.

Change password – required for first-time users!

In return, you will receive a JWT Token. The token, alongside your API Key is your means of authorization. All data transformation requests going to the Playground require those elements.

The JWT Token expires every 24 hours. To renew it, go to the /login endpoint, and we will issue a new one.

Login to receive your JWT token

Environment Setup

Consider saving your JWT Token and the API Key as environment variables for convenience. If you use our preconfigured Postman collection, you can store them in the variables section. This will ensure that they are sent alongside every request and save you some tedious work of providing them with every call.

Setting environment variables in Postman

Now that’s done you’re all set! Let the API Playground be your oyster.

Data Protection Endpoints

Protegrity API Playground exposes a curated selection of endpoints for data protection: you can use them to secure any PII, PCI, or otherwise sensitive information. The predefined endpoints include names, addresses, zip codes, credit card numbers, social security numbers, and more.

Protegrity’s Vaultless Tokenization is renowned for its high configurability. The Playground lets you experiment with some of its flagship capabilities: length-, language-, position-, and case-preservation. This means that if you pass French strings to the API, you will receive a token that carries French characters. Numeric zip codes are length-preserving, meaning that a 5-digit input will produce a 5-digit output. Postcodes, i.e., codes that mix digits and characters, are even more advanced: you will keep their original length, position, and case in the received token. This is a very different approach to encryption, where the cyphertext resulting from the cryptographic function does not match the input domain and requires the developer to change the application to accommodate it.

A full list of available endpoints and their properties is available in the Using the API section. Let’s play around with some of them to give you an idea of what the Playground can offer.

Testing the API

We have hand-picked some protection endpoints that are representative of what you can expect from the Playground – and Protegrity’s platform.

Protecting Names

Most of our clients choose to protect their customers’ names. Let’s construct a request to the /name endpoint to secure the name of the King of England: Charles Mountbatten-Windsor.

The operation should be set to protect: this is how you will instruct the API what to do.

Paste the King’s name in the data and send the request.

Protecting the King’s name

And poof! The King is no longer a known person (in your records). Note that the /name endpoint does not support any text feature preservation (length, case, or position), as there is rarely any business case to do so. You will also notice that something interesting has happened: the separator within the King’s surname was not removed. This is because this tokenization element only acts on letters. Everything else is returned as-is.

You can now pass the protected string into the request and switch the operation to unprotect. This will return the King’s name.

Unprotecting the King’s name

The /name endpoint offers language preservation for German and French characters. To switch it on, provide a dictionary as an option and set it to your preferred language.

Setting French as the dictionary

Protecting Date of Birth

Date of birth is another attribute commonly considered as PII. If you provide it with a date, it will return its secured version in that same format. You can also decide to leave the year in the clear. Often, an entire date of birth is considered a sensitive attribute, however a year on its own is acceptable to be left in the clear. Here’s a sample request issued to /dob endpoint that demonstrates this feature:

Protecting dates of birth

Protecting Credit Card Numbers

Leaving your customer’s credit card numbers unprotected is a sure way to anger auditors, lose customer trust, and get into trouble. CCN is the core piece of data to secure – if you’re unsure what should be your priority, this is it.

When calling the /ccn endpoint, you can decide to protect the entire credit card string or leave the 8-digit BIN in the clear:

Protecting credit card numbers

Protecting multi-type payloads

Now that you have a good grasp of how our API Playground works, you can take it up a notch and protect (and unprotect) multiple data types at once. To do that, use the /multi endpoint. Specify the operation type, the data type, and options for each data point. Refer to the description of each data type (endpoint) to see all options available.

Here’s an example protection request of an address in Paris:

Multi-type request

Summary

The Protegrity API Playground offers a practical and essential entry point to test, evaluate, and refine data protection strategies within a secure environment, allowing teams to see if Protegrity is the right fit for their data privacy needs. Register today to start safeguarding your sensitive data, one API request at a time.

4.3 - VS Code Guide

Using Protegrity API Playground with VSCode REST Client

The Protegrity API Playground offers an easy way to test Protegrity’s data protection features. It comes with a pre-configured HTTP requests file that can be used in Visual Studio Code with the REST Client extension.

This is an addendum to the Postman guide. Please read that blog post first to learn how to register and how to use the Protegrity API Playground.

Add the REST Client extension

Follow the official documentation on how to add the REST Client extension in Visual Studio Code.

Download the HTTP requests collection

The best way to start with the Protegrity Playground in Visual Studio Code is to use our preconfigured HTTP requests collection file: get it from our Downloads section and open it in Visual Studio Code.

Add your API Key

The HTTP request file starts with the definition of some variables.


@api_token = changeme
@api_url = api.playground.protegrity.com
@api_version = v1
@jwt_token = changeme
@api_auth = auth

These variables will be used to construct the Playground’s URI and populate your authentication information. Change the @api_token to the value you received in your welcome email.

You’ll get the jwt_token only after your first login.

Bonus: Renew your JWT Token automatically

Since the JWT token is only valid for 24 hours and changes with a following login here’s a tip how you can set it automatically after each login.

The first request in the file is the user login. Add two lines to set the @jwt_token variable after each execution of the login request like in the following example:


# @name User_Login
POST https://{{api_url}}/{{api_auth}}/login
Authorization: {{jwt_token}}
Content-Type: application/json
{
  "email": "<YOUR_EMAIL>",
  "password": "<YOUR_PASSWORD>"
}

###
@jwt_token = {{User_Login.response.body.jwt_token}}

Keep your eye on the updates

The API Playground is an evergreen project: we are rolling out updates and new features every couple of months.

5 - Authentication

Protegrity API Playground uses an API Key and a JWT token for request authorization. You will receive your unique API Key as part of the registration process. This section documents how to obtain a JWT token.

To confirm and activate your account you need to first set a new password, using the credentials received via email.

Note: Accounts that were not activated within 7 days will be deleted and required to re-register.

Watch the video below for step-by-step instructions on registering with Protegrity API Playground:

5.1 - Set Password

Note: This endpoint is for first-time users only. If you require a password update, head to the Change Password endpoint.

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/auth/change-password

DESCRIPTION:

Set your password and obtain a JWT token for request authentication. This is a dedicated endpoint for the users creating their password for the first time and requires the temporary password provided during the registration.

Password requirements: Your new password should be at least 8 characters long, include a special character, a lowercase letter, an uppercase letter, and a number.

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/auth/change-password' \
--header 'Content-Type: application/json' \
--data-raw '{
  "email": "<USER_EMAIL>",
  "temp_password": "<TEMP_PASSWORD>",
  "new_password": "<NEW_PASSWORD>"
}'
  
  
  

SAMPLE RESPONSE


{
  "statusCode": 201,
  "message": "Password change successful",
  "jwt_token": "eyJraWQiOiI4T2pkOXlCWnlhMGYyVnZxRmRTblowN1ZnUEp6SHpTWFY5XC9xWXhvVTJWMD0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI4NDU4ZDQ2OC02MDIxLTcwMzktMTYzZi0zZGU4ZDZjMGE1ODgiLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29t"
}

5.2 - Login

Note: If you are logging in for the first time, start with the Set Password endpoint.

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/auth/login

DESCRIPTION:

Log in to the service using your API Key and password and obtain a JWT token for request authentication. A JWT token is valid for 24 hours. Run the endpoint again to request a new token.

SAMPLE REQUEST

cURL --location 'https://api.playground.protegrity.com/auth/login' \
--header 'Content-Type: application/json' \
--data-raw '{
    "email": "<USER_EMAIL>",
    "password": "<USER_PASSWORD>"
}'
  
  
  

SAMPLE RESPONSE


{
  "statusCode": 201,
  "message": "Login successful",
  "jwt_token": "eyJraWQiOiI4T2pkOXlCWnlhMGYyVnZxRmRTblowN1ZnUEp6SHpTWFY5XC9xWXhvVTJWMD0iLCJhbGciOiJSUzI1NiJ9.eyJzdWIiOiI4NDU4ZDQ2OC02MDIxLTcwMzktMTYzZi0zZGU4ZDZjMGE1ODgiLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwiaXNzIjoiaHR0cHM6XC9cL2NvZ25pdG8taWRwLnVzLWVhc3QtMS5hbWF6b25hd3MuY29t"
}

5.3 - Change Password

Note: This endpoint is for returning users only. If you are changing your password for the first time, start with the Set Password endpoint.

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/auth/change-password

DESCRIPTION:

Change your password.

Password requirements: Your new password should be at least 8 characters long, include a special character, a lowercase letter, an uppercase letter, and a number.

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/auth/change-password' \
--header 'Content-Type: application/json' \
--data-raw '{
  "email": "<USER_EMAIL>",
  "old_password": "<OLD_PASSWORD>",
  "new_password": "<NEW_PASSWORD>"
}'
  
  
  

SAMPLE RESPONSE


{
  "statusCode": 201,
  "message": "Password change successful"
}

6 - Using the API

What to expect

Protegrity API Playground features functionality derived from the original suite of Protegrity products in a form of API calls. Our API endpoints are easy-to-use and ask for minimal configuration. The Playground divides available endpoint portfolio into three families:

  • Data Protection endpoints, covering sensitive data protection. Users can decide to transform various data types, from numbers, strings, and dates without any inherent logic tom specific PII attributes like postcodes, or social security numbers.
  • Sensitive Data Discovery endpoints, which allow users to detect and classify sensitive data within payloads.
  • GenAI Security endpoints that combine the capabilities of the above, allowing users to perform automatic discovery and protection of sensitive data and specify their risk appetite.

Note: Protegrity does not store any data received from external API requests.

Watch the video below to learn how to use the API Playground:

6.1 - Required Headers

Required authentication headers

Every request should carry the following headers:

  • x-api-key (required): Your unique API Key. Received after a successful sign-up.

  • Authorization (required): A JWT token for the session. Obtained by running the Login and Change Password endpoints.

  • Content-Type (required): Set to application/json.

6.2 - Sensitive Data Discovery Endpoints

Detecting sensitive information

Sensitive data discovery is a cornerstone of any data-centric security initiative: it helps understand whether any sensitive data resides at rest, or it is present within ETL pipelines or elsewhere in-transit. The API Playground exposes REST endpoint that can be used to identify sensitive data within received payloads.

6.2.1 - Discover

Detect and classify sensitive data

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/discover

DESCRIPTION:

Detect and classify sensitive data in a given input. The endpoint will return a classification and confidence score for every sensitive attribute found, alongside its location – a column name or a start and end index. Confidence score returns values from 0.1 to 1. The higher the confidence score, the more the product is sure of the PII classification it produced. We recommend using the confidence score to prioritize inspection of found sensitive data.

ATTRIBUTES:

data (required) Input data to transform.

OPTIONS:

format (required) Specify the format of the input data. Option text covers unstructured text. Option csv is used for processing comma-separated values. Accepts: [ text | csv ].

header_line (optional) Specific to csv content only. Set to true if the data includes a header line in the first row. Set to false in case of the opposite. Accepts: [ true | false ]. Defaults to false.

raw (optional) Returns verbose output of the classification job when set to true. Accepts: [ true | false ]. Defaults to false.

SAMPLE REQUEST – TEXT

curl --location 'https://api.playground.protegrity.com/v1/discover' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
    "options": {
        "format": "text",
        "raw": false
    },
    "data": ["Hello, this is Peregrine Grey from Air Industries, could you give me a call back to my mobile number 212-456-7890. Have a lovely day!"]
}'
  
  
  

SAMPLE RESPONSE – TEXT


[
    {
        "score": 0.85,
        "classification": "PHONE_NUMBER",
        "start_index": 101,
        "end_index": 113
    },
    {
        "score": 0.99,
        "classification": "PERSON",
        "start_index": 15,
        "end_index": 29
    }
]

SAMPLE REQUEST – CSV

curl --location 'https://api.playground.protegrity.com/v1/ai' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
    "operation": "classify",
    "options": {
        "format": "csv",
        "header_line": true,
        "raw": false
    },
    "data": ["Social Security Number,Credit Card Number,IBAN,Phone Number\n589-25-1068,349384370543801,FR43 9255 4858 47BG 3EBG U4OK O18,(483) 9440301\n636-36-3077,4041594844904,AL50 8947 4215 KAEY GAPM NLYC FNZG,(113) 5143119\n748-82-2375,3558175715821800,AT34 4082 9269 0841 5702,(763) 5136237\n516-62-9861,560221027976015000,FR22 0068 7181 11FB UG8H ECEM 306,(726) 6031636\n121-49-9409,374283320982549,DK37 5687 8459 8060 79,(624) 9205200\n838-73-3299,5558216060144900,CR54 8952 8144 6403 4765 0,(356) 9479541\n439-11-5310,5048376143641900,RS76 6213 4824 0184 8983 74,(544) 5623326\n564-06-8466,3543299511845640,EE51 6882 3443 7863 4703,(702) 6093849\n518-54-5443,3543019452249540,IT65 D000 3874 2801 Z15I LNLL OOX,(584) 8618371"]
}'
  
  
  

SAMPLE RESPONSE – CSV


[
    {
        "score": 0.85,
        "classification": "US_SSN",
        "column_name": "Social Security Number",
        "column_index": 0
    },
    {
        "score": 0.11,
        "classification": "CREDIT_CARD",
        "column_name": "Credit Card Number",
        "column_index": 1
    },
    {
        "score": 0.04,
        "classification": "US_BANK_NUMBER",
        "column_name": "Credit Card Number",
        "column_index": 1
    },
    {
        "score": 0.0,
        "classification": "US_DRIVER_LICENSE",
        "column_name": "Credit Card Number",
        "column_index": 1
    },
    {
        "score": 0.01,
        "classification": "US_DRIVER_LICENSE",
        "column_name": "IBAN",
        "column_index": 2
    },
    {
        "score": 0.01,
        "classification": "US_DRIVER_LICENSE",
        "column_name": "Phone Number",
        "column_index": 3
    },
    {
        "score": 0.79,
        "classification": "IBAN_CODE",
        "column_name": "IBAN",
        "column_index": 2
    },
    {
        "score": 0.09,
        "classification": "DATE_TIME",
        "column_name": "IBAN",
        "column_index": 2
    },
    {
        "score": 0.75,
        "classification": "PHONE_NUMBER",
        "column_name": "Phone Number",
        "column_index": 3
    },
    {
        "score": 0.01,
        "classification": "PERSON",
        "column_name": "Phone Number",
        "column_index": 3
    }
]

6.3 - Data Protection Endpoints

Protecting names, addresses, and other PII information

Protegrity API Playground exposes a curated selection of endpoints for data protection: you can use them to secure any PII and PCI information. The predefined endpoints include names, addresses, numbers, Credit Card Numbers, Social Security Numbers, and more. Format, length and language preservation are supported.

This collection is a subset of Protegrity functions available in the full version of the product.

6.3.1 - Name (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/name

DESCRIPTION:

Protect or unprotect a person’s name. The received token is not length-preserving.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

OPTIONS:

dictionary (optional) Specify the Unicode domain of the input and output values. Option en covers all characters within the Basic Latin block of the Unicode standard (range U+0000..U+007F). Options de and fr extend that coverage to include German and French characters, respectively. Accepts: [ en | de | fr ]. Defaults to en.

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/name' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["Robin", "Wren"],
  "options": {
    "dictionary": "en"
  }
}'
  
  
  

SAMPLE RESPONSE


[
    "xkKZQ",
    "hTKo"
]

6.3.2 - Address (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/address

DESCRIPTION:

Protect or unprotect an address. The received token is not length-preserving.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

OPTIONS:

dictionary (optional) Specify the Unicode domain of the input and output values. Option en covers all characters within the Basic Latin block of the Unicode standard (range U+0000..U+007F). Options de and fr extend that coverage to include German and French characters, respectively. Accepts: [ en | de | fr ]. Defaults to en.

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/address' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["77 Boulevard Saint-Jacques", "46 avenue de la Grande Armée"],
  "options": {
    "dictionary": "fr"
  }
}'
  
  
  

SAMPLE RESPONSE


[
  "3u CG5itJTNu KJStq-galulig",
  "Gr AY5iAK k1 n8 LvIx74 ewBék"
]

6.3.3 - City (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/city

DESCRIPTION:

Protect or unprotect a town or city. The received token is not length-preserving.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

OPTIONS:

dictionary (optional) Specify the Unicode domain of the input and output values. Option en covers all characters within the Basic Latin block of the Unicode standard (range U+0000..U+007F). Options de and fr extend that coverage to include German and French characters, respectively. Accepts: [ en | de | fr ]. Defaults to en.

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/city' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["Berlin", "München"],
  "options": {
    "dictionary": "de"
  }
}'
  
  
  

SAMPLE RESPONSE


[
  "hjsöIO",
  "YAßiaoP"
]

6.3.4 - Postcode (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/postcode

DESCRIPTION:

Protect or unprotect a postal code with digits and chatacters. The received token is case-, length-, and position-preserving but may create invalid postal codes (e.g., restricted letters).

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/postcode' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["WX90GA", "SW700"]
}'
  
  
  

SAMPLE RESPONSE


[
  "AD12TT",
  "II867"
]

6.3.5 - Zipcode (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/zipcode

DESCRIPTION:

Protect or unprotect a postal code with digits only. The received token is length-preserving. The method may produce leading zeroes and invalid zipcodes (e.g., restricted digits).

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/zipcode' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["29017", "28100"]
}'
  
  
  

SAMPLE RESPONSE


[
  "00891",
  "67996"
]

6.3.6 - Phone (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/phone

DESCRIPTION:

Protect or unprotect a phone number. The received token is length-preserving. May return leading zeroes.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/phone' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["63098109", "120-99-02-10"]
}'
  
  
  

SAMPLE RESPONSE


[
  "81176289",
  "425-44-65-10"
]

6.3.7 - Email (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/email

DESCRIPTION:

Protect or unprotect a phone number. The received token is length-preserving. May return leading zeroes.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/email' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["ava.mcconnor@acme.corp", "wren@business.com"]
}'
  
  
  

SAMPLE RESPONSE


[
  "d3E.ui2sOks@acme.corp",
  "6KOe@business.com"
]

6.3.8 - Date of Birth (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/dob

DESCRIPTION:

Protect or unprotect a phone number. The received token is length-preserving. May return leading zeroes.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

OPTIONS:

year (optional) Set to true to leave the year in the clear. Must be set to true when unprotecting the string tokenized using this option. Accepts: [ true | false ]. Defaults to false.

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/dob' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["1980/12/10", "1965/01/27"],
  "options": {
    "year": true
  }
}'
  
  
  

SAMPLE RESPONSE


[
  "1980/03/24",
  "1965/08/11"
]

6.3.9 - National Insurance Number (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/nin

DESCRIPTION:

Protect or unprotect a National Insurance Number (UK). The returned NIN is case-, length- and position-preserving, i.e., generated letters and numbers will adhere to their original position. Note that some NIN logic, i.e. restricted letters, is not preserved.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/nin' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["QQ123456A", "KT902281F"]
}'
  
  
  

SAMPLE RESPONSE


[
  "CD196371K",
  "OO918451S"
]

6.3.10 - Social Security Number (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/ssn

DESCRIPTION:

Protect or unprotect a Social Security Number (US). The returned SSN is length- and format-preserving. Note that some SSN logic, i.e. restricted numbers within digit groups, is not preserved.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/ssn' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["782-01-2930", "291-44-5983"]
}'
  
  
  

SAMPLE RESPONSE


[
  "399-03-3685",
  "389-71-6451"
]

6.3.11 - Credit Card Number (PCI DSS)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/ccn

DESCRIPTION:

Protect or unprotect a Credit Card Number. The returned CCN is not length-preserving. The endpoint accepts partial CCN protection, i.e. leaving the 8-digit BIN in the clear.

ATTRIBUTES:

data (required) Input data to transform.

OPTIONS:

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

bin (optional) Set to true to leave the 8-digit BIN number in the clear. Must be set to true when unprotecting the string tokenized using this option. Accepts: [ true | false ]. Defaults to false.

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/ccn' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["4321567898765432", "2376876534560987"],
  "options": {
    "bin": false
  }
}'
  
  
  

SAMPLE RESPONSE


[
  "0449999816792240",
  "6683962881463918"
]

6.3.12 - Passport (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/passport

DESCRIPTION:

Protect or unprotect a passport number. The returned passport number is case-, length- and position-preserving (i.e., generated letters and numbers will adhere to their original position). Note that some passport logic, i.e. restricted letters, is not preserved.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/passport' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["FA039020112", "CBR90110244"]
}'
  
  
  

SAMPLE RESPONSE


[
  "IN890183422",
  "GFR67102933"
]

6.3.13 - IBAN (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/iban

DESCRIPTION:

Protect or unprotect an Internation Banking Account Number. The returned IBAN is case-, length- and position-preserving. Note that some IBAN logic, i.e., producing valid country codes or a checksum validation, is not supported. The endpoint accepts partial IBAN protection, i.e., leaving the letters in the clear.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

OPTIONS:

alpha (optional) Set to true to leave the letters in the clear. Must be set to true when unprotecting the string tokenized using this option. Accepts: [ true | false ]. Defaults to false.

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/iban' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["NO8330001234567", "QA54QNBA000000000000693123456"],
  "options": {
    "alpha": true
  }
}'
  
  
  

SAMPLE RESPONSE


[
  "NO0980006979071",
  "QA13QNBA128618782491645358717"
]

6.3.14 - String

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/string

DESCRIPTION:

Protect or unprotect a string. Maximum length of the string is 128 characters. The returned string is not length-preserving neither case-preserving.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/string' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["hello", "world"]
}'
  
  
  

SAMPLE RESPONSE


[
  "UkosA",
  "okPPwa"
]

6.3.15 - Number

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/number

DESCRIPTION:

Protect or unprotect a number. The returned number is length-preserving. The endpoint might generate numbers with leading zeros.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/string' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["123654", "987654"]
}'
  
  
  

SAMPLE RESPONSE


[
  "034539",
  "101012"
]

6.3.16 - Text (Encryption)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/text

DESCRIPTION:

Protect or unprotect sample text using encryption. Received text must be hex encoded. The returned value is hex encoded. There is no limitation on the text’s length however payload limits apply.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/text' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["48656c6c6f20576f726c640a"]
}'
  
  
  

SAMPLE RESPONSE


[
  "E616C7B0762E28A32E0FABF4BC403C8D"
]

6.3.17 - Date of Birth (PII)

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/datetime

DESCRIPTION:

Protect or unprotect a datetime string The endpoint accepts partial timestamp protection, i.e., leaving the year value in the clear. Supported formats: YYYY/MM/DD and YYYY/MM/DD HH:MM:SS. Supported delimiters: /, -, .; space or T are supported between date and time.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

OPTIONS:

year (optional) Set to true to leave the year in the clear. Must be set to true when unprotecting the string tokenized using this option. Accepts: [ true | false ]. Defaults to false.

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/datetime' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "protect",
  "data": ["1980/12/10 14:12:01", "1965/01/27"],
  "options": {
    "year": true
  }
}'
  
  
  

SAMPLE RESPONSE


[
  "1980/03/24 03:19:45",
  "1965/08/11"
]

6.3.18 - Multitype

Data protection endpoint

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/multi

DESCRIPTION:

Protect or unprotect various attributes within a payload. Please refer to the specific payload type descriptions to see available options.

ATTRIBUTES:

data (required) Input data to transform.

type (required) Type of data provided. It should match one of available Data Protection endpoints, e.g. name, address, ccn.

operation (required) Specify if to protect or unprotect data. Accepts: [ protect | unprotect ].

id (required) A numeric id for tracking separete elements.

OPTIONS:

options (optional) Options as available for each endpoint type.

SAMPLE REQUEST

curl --location 'https://api.playground.protegrity.com/v1/multi' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '[
  {
    "id": 1,
    "type": "address",
    "operation": "protect",
    "data": ["Place 8 Rue Nicolau", "46 avenue de la Grande Armée"],
    "options":{
      "dictionary": "fr"
    }
  },
  {
    "id": 2,
    "type": "city",
    "operation": "protect",
    "data": ["Paris"]
  }
]'
  
  
  

SAMPLE RESPONSE


[
    {
        "id": "1",
        "results": [
            "è6HmO s 0Cq okÎHWmxÛR",
            "sC ÈÂÉÉut éj Âî C1io3V 7xIoZSV"
        ]
    },
    {
        "id": "2",
        "results": [
            "ôdnÂefp"
        ]
    }
]

6.4 - GenAI Security Endpoints (Preview)

Automatic detection & protection of sensitive data

GenAI Security enpoints focus on automated sensitive data discovery and protection. You can detect sensitive data and choose to automatically protect the findings. Protegrity’s context-aware models are leveraged to identify sensitive data within provided input. Currently the classification can only be generated for texts in English.

This collection includes pre-release functionality and is subject to change in the future releases of the platform. We are actively iterating over this offering and welcome industry insight to help shape up the platform.

UPCOMING ENHANCEMENTS:

  • Improved PII detection in sentences without punctuation
  • Improved detection of emails and zipcodes provided without context
  • Improved detection of account numbers in large payloads

6.4.1 - Classify (Preview)

Detect and classify sensitive data

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/ai

DESCRIPTION:

Detect and classify sensitive data in a given input. The endpoint will return a classification and confidence score for every sensitive attribute found, alongside its location – a column name or a start and end index. Confidence score returns values from 0.1 to 1. The higher the confidence score, the more the product is sure of the PII classification it produced. We recommend using the confidence score to prioritize inspection of found sensitive data.

ATTRIBUTES:

data (required) Input data to transform.

operation (required) Type of operation to perform. Choose classify to only detect and classify data. Option protect deidentifies data. Option unprotect restores de-identified data to its original values. Accepts: [ classify | protect | unprotect ]

format (required) Specify the format of the input data. Option text covers unstructured text. Option csv is used for processing comma-separated values. Accepts: [ text | csv ].

OPTIONS:

header_line (optional) Specific to csv content only. Set to true if the data includes a header line in the first row. Set to false in case of the opposite. Accepts: [ true | false ]. Defaults to false.

SAMPLE REQUEST – TEXT

curl --location 'https://api.playground.protegrity.com/v1/ai' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
    "operation": "classify",
    "options": {
        "format": "text"
    },
    "data": ["Hello, this is Peregrine Grey from Air Industries, could you give me a call back to my mobile number 212-456-7890. Have a lovely day!"]
}'
  
  
  

SAMPLE RESPONSE – TEXT


[
    {
        "score": 0.85,
        "classification": "PHONE_NUMBER",
        "start_index": 101,
        "end_index": 113
    },
    {
        "score": 0.99,
        "classification": "PERSON",
        "start_index": 15,
        "end_index": 29
    }
]

SAMPLE REQUEST – CSV

curl --location 'https://api.playground.protegrity.com/v1/ai' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
    "operation": "classify",
    "options": {
        "format": "csv",
        "header_line": true
    },
    "data": ["Social Security Number,Credit Card Number,IBAN,Phone Number\n589-25-1068,349384370543801,FR43 9255 4858 47BG 3EBG U4OK O18,(483) 9440301\n636-36-3077,4041594844904,AL50 8947 4215 KAEY GAPM NLYC FNZG,(113) 5143119\n748-82-2375,3558175715821800,AT34 4082 9269 0841 5702,(763) 5136237\n516-62-9861,560221027976015000,FR22 0068 7181 11FB UG8H ECEM 306,(726) 6031636\n121-49-9409,374283320982549,DK37 5687 8459 8060 79,(624) 9205200\n838-73-3299,5558216060144900,CR54 8952 8144 6403 4765 0,(356) 9479541\n439-11-5310,5048376143641900,RS76 6213 4824 0184 8983 74,(544) 5623326\n564-06-8466,3543299511845640,EE51 6882 3443 7863 4703,(702) 6093849\n518-54-5443,3543019452249540,IT65 D000 3874 2801 Z15I LNLL OOX,(584) 8618371"]
}'
  
  
  

SAMPLE RESPONSE – CSV


[
    {
        "score": 0.4,
        "classification": "US_SSN",
        "column_name": "0",
        "column_index": 0
    },
    {
        "score": 0.99,
        "classification": "CCN",
        "column_name": "1",
        "column_index": 1
    }
]

6.4.2 - Protect (Preview)

Detect, classify, and protect sensitive data

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/ai

DESCRIPTION:

Detect, classify, and protect sensitive data in a given input. The endpoint will protect the attributes classified as sensitive with a confidence score of 0.68 or more.

ATTRIBUTES:

data (required) Input data to transform.

format (required) Specify the format of the input data. Option text covers unstructured text. Option csv is used for processing comma-separated values. Accepts: [ text | csv ].

operation (required) Type of operation to perform. Choose classify to only detect and classify data. Option protect deidentifies data. Option unprotect restores de-identified data to its original values. Accepts: [ classify | protect | unprotect ]

OPTIONS:

type (optional) Specify the protection mechanism. Option mask replaces all attributes with ‘*****’. Option tokenize applies a tokenization method that matches the classification of the found attribute. Accepts: [ mask | tokenize ]. Defaults to mask.

tags (optional) Specify if to include tags (or mapping information in the case of structured payloads) to mark protected attributes with their assigned classification label. Tags are required for reversing the protection. Accepts: [ true | false ]. Defaults to true.

header_line (optional) Specific to csv content only. Set to true if the data includes a header line in the first row. Set to false in case of the opposite. Accepts: [ true | false ]. Defaults to false.

threshold (optional) Set to the preferred confidence score threshold. Protection will be applied to attributes identified as matching or over the set threshold. Set a to numeric value. If not specified, the threshold is configured to 0.68.

SAMPLE REQUEST – TEXT

curl --location 'https://api.playground.protegrity.com/v1/ai' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
    "operation": "protect",
    "options": {
        "format": "text",
        "type": "mask",
        "tags": false,
        "threshold": 0.7
    },
    "data": ["Hello, this is Peregrine Grey from Air Industries, could you give me a call back to my mobile number 212-456-7890. Have a lovely day!"]
}'
  
  
  

SAMPLE RESPONSE – TEXT


{
    "results": "Hello, this is ############## from Air Industries. Could you give me a call back to my mobile number ############. Have a lovely day!"
}

SAMPLE REQUEST – CSV

curl --location 'https://api.playground.protegrity.com/v1/ai' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
    "operation": "protect",
    "options": {
        "format": "csv",
        "header_line": true,
        "type": "tokenize",
        "tags": true,
        "threshold": 0.7
    },
    "data": ["Social Security Number,Credit Card Number,IBAN,Phone Number\n589-25-1068,349384370543801,FR43 9255 4858 47BG 3EBG U4OK O18,(483) 9440301\n636-36-3077,4041594844904,AL50 8947 4215 KAEY GAPM NLYC FNZG,(113) 5143119\n748-82-2375,3558175715821800,AT34 4082 9269 0841 5702,(763) 5136237\n516-62-9861,560221027976015000,FR22 0068 7181 11FB UG8H ECEM 306,(726) 6031636\n121-49-9409,374283320982549,DK37 5687 8459 8060 79,(624) 9205200\n838-73-3299,5558216060144900,CR54 8952 8144 6403 4765 0,(356) 9479541\n439-11-5310,5048376143641900,RS76 6213 4824 0184 8983 74,(544) 5623326\n564-06-8466,3543299511845640,EE51 6882 3443 7863 4703,(702) 6093849\n518-54-5443,3543019452249540,IT65 D000 3874 2801 Z15I LNLL OOX,(584) 8618371"]
}'
  
  
  

SAMPLE RESPONSE – CSV


{
    "mapping": [
        {
            "classification": "US_SSN",
            "column_index": 0
        },
        {
            "classification": "CREDIT_CARD",
            "column_index": 1
        },
        {
            "classification": "IBAN_CODE",
            "column_index": 2
        },
        {
            "classification": "PHONE_NUMBER",
            "column_index": 3
        }
    ],
    "data": "Social Security Number,Credit Card Number,IBAN,Phone Number\n548-31-3268,602048102797043,FR17 5415 4336 25BG 3EBG U4OK O64,(654) 3308224\n481-70-3857,1230437596808,AL33 1240 7288 KAEY GAPM NLYC FNZG,(271) 2802977\n755-85-3665,8461740972061430,AT25 0533 9808 8046 3404,(335) 2981943\n557-54-6818,116202261366298390,FR34 2630 5071 38FB UG1H ECEM 902,(614) 1716660\n055-91-9942,888966093482491,DK05 9696 6634 8709 30,(888) 2741502\n964-99-0589,1163706741835754,CR80 1243 0722 7573 5790 0,(871) 3397725\n188-07-4113,4107600970907496,RS64 9873 7248 6702 7241 58,(699) 7510692\n296-61-1694,417282980942395,EE32 8302 5118 1829 2990,(651) 3698973\n979-08-3159,8471859640609227,IT99 D202 3280 0140 Z43I LNLL OOX,(902) 9747145\n"
}

6.4.3 - Unprotect (Preview)

Re-identify protected data

METHOD: POST

ENDPOINT: https://api.playground.protegrity.com/v1/ai

DESCRIPTION:

Unprotect sensitive data in a given input, i.e. revert previously tokenized values to their original contents. Provided text must include tags to enable this transformation.

ATTRIBUTES:

data (required) Input data to transform.

format (required) Specify the format of the input data. Option text covers unstructured text. Option csv is used for processing comma-separated values. Accepts: [ text | csv ].

operation (required) Type of operation to perform. Choose classify to only detect and classify data. Option protect deidentifies data. Option unprotect restores de-identified data to its original values. Accepts: [ classify | protect | unprotect ]

OPTIONS:

mapping (optional) Required when re-identifying csv payloads. Paste here the mapping received during the protection operation.

header_line (optional) Specific to csv content only. Set to true if the data includes a header line in the first row. Set to false in case of the opposite. Accepts: [ true | false ]. Defaults to false.

SAMPLE REQUEST – TEXT

curl --location 'https://api.playground.protegrity.com/v1/ai' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
  "operation": "unprotect",
  "format": "text",
  "data": ["Hello, this is [PERSON]SQnnLOQMw TEwP[/PERSON] from Air Industries. Could you give me a call back to my mobile number [PHONE_NUMBER]025-016-8606[/PHONE_NUMBER]. Have a lovely day!"]
}'
  
  
  

SAMPLE RESPONSE – TEXT


{
  "results": "Hello, this is Peregrine Grey from Air Industries. Could you give me a call back to my mobile number 212-456-7890. Have a lovely day!"
}

SAMPLE REQUEST – CSV

curl --location 'https://api.playground.protegrity.com/v1/ai' \
--header 'x-api-key: <API_Key>' \
--header 'Content-Type: application/json' \
--header 'Authorization: <JWT_TOKEN>' \
--data '{
    "operation": "unprotect",
    "options": {
        "format": "csv",
        "header_line": true,
        "mapping": [
            {
                "classification": "US_SSN",
                "column_index": 0
            },
            {
                "classification": "CREDIT_CARD",
                "column_index": 1
            },
            {
                "classification": "IBAN_CODE",
                "column_index": 2
            },
            {
                "classification": "PHONE_NUMBER",
                "column_index": 3
            }
        ]
    },
    "data": ["Social Security Number,Credit Card Number,IBAN,Phone Number\n548-31-3268,602048102797043,FR17 5415 4336 25BG 3EBG U4OK O64,(654) 3308224\n481-70-3857,1230437596808,AL33 1240 7288 KAEY GAPM NLYC FNZG,(271) 2802977\n755-85-3665,8461740972061430,AT25 0533 9808 8046 3404,(335) 2981943\n557-54-6818,116202261366298390,FR34 2630 5071 38FB UG1H ECEM 902,(614) 1716660\n055-91-9942,888966093482491,DK05 9696 6634 8709 30,(888) 2741502\n964-99-0589,1163706741835754,CR80 1243 0722 7573 5790 0,(871) 3397725\n188-07-4113,4107600970907496,RS64 9873 7248 6702 7241 58,(699) 7510692\n296-61-1694,417282980942395,EE32 8302 5118 1829 2990,(651) 3698973\n979-08-3159,8471859640609227,IT99 D202 3280 0140 Z43I LNLL OOX,(902) 9747145\n"]
}'
  
  
  

SAMPLE RESPONSE – CSV


{
  "results": "Social Security Number,Credit Card Number,IBAN,Phone Number\n589-25-1068,349384370543801,FR43 9255 4858 47BG 3EBG U4OK O18,(483) 9440301\n636-36-3077,4041594844904,AL50 8947 4215 KAEY GAPM NLYC FNZG,(113) 5143119\n748-82-2375,3558175715821800,AT34 4082 9269 0841 5702,(763) 5136237\n516-62-9861,560221027976015000,FR22 0068 7181 11FB UG8H ECEM 306,(726) 6031636\n121-49-9409,374283320982549,DK37 5687 8459 8060 79,(624) 9205200\n838-73-3299,5558216060144900,CR54 8952 8144 6403 4765 0,(356) 9479541\n439-11-5310,5048376143641900,RS76 6213 4824 0184 8983 74,(544) 5623326\n564-06-8466,162068942413568,EE51 6882 3443 7863 4703,(702) 6093849\n518-54-5443,3543019452249540,IT65 D000 3874 2801 Z15I LNLL OOX,(584) 8618371\n"
}

7 - Release Notes

What’s new and what’s changed

This section contains all release notes published to date. Please note that some releases may break backwards compatibility as we continue improving the service. The release notes will highlight these changes.

Version 1.8 | January 16th, 2025

  • Added support for csv within GenAI Security endpoints (classify, protect, unprotect)
  • Added a threshold option for configuring a minimal confidence score when sending data for protection
  • Added support for parsing csv data with and without headers as header_line
  • Added sensitive data detection endpoint as /discover

Version 1.7 | December 2nd, 2025

  • Added /ai endpoints for sensitive data detection and protection