Archive Service Account
api/admin/service_accounts/archive
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/archive Changed · +16 / -15 lines
# Archive Service Account ## Path parameters ## Headers ## Returns ## Example ### Response (200) ## Archive Service Account ### Path Parameters ### Header Parameters ### Returns ### Example #### Response
---- -title: Archive Service Account -url: https://platform.claude.com/docs/en/api/admin/service_accounts/archive ---- +# Archive Service Account -## Archive Service Account +**POST** `/v1/organizations/service_accounts/{service_account_id}/archive` -**post** `/v1/organizations/service_accounts/{service_account_id}/archive` - Archive a service account. Idempotent; re-archiving returns the service account with its original
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 to archive. -### 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 -- `ServiceAccount object { id, archived_at, archived_by_actor_id, 8 more }` +- `ServiceAccount object` Named non-human identity within the caller's organization.
If set, this service account is archived. + format: date-time + - `archived_by_actor_id: string or null` Tagged ID (`user_`/`svac_`) of the actor that archived this service account.
When this service account was created. + format: date-time + - `created_by_actor_id: string or null` Tagged ID (`user_`/`svac_`) of the actor that created this service account.
- `type: "service_account"` - - `"service_account"` + default: service_account - `updated_at: string` When this service account was last updated. + format: date-time + - `updated_by_actor_id: string or null` Tagged ID (`user_`/`svac_`) of the actor that last updated this service account. -### Example +## Example -```http +```bash curl https://api.anthropic.com/v1/organizations/service_accounts/$SERVICE_ACCOUNT_ID/archive \ -X POST \ -H 'anthropic-version: 2023-06-01' \
-H "Authorization: Bearer $ANTHROPIC_OAUTH_TOKEN" ``` -#### Response +### Response (200) ```json {