---
title: "Rename a service account or change its role and scopes"
method: PATCH
path: "/teams/{teamId}/service-accounts/{serviceAccountId}"
tags: ["Service Accounts"]
---

# Rename a service account or change its role and scopes

`PATCH /teams/{teamId}/service-accounts/{serviceAccountId}`

## Request

- Base URL: `https://api.katla.app`
- URL: `https://api.katla.app/teams/{teamId}/service-accounts/{serviceAccountId}`
- Auth: HTTP bearer

## Path parameters

- `teamId` string, uuid, required
- `serviceAccountId` string, uuid, required

## Request body

- object
  - `name` string
  - `role` 'member' | 'admin'
  - `scopes` string[]

## Response `200`

Default Response

- object
  - `id` string, required
  - `name` string, required
  - `role` 'owner' | 'admin' | 'member', required
  - `scopes` string[], required
  - `createdByUserId` string, nullable, required
  - `revokedAt` string, nullable, required
  - `createdAt` string, required
  - `keys` object[], required
    - `id` string, required
    - `maskedKey` string, required
    - `expiresAt` string, nullable, required
    - `revokedAt` string, nullable, required
    - `lastUsedAt` string, nullable, required
    - `createdAt` string, required

## Other responses

- `403`: Default Response
- `404`: Default Response

---

[API](https://skmtc.dev/katla/apis/katla-api.md) · [All operations](https://skmtc.dev/katla/apis/katla-api/llms.txt) · [OpenAPI document](https://skmtc.dev/katla/apis/katla-api/revisions/6ed2d7f0b009?raw)
