Archive Service Account

Changed on

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.

Archive a service account.

Idempotent; re-archiving returns the service account with its original archived_at. Rejected with 400 if any live (non-archived) federation rule still targets this service account, same as issuer archival; archive those rules first or change their target to another service account.

post/v1/organizations/service_accounts/{service_account_id}/archive

Request

  • Base URL
    https://api.anthropic.com
  • Auth
    none declared

Path parameters

service_account_idstring required

ID of the service account to archive.

Headers

anthropic-versionstring

The version of the Claude API you want to use.

Read more about versioning and our version history here.

Response

Successful Response

archived_atstring date-time nullable required

If set, this service account is archived.

archived_by_actor_idstring nullable required

Tagged ID (user_/svac_) of the actor that archived this service account.

created_atstring date-time required

When this service account was created.

created_by_actor_idstring nullable required

Tagged ID (user_/svac_) of the actor that created this service account.

descriptionstring nullable required

Optional free-text description.

idstring required

Tagged ID of the service account.

namestring required

Admin-chosen slug identifier.

organization_role'admin' | 'developer' required

Org-level role. A federation rule may only be created or retargeted to grant org:admin scope when this is admin. A rule granting org:admin whose target is later demoted to developer is rejected at token exchange. Rules granting org:admin are managed in the Console.

type'service_account' required
updated_atstring date-time required

When this service account was last updated.

updated_by_actor_idstring nullable required

Tagged ID (user_/svac_) of the actor that last updated this service account.

Example response

{
  "created_at": "2024-10-30T23:58:27.427722Z",
  "id": "svac_01SDCCSbTxrXDpWc1phhtcfK",
  "name": "ci-deploy-bot",
  "updated_at": "2024-10-30T23:58:27.427722Z"
}

Changes