Keep reporting keys read-only
Dashboards and ETL jobs usually need `team:read`, `members:read`, `apikeys:read`, `usage:read`, and `pricing:read`, not write scopes.
Team Management API keys are automation credentials for team owners. They are separate from model API keys and can only call management endpoints allowed by their scopes.
Only a team owner can create, rotate, or revoke Team Management API keys from the dashboard.
In the dashboard sidebar, open Team, then Manage API. Use Create key to name the key and choose the scopes needed by your automation.
The management key secret is shown only once. Store it in your secret manager or deployment environment, not in source control.
If a key may have been exposed, rotate or revoke it immediately. Rotation invalidates the old secret and shows a new one-time secret.
Send the manager key as a bearer token or with the dedicated management-key header.
Management keys use the `mk-lcx-` prefix and are not model-call keys. Do not send them to `/v1/chat/completions` or any model gateway endpoint.
Use HTTPS in production. Treat a management key like an administrative credential because it can expose team usage, member, and key metadata depending on its scopes.
Team Management API responses intentionally omit provider metadata. API-key responses include `supported_model_ids` so automation can derive model access without learning provider routing.
Grant the smallest scope set your automation needs.
| Scope | Allows |
|---|---|
| team:read | Read the current team profile, credits, status, and discount plan. |
| members:read | List team members and member-level spend/limit metadata. |
| apikeys:read | List team-billed API keys with masked key values, limits, and `supported_model_ids`. |
| apikeys:limits:write | Update QPM and daily spend limits for team-billed API keys. |
| usage:read | Read team usage summaries and per-request usage logs. |
| pricing:read | Read current team model pricing after the team's discount plan is applied. |
All endpoints are scoped to the team that owns the management key.
| Method | Path | Required scope | Purpose |
|---|---|---|---|
| GET | /v1/team-management/team | team:read | Read team credits, status, plan, and spend summary. |
| GET | /v1/team-management/members | members:read | List active team members and spend-limit fields. |
| GET | /v1/team-management/apikeys | apikeys:read | List team-billed API keys. Each item includes `supported_model_ids`. Supports `status`, `member_id`, `user_id`, and `team_group_id` filters. |
| PATCH | /v1/team-management/apikeys/{keyId}/limits | apikeys:limits:write | Update `qpm_limit` and/or `daily_spend_limit` for a team-billed key. The response includes the updated key metadata and `supported_model_ids`. |
| GET | /v1/team-management/usage | usage:read | Read UTC usage totals, zero-filled time series, model breakdowns, member ranking, and optional member time series. |
| GET | /v1/team-management/usage/logs | usage:read | Read paginated request-level usage logs in UTC. Supports time, model, and user filters. |
| GET | /v1/team-management/pricing | pricing:read | Read current UTC team pricing. During an active window, both base and discount-plan effective prices include the multiplier; `time_pricing_multiplier_percent`, `time_pricing_start_utc`, and `time_pricing_end_utc` identify it. |
These examples use an environment variable so the secret is not written into shell history more than necessary.
export TEAM_MANAGER_KEY="mk-lcx-..."
curl https://lingcorex.ai/v1/team-management/members \
-H "Authorization: Bearer $TEAM_MANAGER_KEY"curl "https://lingcorex.ai/v1/team-management/apikeys?status=active" \
-H "Authorization: Bearer $TEAM_MANAGER_KEY"
# Response items include:
# id, user_id, user_email, masked_key,
# qpm_limit, daily_spend_limit, allowed_groups,
# supported_model_ids, team_group_id, created_at.
# Provider fields are not returned.curl "https://lingcorex.ai/v1/team-management/usage?bucket=day&group_by=member&start_time=2026-06-01T00:00:00Z&end_time=2026-06-17T00:00:00Z" \
-H "Authorization: Bearer $TEAM_MANAGER_KEY"curl -X PATCH https://lingcorex.ai/v1/team-management/apikeys/14/limits \
-H "Authorization: Bearer $TEAM_MANAGER_KEY" \
-H "Content-Type: application/json" \
-d '{"qpm_limit":60,"daily_spend_limit":"1000.000000"}'The usage endpoint supports whole-team dashboards, member drill-downs, and request-level investigation.
curl "https://lingcorex.ai/v1/team-management/usage?bucket=day&start_time=2026-06-01T00:00:00Z&end_time=2026-06-17T00:00:00Z" \
-H "Authorization: Bearer $TEAM_MANAGER_KEY"
# Response highlights:
# - time_series: one point per day for the whole team
# - models: model-level cost and token breakdown for the window
# - members: member ranking for the whole window
# - total_tokens / total_cost: whole-team totalscurl "https://lingcorex.ai/v1/team-management/usage?bucket=hour&start_time=2026-06-16T00:00:00Z&end_time=2026-06-17T00:00:00Z" \
-H "Authorization: Bearer $TEAM_MANAGER_KEY"
# Use this when investigating a sudden spike.
# The response keeps the same shape as the daily dashboard,
# but time_series buckets look like "2026-06-16 14:00:00".curl "https://lingcorex.ai/v1/team-management/usage?bucket=day&group_by=member&start_time=2026-06-01T00:00:00Z&end_time=2026-06-17T00:00:00Z" \
-H "Authorization: Bearer $TEAM_MANAGER_KEY"
# Adds member_time_series:
# [
# {
# "bucket": "2026-06-10",
# "member_id": 1,
# "user_email": "[email protected]",
# "request_count": 12,
# "total_tokens": 42000,
# "total_cost": "18.520000"
# }
# ]curl "https://lingcorex.ai/v1/team-management/usage?bucket=day&group_by=member&member_id=1&start_time=2026-06-01T00:00:00Z&end_time=2026-06-17T00:00:00Z" \
-H "Authorization: Bearer $TEAM_MANAGER_KEY"
# member_id is the team member id returned by:
# GET /v1/team-management/members
#
# The filter narrows time_series, models, members,
# member_time_series, and total_* fields to that member.curl "https://lingcorex.ai/v1/team-management/usage/logs?page=1&limit=20&start_time=2026-06-01T00:00:00Z&end_time=2026-06-17T00:00:00Z" \
-H "Authorization: Bearer $TEAM_MANAGER_KEY"
# Use logs for request-level records:
# request_id, user_id, user_email, model,
# prompt_tokens, completion_tokens, total_cost, status, created_at.curl "https://lingcorex.ai/v1/team-management/usage/logs?model=gpt-5.3-codex&user_id=2&page=1&limit=50&start_time=2026-06-01T00:00:00Z&end_time=2026-06-17T00:00:00Z" \
-H "Authorization: Bearer $TEAM_MANAGER_KEY"
# user_id is the account user id, not the team member id.
# Use this form when you already know the member's user_id
# from /members or from a previous usage response.A management key should be easier to rotate than to debug after a leak.
Dashboards and ETL jobs usually need `team:read`, `members:read`, `apikeys:read`, `usage:read`, and `pricing:read`, not write scopes.
Use one key for reporting and a different, tightly controlled key for limit-changing workflows.
Management keys should be used from backend services, cron jobs, or trusted automation, not from public client-side code.