Policy ManagementUpdate Prefixes & Suffixes

Update Prefixes & Suffixes

Customize the prefix and suffix used to wrap masked entity values in auto-detect masking output.

{
  "data": {
    "policy_name": "custom-format-policy",
    "metadata": [
      {
        "entity_name": "PERSON",
        "format_prefix": "{Person ",
        "format_suffix": "}"
      },
      {
        "entity_name": "PHONE_NUMBER",
        "format_prefix": "{Phone ",
        "format_suffix": "}"
      }
    ]
  }
}

Updates the prefix and suffix used when auto-detect masking finds an entity. This applies to parent entities and automatically affects child formats.

Endpoint

MethodEndpoint
PUThttps://<domain>/api/vault/metadata/update-auto-detect

Request body

body
policy_namestring
Required

Target policy to update.

body
metadataarray
Required

Array of entity prefix/suffix configurations.

With these settings, a masked output would look like:

{Person VJYe 03W} can be reached at {Phone 397-481-2948}

Instead of the default:

<PER>VJYe 03W</PER> can be reached at <PHONE_NUMBER>397-481-2948</PHONE_NUMBER>

Notes

  • This is effective only when policy_name is passed to Mask or Unmask API calls
  • Does not affect token values themselves — only the output formatting wrapper
  • Changes are applied immediately to all requests using this policy