Follow Discord
Sweep 22 Oct 2026 · 21:04Z Build v2.1.309 528 read Stable v2.1.308 Latest v2.1.309 Next v2.1.309 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One change · api

Retrieve API Key (Admin API) changedapi/admin/api_keys/retrieve

Nearest release: v2.1.250, published an hour before this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.

Recorded here
Lines+58added
Lines−12removed
From line 34 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits5to this page, all time

The whole hunk

from line 34, old and new numbered
/
lines
from line 34
3434 
3535 ID of the actor that created the object.
3636 
37 - `type: string`
37 - `type: "service_account" or "user"`
3838 
3939 Type of the actor that created the object.
4040 
41 - `"service_account"`
42 
43 - `"user"`
44 
4145 - `expires_at: string or null`
4246 
4347 RFC 3339 datetime string indicating when the API Key expires, or `null` if it never expires.
from line 56
5256 
5357 Partially redacted hint for the API key.
5458 
55 - `principal: object or null`
59 - `principal: object or object or null`
5660 
57 The ID and type of the principal the API key acts as, or `null` if the key is not bound to a principal.
61 The principal the API key acts as (a User or a Service Account), or `null` if the API key is not bound to a principal.
5862 
59 - `id: string`
63 - `UserActor object`
6064 
61 ID of the principal the API key acts as: a User ID (`user_...`) when the type is `user`, or a Service Account ID (`svac_...`) when the type is `service_account`.
65 - `type: "user_actor"`
6266 
63 - `type: "service_account" or "user"`
67 Principal type. Always `"user_actor"` for a User.
6468 
65 Type of the principal the API key acts as.
69 default: user_actor
6670 
67 - `"service_account"`
71 - `user_id: string`
6872 
69 - `"user"`
73 ID of the User the API key acts as.
7074 
75 - `ServiceAccountActor object`
76 
77 - `service_account_id: string`
78 
79 ID of the Service Account the API key acts as.
80 
81 - `type: "service_account_actor"`
82 
83 Principal type. Always `"service_account_actor"` for a Service Account.
84 
85 default: service_account_actor
86 
87 - `scope: object or object`
88 
89 Where the API key belongs: its Workspace (`{"type": "workspace", "workspace_id": "wrkspc_..."}`, with the Workspace's real ID even when it is the organization's default Workspace), or the organization (`{"type": "organization"}`) for a principal-bound API key that has no Workspace.
90 
91 - `Organization object`
92 
93 - `type: "organization"`
94 
95 Scope type. Always `"organization"`: the API key has no Workspace. Only a principal-bound API key can have this scope.
96 
97 default: organization
98 
99 - `Workspace object`
100 
101 - `type: "workspace"`
102 
103 Scope type. Always `"workspace"`: the API key belongs to one Workspace.
104 
105 default: workspace
106 
107 - `workspace_id: string`
108 
109 ID of the Workspace the API key belongs to. Unlike the deprecated top-level `workspace_id`, this is the Workspace's real ID even for the organization's default Workspace.
110 
71111 - `status: "active" or "archived" or "expired" or "inactive"`
72112 
73113 Status of the API key.
from line 130
90130 
91131 - `workspace_id: string or null`
92132 
93 ID of the Workspace associated with the API key, or `null` if the API key belongs to the default Workspace.
133 **Deprecated**: Use `scope` instead. `workspace_id` is `null` both for an API key in the default Workspace and for a principal-bound API key that has no Workspace.
94134 
135 Deprecated: use `scope` instead. ID of the Workspace associated with the API key, or `null` if the API key belongs to the default Workspace. Also `null` for a principal-bound API key that has no Workspace; `scope` tells the two apart.
136 
95137## Example
96138 
97139```bash
from line 156
114156 "name": "Developer Key",
115157 "partial_key_hint": "sk-ant-api03-R2D...igAA",
116158 "principal": {
117 "id": "user_01WCz1FkmYMm4gnmykNKUu3Q",
118 "type": "user"
159 "type": "user_actor",
160 "user_id": "user_01WCz1FkmYMm4gnmykNKUu3Q"
161 },
162 "scope": {
163 "type": "workspace",
164 "workspace_id": "wrkspc_01JwQvzr7rXLA5AGx3HKfFUJ"
119165 },
120166 "status": "active",
121167 "type": "api_key",
Feedback