API authentication#
n8n uses API keys to authenticate API calls.
Create an API key#
- Log in to n8n.
- Go to Settings > n8n API.
- Select Create an API key.
- Copy My API Key and use this key to authenticate your calls.
Delete an API key#
- Log in to n8n.
- Go to Settings > n8n API.
- Select Delete next to the key you want to delete.
- Confirm the delete by selecting Delete Forever.
Call the API using your key#
Send the API key in your API call as a header named X-N8N-API-KEY
.
For example, say you want to get all active workflows. Your curl request will look like this:
1 2 3 4 5 6 7 8 9 10 11 |
|