from line 1
1---
2title: Update Service Account
3url: https://platform.claude.com/docs/en/api/admin/service_accounts/update
4---
1# Update Service Account
52
6## Update Service Account
3**POST** `/v1/organizations/service_accounts/{service_account_id}`
74
8**post** `/v1/organizations/service_accounts/{service_account_id}`
9
105Update a service account.
116
127Only `description` and `organization_role` are mutable; `name` cannot be
from line 10
1510interactive credential (a user OAuth token or a Console session). Admin
1611API keys are not accepted.
1712
18### Path Parameters
13## Path parameters
1914
2015- `service_account_id: string`
2116
2217 ID of the service account to update.
2318
24### Header Parameters
19## Headers
2520
2621- `"anthropic-beta": optional array of string`
2722
from line 24
2924
3025 To use multiple betas, use a comma separated list like `beta1,beta2` or specify the header multiple times for each beta.
3126
32### Body Parameters
27## Body parameters
3328
3429- `description: optional string or null`
3530
3631 Replaces the description. Omit to leave unchanged; send `null` to clear (the field is stored as an empty string).
3732
33 maxLength: 2000
34
3835- `organization_role: optional "admin" or "developer" or null`
3936
4037 Replaces the org-level role. Omit or send `null` to leave unchanged.
from line 40
4340
4441 - `"developer"`
4542
46### Returns
43## Returns
4744
48- `ServiceAccount object { id, archived_at, archived_by_actor_id, 8 more }`
45- `ServiceAccount object`
4946
5047 Named non-human identity within the caller's organization.
5148
from line 57
6057
6158 If set, this service account is archived.
6259
60 format: date-time
61
6362 - `archived_by_actor_id: string or null`
6463
6564 Tagged ID (`user_`/`svac_`) of the actor that archived this service account.
from line 67
6867
6968 When this service account was created.
7069
70 format: date-time
71
7172 - `created_by_actor_id: string or null`
7273
7374 Tagged ID (`user_`/`svac_`) of the actor that created this service account.
from line 91
9091
9192 - `type: "service_account"`
9293
93 - `"service_account"`
94 default: service_account
9495
9596 - `updated_at: string`
9697
9798 When this service account was last updated.
9899
100 format: date-time
101
99102 - `updated_by_actor_id: string or null`
100103
101104 Tagged ID (`user_`/`svac_`) of the actor that last updated this service account.
102105
103### Example
106## Example
104107
105```http
108```bash
106109curl https://api.anthropic.com/v1/organizations/service_accounts/$SERVICE_ACCOUNT_ID \
107110 -H 'Content-Type: application/json' \
108111 -H 'anthropic-version: 2023-06-01' \
from line 113
110113 -d '{}'
111114```
112115
113#### Response
116### Response (200)
114117
115118```json
116119{
No line in this hunk matches that.