Update 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.

Update a service account.

Only description and organization_role are mutable; name cannot be changed. Archived service accounts cannot be updated; this returns 400. Setting organization_role to admin (even when unchanged) requires an interactive credential (a user OAuth token or a Console session).

post/v1/organizations/service_accounts/{service_account_id}

Request

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

Path parameters

service_account_idstring required

ID of the service account to update.

Headers

anthropic-versionstring

The version of the Claude API you want to use.

Read more about versioning and our version history here.

Request body

descriptionstring nullable

Replaces the description. Omit to leave unchanged; send null to clear (the field is stored as an empty string).

organization_role'admin' | 'developer' nullable

Replaces the org-level role. Omit or send null to leave unchanged.

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