---
title: "Update Service Account"
method: PATCH
path: "/api/identity/{team_key}/service-accounts/{account_key}"
tags: ["identity"]
---

# Update Service Account

`PATCH /api/identity/{team_key}/service-accounts/{account_key}`

## Request

- Base URL: `https://api.superit.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api.superit.ai/api/identity/{team_key}/service-accounts/{account_key}`
- Auth: HTTP bearer

Change which capabilities an account may use.

The remedy for an account created with the wrong scopes. Without it the
only fix is deleting the account and issuing a new credential, which turns
an admin's typo into a redeployment of the customer's automation.

## Path parameters

- `account_key` string, required
- `team_key` string, required

## Request body

- UpdateServiceAccountBody: Request body for changing what an existing account may call. Only the scopes. Role is deliberately not editable here: it decides what the principal can *see*, and changing it silently under a running automation is a different and larger decision than narrowing which endpoints it may reach.
  - `allowedScopes` string[]

## Response `200`

Successful Response

- ServiceAccountSummary: A service account as listed in team settings.
  - `key` string, required
  - `name` string, required
  - `role` string, required
  - `allowedScopes` string[], required
  - `createdAt` string, date-time, nullable
  - `revokedAt` string, date-time, nullable
  - `entraTenantId` string, nullable
  - `entraObjectId` string, nullable
  - `entraLastUsedAt` string, date-time, nullable
  - `connectableTenantId` string, nullable
  - `entraConsentUrl` string, nullable
  - `keys` ServiceAccountKeySummary[]
    - `key` string, required
    - `prefix` string, required
    - `createdAt` string, date-time, nullable
    - `expiresAt` string, date-time, nullable
    - `lastUsedAt` string, date-time, nullable
    - `revokedAt` string, date-time, nullable

## Other responses

- `400`: Invalid input
- `401`: Not authenticated
- `403`: Forbidden
- `404`: Not found
- `405`: Method not allowed
- `409`: Conflict
- `422`: Validation Error

---

[API](https://skmtc.dev/superit/apis/super-it-api.md) - [All operations](https://skmtc.dev/superit/apis/super-it-api/llms.txt) - [OpenAPI document](https://skmtc.dev/superit/apis/super-it-api/revisions/4944d556c2bb?raw)
