The api key object

⚠️
Preview — this feature is being built; the design below is the spec.

The api_key object as the API returns it. Every field below appears in every response that returns this object; fields with no value are null rather than missing.

Example

{
  "id": "apikey_01JB7C9E1G3J5L7N9Q1S",
  "type": "api_key",
  "name": "billing-worker-prod",
  "kind": "private",
  "prefix": "sk_live_3f9c",
  "hint": "…a71e",
  "status": "active",
  "workspace_id": "wrkspc_01JC0A2C4E6G8J0L2N4Q",
  "created_by": {
    "id": "user_01J9Y0A2C4E6G8J0L2N4",
    "email": "dana@example.com",
    "status": "active"
  },
  "allowed_origins": [],
  "allowed_ips": [
    "203.0.113.0/24"
  ],
  "pinned_version": "2026-11-01",
  "expires_at": null,
  "created_at": "2026-03-02T09:30:00Z",
  "last_used_at": "2026-11-05T10:02:11Z",
  "last_used_ip": "203.0.113.40",
  "use_count": 1841220
}

Fields

FieldTypeDescription
idstringUnique id of this object.
typestringThe object type, always api_key.
namestringName shown in the Console and in reports.
kindstringprivate (sk_live_), public (pk_live_) or syntic_code (sk_syntic_).
prefixstringFirst characters, to match a leaked or logged value.
hintstringLast characters.
statusstringactive, inactive, revoked or expired.
workspace_idstringThe workspace it belongs to.
created_byobjectWho created it.
allowed_originsarrayNested detail; see the endpoint pages below.
allowed_ipsarrayNested detail; see the endpoint pages below.
pinned_versionstringThe syntic-version used when a request sends none.
expires_atstring or nullWhen it is deleted automatically, or null.
created_atstringWhen it was created, RFC 3339 UTC (some older objects use Unix seconds).
last_used_atstringLast time it was used, or null.
last_used_ipstringSee the endpoint pages below.
use_countintegerRequests made with the key, updated at most once a minute.

Returned by

Was this page helpful?