The whole hunk
from line 2, old and new numbered
/
lines
from line 2
22
33**POST** `/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}`
44
5**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).
6
57Change a service account's role in a workspace.
68
79The new `workspace_role` replaces the current one. Only explicit
from line 11
911default-workspace membership, add the service account explicitly with
1012`POST /workspaces/{workspace_id}/service_accounts`. Archived workspaces
1113return 400. Archived service accounts cannot be updated and are
12rejected. Requires an OAuth bearer or Console session; Admin API keys
13are not accepted.
14rejected.
1415
1516## Path parameters
1617
from line 87
8687curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/service_accounts/$SERVICE_ACCOUNT_ID \
8788 -H 'Content-Type: application/json' \
8889 -H 'anthropic-version: 2023-06-01' \
89 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" \
90 -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN" \
9091 -d '{
9192 "workspace_role": "workspace_admin"
9293 }'