---
title: "Update service account"
method: PATCH
path: "/service-accounts/{idOrName}"
---

# Update service account

`PATCH /service-accounts/{idOrName}`

Update one or more fields on an existing service account. Team admin only.

## Path parameters

- `idOrName` string, required — The ID or name of the service account to update.

## Request body

- UpdateServiceAccountParams
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `metadata` string — Replacement JSON metadata for the service account.
  - `name` string — The new human-readable name for the service account.
  - `role` 'admin' | 'developer' — The new team role this service account acts as.

## Response `200`

OK

- UpdateServiceAccountResponse
  - `$schema` string, uri — A URL to the JSON Schema for this object.
  - `service_account` ServiceAccount, required
    - `created_at` string, date-time, required — When the service account was created.
    - `creator` ServiceAccountCreator
      - `name` string, required — The creator's name: a user's full name (or email) or a service account's name.
      - `type` 'user' | 'service_account', required — The kind of principal that created the service account. Always 'user'.
    - `id` string, required — The unique identifier for the service account.
    - `metadata` unknown
    - `name` string, required — The human-readable name of the service account.
    - `role` 'admin' | 'developer', required — The team role this service account acts as.
    - `updated_at` string, date-time, required — When the service account was last updated.

## Other responses

- `default` — Error

---

[API](https://skmtc.net/tower/apis/tower-api.md) · [All operations](https://skmtc.net/tower/apis/tower-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/tower/tower-api/revisions/0e42b0fb26d9/schema)
