The whole hunk
from line 2, old and new numbered
/
lines
from line 2
22
33**POST** `/v1/organizations/workspaces/{workspace_id}/service_accounts`
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
57Add a service account to a workspace with the given `workspace_role`.
68
79The role determines what the service account can do in the workspace and
from line 13
1113assigns a chosen role. If the service account is already an explicit
1214member of the workspace, its `workspace_role` is replaced with the
1315value supplied here. Archived workspaces return 400. Archived service
14accounts cannot be added and are rejected. Requires an OAuth bearer or
15Console session; Admin API keys are not accepted.
16accounts cannot be added and are rejected.
1617
1718## Path parameters
1819
from line 89
8889curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/service_accounts \
8990 -H 'Content-Type: application/json' \
9091 -H 'anthropic-version: 2023-06-01' \
91 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" \
92 -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN" \
9293 -d '{
9394 "service_account_id": "service_account_id",
9495 "workspace_role": "workspace_admin"