Appearance
API Keys
Generate and manage API keys for secure authentication with Gnosari's API.
Overview
API keys allow you to authenticate programmatic requests to your Gnosari account. Use them to integrate Gnosari agents and teams into your applications, automation workflows, or custom tools.
Security Note: API keys are like passwords. Never share them publicly, commit them to version control, or expose them in client-side code.
Accessing the API Keys Page
- Click your profile picture in the top-right corner
- Select Settings from the dropdown
- Navigate to API Keys in the settings sidebar
Or go directly to: /settings/api-keys
Creating an API Key
Generate a new API key for your account.
Step-by-Step
- Navigate to Settings → API Keys
- Click the Create API Key button (top-right)
- Enter a descriptive name for the key
- (Optional) Select a status (defaults to Active)
- Click Create
API Key Name Best Practices
Use descriptive names that indicate:
- Purpose: "Production Bot", "Staging Environment", "Development Testing"
- Application: "Mobile App Integration", "Zapier Workflow"
- Location: "AWS Lambda Function", "Heroku Backend"
Examples:
- ✅ "Production Mobile App v2"
- ✅ "Staging CI/CD Pipeline"
- ✅ "Development - Local Testing"
- ❌ "Key 1"
- ❌ "Test"
API Key Value - Critical Information
This is the ONLY time you'll see the actual API key value.
After Creating
The API key value appears in the success dialog immediately after creation.
What You See:
gsk_1234567890abcdef...Critical Actions:
- Copy the key immediately using the copy button
- Store it securely in your password manager or environment variables
- Do not close the dialog until you've copied the key
Security Warning
Once you close the creation dialog, the key value is hidden forever. You cannot retrieve it again.
If you lose the key:
- You must delete the old key
- Create a new key
- Update your applications with the new key
API Key Statuses
Each API key has a status that controls its behavior.
| Status | Behavior | Use Case |
|---|---|---|
| Active | ✅ Accepts API requests | Production use, active integrations |
| Inactive | ❌ Rejects API requests | Temporary disable without deleting |
| Revoked | ❌ Permanently disabled | Security incident, key compromised |
Status Transitions
Active → Inactive:
- Temporarily disable a key
- Can be reactivated later
Active/Inactive → Revoked:
- Permanent action (cannot be undone)
- Use when key is compromised
Managing API Keys
View and manage all your API keys in one place.
API Key List
Each key displays:
- Name: Descriptive name you provided
- Status Badge: Visual indicator (Active, Inactive, Revoked)
- Created Date: When the key was generated
- Last Modified: When status was last changed
Key Management Actions
Edit Key:
- Click the key card
- Click the Edit icon (pencil)
- Update the name or status
- Click Save
Delete Key:
- Click the key card
- Click the Delete icon (trash can)
- Confirm deletion in the modal
- Key is permanently removed
Warning: Deleting an API key is permanent and cannot be undone. Any applications using this key will immediately stop working.
Using API Keys
Authenticate your API requests with your API key.
Authentication Header
Include your API key in the X-API-Key header:
bash
curl -X GET "https://api.gnosari.com/api/v1/agents" \
-H "X-API-Key: YOUR_API_KEY"Environment Variables (Recommended)
Store API keys in environment variables, never in code.
Example (.env file):
bash
GNOSARI_API_KEY=gsk_1234567890abcdef...Example (Node.js):
javascript
const apiKey = process.env.GNOSARI_API_KEY
const response = await fetch('https://api.gnosari.com/api/v1/agents', {
headers: {
'X-API-Key': apiKey
}
})Example (Python):
python
import os
import requests
api_key = os.environ.get('GNOSARI_API_KEY')
response = requests.get(
'https://api.gnosari.com/api/v1/agents',
headers={'X-API-Key': api_key}
)Never Hardcode API Keys
❌ WRONG - Hardcoded in Code:
javascript
// DON'T DO THIS
const apiKey = 'gsk_1234567890abcdef...'✅ CORRECT - Environment Variable:
javascript
// DO THIS
const apiKey = process.env.GNOSARI_API_KEYSecurity Best Practices
Storage
Do:
- ✅ Store in environment variables
- ✅ Use secret management tools (AWS Secrets Manager, HashiCorp Vault)
- ✅ Keep in password managers for backup
Don't:
- ❌ Commit to git repositories
- ❌ Share via email or chat
- ❌ Hardcode in application code
- ❌ Expose in client-side JavaScript
Rotation
When to Rotate (Create New + Delete Old):
- Every 90 days (recommended)
- When team member with key access leaves
- After security incident
- If key may have been exposed
How to Rotate:
- Create a new API key
- Update your applications to use the new key
- Test that the new key works
- Delete the old key
Revocation
Revoke Immediately If:
- Key appears in public repository
- Key shared accidentally
- Suspicious API activity detected
- Team member with access leaves suddenly
API Key Limits
Maximum Keys per Account:
- Free plan: 5 API keys
- Professional plan: 25 API keys
- Enterprise plan: Unlimited API keys
Rate Limits: API requests are subject to your subscription plan limits. See Subscription Management for details.
Troubleshooting
"Invalid API Key" Error
Possible Causes:
- Key status is Inactive or Revoked
- Key was deleted
- Typo in the key value
- Wrong environment (using staging key in production)
Solutions:
- Check key status in Settings → API Keys
- Verify the entire key value was copied correctly
- Generate a new key if old one was deleted
"Rate Limit Exceeded" Error
Cause: You've exceeded your plan's API call limit.
Solutions:
- Wait until your billing period resets
- Upgrade to a higher plan
- Optimize your API usage
Key Not Working After Creation
Possible Causes:
- Key status set to Inactive
- Not using the correct authentication header
Solutions:
- Verify key status is Active
- Check you're using
X-API-Keyheader (notAuthorization) - Ensure no extra spaces or characters in key value
API Key Best Practices Summary
- Name keys descriptively - Know what each key is for
- Copy immediately - You only see the value once
- Store securely - Environment variables, not code
- Rotate regularly - Every 90 days minimum
- Delete unused keys - Reduce security surface area
- Use different keys per environment - Separate dev, staging, production
- Monitor usage - Watch for unexpected API activity
- Revoke on compromise - Act immediately if exposed
Next Steps
- View API Documentation for available endpoints
- Set up your first integration using your new API key
- Manage your subscription to increase API limits
Last updated: 2026-02-15