Skip to main content
Use the Management API Keys endpoints to create, list, inspect, update, and delete keys for your team.

Authentication

Authenticate with a standard AI Stats API key:
Authorization: Bearer aistats_v1_sk_<kid>_<secret>
Base URL:
https://api.phaseo.app/v1

Endpoints

  • GET /management/keys
  • POST /management/keys
  • GET /management/keys/{id}
  • PATCH /management/keys/{id}
  • DELETE /management/keys/{id}

Create a key

curl -X POST https://api.phaseo.app/v1/management/keys \
  -H "Authorization: Bearer $AI_STATS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "CI pipeline key",
    "scopes": ["read","write"],
    "status": "active"
  }'
Example response:
{
  "ok": true,
  "key": {
    "id": "pk_...",
    "name": "CI pipeline key",
    "prefix": "abc123",
    "status": "active",
    "scopes": "[\"read\",\"write\"]",
    "created_at": "2026-02-18T00:00:00.000Z",
    "key": "aistats_v1_sk_<kid>_<secret>"
  }
}

List keys

curl "https://api.phaseo.app/v1/management/keys?limit=50&offset=0" \
  -H "Authorization: Bearer $AI_STATS_API_KEY"
Optional query params:
  • team_id
  • limit (max 250)
  • offset

Get one key

curl https://api.phaseo.app/v1/management/keys/<key-id> \
  -H "Authorization: Bearer $AI_STATS_API_KEY"

Update a key

curl -X PATCH https://api.phaseo.app/v1/management/keys/<key-id> \
  -H "Authorization: Bearer $AI_STATS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated key name",
    "status": "disabled",
    "soft_blocked": true
  }'
Allowed status values:
  • active
  • disabled
  • revoked

Delete a key

curl -X DELETE https://api.phaseo.app/v1/management/keys/<key-id> \
  -H "Authorization: Bearer $AI_STATS_API_KEY"

Notes

  • scopes can be sent as a string or a string array.
  • team_id is optional for standard team-scoped requests.
  • For strict request/response schemas, use the API reference pages under API Reference -> Control and Management -> Management API Keys.
Last modified on March 11, 2026