API key
Definition
An API key is a long secret code that tells a software service which account is making a request. Anyone who has the key can act as you, within what that key is allowed to do, so it needs the same care as a password.
By Ronan Liedmeier, fractional head of growth and course author · Published 17 October 2026 · Last updated 17 October 2026
Also called: API token, secret key
Each time you connect an automation, an AI agent or a reporting tool to another service, you are usually handing it a key. A leaked key lets someone else read your data or spend your money on that service until you revoke it.
How it works
You create a key in the settings of the service you want to reach. Your automation or script then sends it with every API request, usually in a header, and the service checks it before doing anything. Many services let you limit a key, for example to read-only access or to one project, and some let you set an expiry date.
You can revoke a key at any time and create a new one, which is called rotating it. To make rotation painless, save the key once in your automation tool's credential store or in an environment variable, and have every workflow refer to it by name.
Example
A small business owner connects her newsletter tool to an automation platform so new customers get added to her list. She creates a key in the newsletter tool that can only add subscribers, saves it in the platform's credential store as "newsletter-prod", and selects that credential in each workflow. When her freelancer's contract ends, she revokes the key, creates a new one and updates the single saved credential. No workflow needs editing.
Common mistake
Pasting a key into an AI chat, a screenshot or a shared workflow so someone can "take a look". Treat any key that has been exposed this way as compromised: revoke it straight away and issue a new one.
Learn it in AI Academy
- Connecting Your First API to AIAdvanced · 14 minFree
Related terms
- API (application programming interface)
- An API (application programming interface) is a set of requests a software service agrees to accept from other programs, a bit like a menu. A program sends a request such as "create a contact" and the service sends back data or a confirmation.
- MCP gateway
- An MCP gateway is a single entry point that sits between your AI agents and all of your MCP servers. It holds the passwords and keys, decides which tools each agent may use, and keeps one log of every call.
- No-code automation
- No-code automation is building workflows that move data between apps by connecting visual blocks instead of writing code. Each workflow starts with a trigger, like a new email, and runs a set of steps, like creating a task, every time that trigger fires.