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
| Field | Type | Description |
|---|---|---|
id | string | Unique id of this object. |
type | string | The object type, always api_key. |
name | string | Name shown in the Console and in reports. |
kind | string | private (sk_live_), public (pk_live_) or syntic_code (sk_syntic_). |
prefix | string | First characters, to match a leaked or logged value. |
hint | string | Last characters. |
status | string | active, inactive, revoked or expired. |
workspace_id | string | The workspace it belongs to. |
created_by | object | Who created it. |
allowed_origins | array | Nested detail; see the endpoint pages below. |
allowed_ips | array | Nested detail; see the endpoint pages below. |
pinned_version | string | The syntic-version used when a request sends none. |
expires_at | string or null | When it is deleted automatically, or null. |
created_at | string | When it was created, RFC 3339 UTC (some older objects use Unix seconds). |
last_used_at | string | Last time it was used, or null. |
last_used_ip | string | See the endpoint pages below. |
use_count | integer | Requests made with the key, updated at most once a minute. |
Returned by
GET /v1/organizations/api_keysGET /v1/organizations/api_keys/{api_key_id}PATCH /v1/organizations/api_keys/{api_key_id}
Was this page helpful?