Policy ManagementDelete Policy

Delete Policy

Permanently delete a policy and all its associated metadata from the namespace.

curl -X PUT https://<domain>/api/vault/metadata/policy/delete \
  -H "Authorization: Bearer <NAMESPACE_ADMIN_API_KEY>" \
  -H "Content-Type: application/json; charset=utf-8" \
  -d '{
    "data": {
      "policy_name": "old-test-policy"
    }
  }'
{
  "data": {
    "message": "Policy old-test-policy deleted successfully."
  },
  "success": true,
  "error": { "message": "" }
}

Deletes a policy and all associated metadata.

Endpoint

MethodEndpoint
PUThttps://<domain>/api/vault/metadata/policy/delete

Behavior after deletion

ItemBehavior
Previously masked dataNot affected — existing tokens remain valid
New Mask/Unmask calls with this policy_nameWill fail with a policy not found error
Re-creationAllowed — you can create a new policy with the same name

Deleting a policy immediately affects all systems using it. Any Mask or Unmask API calls that reference the deleted policy_name will fail until they are updated to use a different policy.