Documentation Index
Fetch the complete documentation index at: https://docs.meshai.dev/llms.txt
Use this file to discover all available pages before exploring further.
API Keys
MeshAI uses Bearer token authentication. All API keys start with msh_.
curl https://api.meshai.dev/agents \
-H "Authorization: Bearer msh_YOUR_API_KEY"
Key Types
| Type | Prefix | Permissions |
|---|
| Admin | msh_ | Full access — manage agents, policies, billing, users |
| Proxy | msh_ | Forward LLM requests through the proxy; read-only agent data |
| Read-only | msh_ | Read agents, cost, anomalies; no write operations |
Scopes
API keys are scoped to limit permissions:
| Scope | Allows |
|---|
registry:read | List and get agents, teams |
registry:write | Register, update, delete agents and teams |
telemetry:write | Send heartbeats and usage data |
monitoring:read | Query monitoring overview |
cost:read | Query cost endpoints |
anomaly:read | List and get anomalies |
anomaly:write | Acknowledge, resolve anomalies |
governance:read | List policies, approvals, audit events |
governance:write | Create policies, decide approvals, classify risk |
proxy:forward | Forward LLM requests through the proxy |
admin | Full access — manage keys, agents, policies, billing |
platform:admin | Tenant management (platform admins only) |
Scope Restrictions
When creating a new API key, the scopes you can grant depend on your own key’s permissions:
| Your scope | Can grant |
|---|
platform:admin | Any scope |
admin | All scopes except platform:admin |
| Other | Only scopes you already have |
Attempting to grant a scope you don’t have returns 403 Forbidden.
Get Current Key Info
Returns the scopes and identity of the API key making the request. Useful for determining which scopes are available when creating new keys.
curl https://api.meshai.dev/auth/me \
-H "Authorization: Bearer msh_YOUR_API_KEY"
{
"success": true,
"data": {
"key_id": "01JABC123DEF456",
"tenant_id": "01JXYZ789GHI012",
"scopes": ["admin"]
}
}
Create an API Key
Via Dashboard
Go to app.meshai.dev/settings/api-keys and click “Create API Key”. Select the scopes you need.
Via API
curl -X POST https://api.meshai.dev/auth/api-keys \
-H "Authorization: Bearer msh_YOUR_ADMIN_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "ci-pipeline-key",
"scopes": ["registry:read", "registry:write", "telemetry:write"],
"expires_in_days": 90
}'
{
"success": true,
"data": {
"id": "01JABC123DEF456",
"raw_key": "msh_abc123def456...",
"key_prefix": "msh_abc1",
"name": "ci-pipeline-key",
"scopes": ["registry:read", "registry:write", "telemetry:write"],
"expires_at": "2026-06-15T10:00:00Z",
"created_at": "2026-03-17T10:00:00Z"
}
}
The API key is shown once at creation time. Store it securely — you cannot retrieve it later.
Signup
Create a new MeshAI account:
curl -X POST https://api.meshai.dev/auth/signup \
-H "Content-Type: application/json" \
-d '{
"email": "user@company.com",
"password": "secure-password",
"company_name": "Acme Corp"
}'
{
"success": true,
"data": {
"tenant_id": "tnt_abc123",
"user_id": "usr_def456",
"api_key": "msh_live_abc123def456",
"message": "Account created. Check your email to verify."
}
}
Login
Get a session token for dashboard access or exchange for an API key:
curl -X POST https://api.meshai.dev/auth/login \
-H "Content-Type: application/json" \
-d '{
"email": "user@company.com",
"password": "secure-password"
}'
{
"success": true,
"data": {
"access_token": "eyJhbGciOi...",
"token_type": "bearer",
"expires_in": 3600,
"tenant_id": "tnt_abc123"
}
}
Key Rotation
Rotate keys without downtime by creating a new key before deleting the old one:
Create a new key
Create a new API key with the same scopes.
Update your agents
Deploy the new key to all agents and services.
Delete the old key
Once all agents are using the new key, delete the old one:curl -X DELETE https://api.meshai.dev/auth/api-keys/key_old123 \
-H "Authorization: Bearer msh_YOUR_ADMIN_KEY"