Authentication
Access to the API is authenticated using an API key mechanism.
Access to The Swarm API is secured using an API key mechanism, ensuring only authorized users can interact with the endpoints. Each API key is tied to a specific Team within The Swarm, so you must be an owner or admin of a Team and on the appropriate plan to use it.
How to Get Your API Key
-
Navigate to Team Settings by clicking your Team name in the top-left corner of the sidebar.
-
Go to the API tab.
-
Click Generate API Key to create your key.
-
Copy the generated key to your clipboard for use.
Using Your API Key
Include your API key in the headers of each request by adding it as the x-api-key
header. This authenticates your API calls and allows access to Team-specific data, such as profiles, lists, and tags.
Security Best Practices
Your API key is a powerful credential—treat it like a password:
-
Keep it private: Never share your API key in public spaces, such as GitHub or client-side code.
-
Protect your access: Unauthorized use of your API key can compromise your data and system integrity.
With your API key in hand, you’re ready to securely access The Swarm API and its capabilities!