Create Namespace policy

Note: Policy Creation comes under MetaData APIs are not available for trial users. A subscription is required to access these features. Please get in touch with help@protecto.ai for assistance. #

 

This API allows you to create a new policy in the namespace which can be attached while calling mask/unmask functions. This API will create a policy with default metadata configurations (All the entities as pseudonymizable), which can be updated.
If policy already exists, it will throw a “Policy already exists” message as a response.

What is a policy?

A policy can be considered as an identifier for the metadata configuration used for tokenizing the personal data elements.
Note :Only Namespace admins with “metadata_change” permission can access this route.

Protecto supports both pseudonymization and anonymization. By default, all entities (e.g., Person, Phone Number) are treated as pseudonymized.

Anonymization – A process that  modifies personal data so that it can never be linked back to an individual, even with additional information. It ensures complete privacy and makes re-identification impossible.

Pseudonymization – A process that replaces personal data with tokens while keeping a separate key or method to reverse the process if needed. It reduces the risk of exposure but still allows data to be re-identified when necessary.

METHOD: PUT
ROUTE: /metadata/policy/create

Headers:
{
“Authorization”: “Bearer <NAMESPACE_ADMIN_API_KEY>”
}

Request format:

{
"data": {
"policy_name": "Testing_Default_Policy"
}
}

Response structure:

{
"data": {
"message": "Testing_Default_Policy created successfully."
},
"success": true,
"error": {
"message": "}
}

Note: Add this Policy Name in Mask and Unmask API

Updated on October 6, 2025
What are your feelings

© All Rights Reserved 2023 | Protecto