Remove Workspace From Service Account
api/admin/service_accounts/workspaces/delete
Nearest release: v2.1.245, published an hour after this site recorded the change. Shown because the two are within 24 hours of each other. Nothing here says the release caused the edit.
api/admin/service_accounts/workspaces/delete Changed · +9 / -14 lines
# Remove Workspace From Service Account ## Path parameters ## Headers ## Returns ## Example ### Response (200) ## Remove Workspace From Service Account ### Path Parameters ### Header Parameters ### Returns ### Example #### Response
---- -title: Remove Workspace From Service Account -url: https://platform.claude.com/docs/en/api/admin/service_accounts/workspaces/delete ---- +# Remove Workspace From Service Account -## Remove Workspace From Service Account +**DELETE** `/v1/organizations/service_accounts/{service_account_id}/workspaces/{workspace_id}` -**delete** `/v1/organizations/service_accounts/{service_account_id}/workspaces/{workspace_id}` - Remove a service account from a workspace. Mirror of `DELETE /workspaces/{workspace_id}/service_accounts/{service_account_id}`,
400. Requires an OAuth bearer or Console session; Admin API keys are not accepted. -### Path Parameters +## Path parameters - `service_account_id: string`
ID of the workspace. -### Header Parameters +## Headers - `"anthropic-beta": optional array of string`
To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta. -### Returns +## Returns - `service_account_id: string`
- `type: "service_account_workspace_member_deleted"` - - `"service_account_workspace_member_deleted"` + default: service_account_workspace_member_deleted - `workspace_id: string` Tagged workspace ID (`wrkspc_...`) named in the delete request. -### Example +## Example -```http +```bash curl https://api.anthropic.com/v1/organizations/service_accounts/$SERVICE_ACCOUNT_ID/workspaces/$WORKSPACE_ID \ -X DELETE \ -H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" ``` -#### Response +### Response (200) ```json {