How to Share API Keys and Secrets With Developers Safely
API keys are passwords for software. A leaked key can be abused within minutes, so how you hand it over matters as much as how you store it.
Where keys leak
The usual leaks are keys committed to Git, pasted into tickets or wikis, sent in group chats and left in screenshots. These places keep history for years and are visible to many people, which makes them risky for any secret.
Hand them over the safer way
Create a key limited to what the person needs, send it in a short-lived note, and confirm receipt through another channel. Once they have stored it in a proper secrets manager or environment variable, the note expires and leaves no trace in chat.
Rotate and monitor
Set an expiry or reminder to rotate keys, revoke any key that was ever pasted into a public place and watch usage for anomalies. Use separate keys per person or service so one revocation does not break everything.
Frequently asked questions
Is it safe to send an API key by email?
Avoid it. Email persists in many places; use a short-lived note and rotate the key afterwards.
What should I do if a key was exposed?
Revoke it immediately, create a new one and review recent activity.
Open the tool →