Tool argument encryption protects sensitive data like Social Security Numbers, Credit Card Numbers, and other PII by encrypting specific fields before they’re sent to your server.
In this guide, you’ll learn to:
Navigate to the custom credentials page and enable encryption settings.

Use OpenSSL to generate a public/private key pair in PEM format.
Run this command in your terminal to generate both keys:
This creates two files:
private-key.pem - Keep this secure on your server for decryptionpublic-key.pem - Copy this to Vapi for encryptionNever share or commit your private key. Store it securely in your server’s environment variables.
Copy and paste your public key into the Vapi dashboard.
public-key.pem and copy the entire contents
Your credential is now ready to use with encrypted tool arguments.
Navigate to your tools and choose which tool should use encryption.
Link your encryption credential and specify which fields to encrypt.
Example JSON paths:
ssn - Encrypts the ssn fieldpayment.cardNumber - Encrypts nested fieldsJSON paths are relative to the tool’s argument structure. Only specified fields will be encrypted.


Save your tool configuration and verify encryption works with a test call.
When your server receives the webhook, encrypted fields will appear as base64-encoded strings:
Follow these guidelines to maintain secure encryption:
Now that you have tool argument encryption configured: