Authentication
Learn how to authenticate your API requests to AI Teammate.
Overview
AI Teammate uses API keys to authenticate requests. You can create and manage API keys from the Integrations page.
⚠️ Keep your API keys secure. Never expose them in client-side code or public repositories.
Getting an API Key
- Go to Settings → Integrations
- Click "Create API Key"
- Give your key a descriptive name (e.g., "Production", "Development")
- Copy the key immediately — you won't be able to see it again
API Key Types
API keys have different scopes that control which resources they can access.
| Type | Created From | Allowed | Blocked |
|---|---|---|---|
Global | Settings page | All operations | None |
Agent-scoped | Agent settings | Chat, history, memories for that agent | Other agents, teams, credits, settings, create/update/delete |
Team-scoped | Team settings | Chat, history for that team | Other teams, agents, credits, settings, create/update/delete |
Scoped keys are ideal for embedding agents in external apps — they limit access to only the resources your app needs.
Using Your API Key
Include your API key in the Authorization header:
HTTP Header
Authorization: Bearer YOUR_API_KEYExample Request
cURL
curl -X GET "https://ai-teammate.net/api/agents" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json"JavaScript (fetch)
const response = await fetch('https://ai-teammate.net/api/agents', {
headers: {
'Authorization': 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
});
const agents = await response.json();Error Responses
| Status Code | Description |
|---|---|
401 | Missing or invalid API key |
403 | API key doesn't have permission for this resource |
429 | Rate limit exceeded |