The whole hunk
from line 2, old and new numbered
/
lines
from line 2
22
33**DELETE** `/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
57Remove a service account from a workspace.
68
79Removal is idempotent (returns 200 even if the membership was already
from line 10
810removed). A DELETE against the implicit default-workspace membership
911returns 200 but is a no-op and the membership persists; deleting an
1012explicit default-workspace row reverts to the implicit `workspace_user`
11membership. Archived workspaces return 400. Requires an OAuth bearer or
12Console session; Admin API keys are not accepted.
13membership. Archived workspaces return 400.
1314
1415## Path parameters
1516
from line 50
4950curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/service_accounts/$SERVICE_ACCOUNT_ID \
5051 -X DELETE \
5152 -H 'anthropic-version: 2023-06-01' \
52 -H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN"
53 -H "Authorization: Bearer $ANTHROPIC_AUTH_TOKEN"
5354```
5455
5556### Response (200)