Sweep 22 Sep 2026 · 17:19Z Build v2.1.280 501 read Stable v2.1.267 Latest v2.1.280 Next v2.1.280 Feeds RSS JSON llms.txt Unofficial
One change · api

Service Accounts changed

api/admin/workspaces/service_accounts

Nearest release: v2.1.261, published 3 hours 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+18added
Lines−11removed
From line 4 where the diff opens
First seen 14 Aug 2026 this site's first read of the page
Recorded edits6to this page, all time

The whole hunk

from line 4, old and new numbered
/
lines
from line 4
44 
55**POST** `/v1/organizations/workspaces/{workspace_id}/service_accounts`
66 
7**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
8 
79Add a service account to a workspace with the given `workspace_role`.
810 
911The role determines what the service account can do in the workspace and
from line 15
1315assigns a chosen role. If the service account is already an explicit
1416member of the workspace, its `workspace_role` is replaced with the
1517value supplied here. Archived workspaces return 400. Archived service
16accounts cannot be added and are rejected. Requires an OAuth bearer or
17Console session; Admin API keys are not accepted.
18accounts cannot be added and are rejected.
1819 
1920### Path parameters
2021 
from line 91
9091curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/service_accounts \
9192 -H 'Content-Type: application/json' \
9293 -H 'anthropic-version: 2023-06-01' \
93 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" \
94 -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN" \
9495 -d '{
9596 "service_account_id": "service_account_id",
9697 "workspace_role": "workspace_admin"
from line 115
114115 
115116**GET** `/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}`
116117 
118**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
119 
117120Retrieve a service account's membership in a workspace.
118121 
119122Returns the membership record, including the service account's
from line 185
182185```bash
183186curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/service_accounts/$SERVICE_ACCOUNT_ID \
184187 -H 'anthropic-version: 2023-06-01' \
185 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
188 -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN"
186189```
187190 
188191#### Response (200)
from line 205
202205 
203206**GET** `/v1/organizations/workspaces/{workspace_id}/service_accounts`
204207 
208**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
209 
205210List the service accounts that are members of a workspace.
206211 
207212Each entry includes the service account's `workspace_role`. Use `limit`
from line 289
284289```bash
285290curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/service_accounts \
286291 -H 'anthropic-version: 2023-06-01' \
287 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
292 -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN"
288293```
289294 
290295#### Response (200)
from line 314
309314 
310315**POST** `/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}`
311316 
317**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
318 
312319Change a service account's role in a workspace.
313320 
314321The new `workspace_role` replaces the current one. Only explicit
from line 323
316323default-workspace membership, add the service account explicitly with
317324`POST /workspaces/{workspace_id}/service_accounts`. Archived workspaces
318325return 400. Archived service accounts cannot be updated and are
319rejected. Requires an OAuth bearer or Console session; Admin API keys
320are not accepted.
326rejected.
321327 
322328### Path parameters
323329 
from line 399
393399curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/service_accounts/$SERVICE_ACCOUNT_ID \
394400 -H 'Content-Type: application/json' \
395401 -H 'anthropic-version: 2023-06-01' \
396 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" \
402 -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN" \
397403 -d '{
398404 "workspace_role": "workspace_admin"
399405 }'
from line 422
416422 
417423**DELETE** `/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}`
418424 
425**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
426 
419427Remove a service account from a workspace.
420428 
421429Removal is idempotent (returns 200 even if the membership was already
from line 430
422430removed). A DELETE against the implicit default-workspace membership
423431returns 200 but is a no-op and the membership persists; deleting an
424432explicit default-workspace row reverts to the implicit `workspace_user`
425membership. Archived workspaces return 400. Requires an OAuth bearer or
426Console session; Admin API keys are not accepted.
433membership. Archived workspaces return 400.
427434 
428435### Path parameters
429436 
from line 470
463470curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/service_accounts/$SERVICE_ACCOUNT_ID \
464471 -X DELETE \
465472 -H 'anthropic-version: 2023-06-01' \
466 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
473 -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN"
467474```
468475 
469476#### Response (200)