Add Workspace To Service Account
api/admin/service_accounts/workspaces/create
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/create Changed · +10 / -15 lines
# Add Workspace To Service Account ## Path parameters ## Headers ## Body parameters ## Returns ## Example ### Response (200) ## Add Workspace To Service Account ### Path Parameters ### Header Parameters ### Body Parameters ### Returns ### Example #### Response
---- -title: Add Workspace To Service Account -url: https://platform.claude.com/docs/en/api/admin/service_accounts/workspaces/create ---- +# Add Workspace To Service Account -## Add Workspace To Service Account +**POST** `/v1/organizations/service_accounts/{service_account_id}/workspaces` -**post** `/v1/organizations/service_accounts/{service_account_id}/workspaces` - Add a service account to a workspace with the given `workspace_role`. Mirror of `POST /workspaces/{workspace_id}/service_accounts`, addressed
rejected. Requires an OAuth bearer or Console session; Admin API keys are not accepted. -### Path Parameters +## Path parameters - `service_account_id: string` ID of the service account. -### 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. -### Body Parameters +## Body parameters - `workspace_id: string`
- `"workspace_user"` -### Returns +## Returns - `created_by_actor_id: string or null`
- `type: "service_account_workspace_member"` - - `"service_account_workspace_member"` + default: service_account_workspace_member - `workspace_id: string`
- `"workspace_user"` -### Example +## Example -```http +```bash curl https://api.anthropic.com/v1/organizations/service_accounts/$SERVICE_ACCOUNT_ID/workspaces \ -H 'Content-Type: application/json' \ -H 'anthropic-version: 2023-06-01' \
}' ``` -#### Response +### Response (200) ```json {