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": "" }
}
{
"data": {},
"success": false,
"error": { "message": "Policy old-test-policy not found." }
}
Deletes a policy and all associated metadata.
Endpoint
| Method | Endpoint |
|---|---|
PUT | https://<domain>/api/vault/metadata/policy/delete |
Behavior after deletion
| Item | Behavior |
|---|---|
| Previously masked data | Not affected — existing tokens remain valid |
New Mask/Unmask calls with this policy_name | Will fail with a policy not found error |
| Re-creation | Allowed — 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.
Was this page helpful?
Last updated 3 weeks ago
Built with Documentation.AI