Introduction to API Keys
The API Keys are used to authenticate trusted services. For example, to enable custom sign-in, data synchronization, or other secure API calls to the Knoon.ai endpoints.
⚠️ WARNING
Keep API keys private. Treat them like passwords
How to Create an API Key
Navigate to Admin > API Keys in your Knoon dashboard.
Click “Create” to generate a new key.
Give it a clear label (e.g., “Service Login” or “Data Sync”).
Copy and store the key securely in your server or environment variables. Never expose it in client-side code.
Usage Example
Use your organization ID as the username and the API key as the password for authentication when calling Knoon’s API.
import axios from 'axios'
const resp = await axios.post('https://api.knoon.ai/v1/...',
{
// request body
},
{
auth: {
username: organizationId,
password: apiKey
}
}
)This ensures secure, server-to-server communication using Basic Auth credentials.
Best Practices
Keep keys private: Never include them in frontend, logs, or shared code.
Rotate keys regularly: Revoke unused or compromised keys.
Restrict usage: Use separate keys for each service or environment.
Secure storage: Save in environment variables or a secrets manager (e.g., .env, Google Secret Manager, AWS Secrets Manager).
Common Use Cases
Custom Sign-In: Authenticate external apps or services to access your Knoon workspace.
Custom Data Sync: Push or pull data between your backend systems and Knoon’s platform.