---
title: "PUT /api/v1/projects/{project_id}/serviceaccounts/{serviceaccount_id}"
method: PUT
path: "/api/v1/projects/{project_id}/serviceaccounts/{serviceaccount_id}"
tags: ["serviceaccounts"]
---

# PUT /api/v1/projects/{project_id}/serviceaccounts/{serviceaccount_id}

`PUT /api/v1/projects/{project_id}/serviceaccounts/{serviceaccount_id}`

## Request

- The document declares no server URL.
- Auth: API key in header `Authorization`
- TypeScript: <https://skmtc.dev/kubermatic/apis/kubermatic-kubernetes-platform-api/docs/api/v1/projects/:project_id/serviceaccounts/:serviceaccount_id/put.ts> (a function with typed inputs; its response is checked against the schema)

Updates service account for the given project

## Path parameters

- `project_id` string, required
- `serviceaccount_id` string, required

## Request body

- ServiceAccount: ServiceAccount represent an API service account
  - `annotations` object: Annotations that can be added to the resource
  - `creationTimestamp` string, date-time: CreationTimestamp is a timestamp representing the server time when this object was created.
  - `deletionTimestamp` string, date-time: DeletionTimestamp is a timestamp representing the server time when this object was deleted.
  - `group` string: Group that a service account belongs to
  - `id` string: ID unique value that identifies the resource generated by the server. Read-Only.
  - `name` string: Name represents human readable name for the resource
  - `status` string: Status describes three stages of ServiceAccount life including Active, Inactive and Terminating

## Response `200`

ServiceAccount

- ServiceAccount: ServiceAccount represent an API service account
  - `annotations` object: Annotations that can be added to the resource
  - `creationTimestamp` string, date-time: CreationTimestamp is a timestamp representing the server time when this object was created.
  - `deletionTimestamp` string, date-time: DeletionTimestamp is a timestamp representing the server time when this object was deleted.
  - `group` string: Group that a service account belongs to
  - `id` string: ID unique value that identifies the resource generated by the server. Read-Only.
  - `name` string: Name represents human readable name for the resource
  - `status` string: Status describes three stages of ServiceAccount life including Active, Inactive and Terminating

## Other responses

- `401`: EmptyResponse is a empty response
- `403`: EmptyResponse is a empty response
- `default`: errorResponse

---

[API](https://skmtc.dev/kubermatic/apis/kubermatic-kubernetes-platform-api.md) - [All operations](https://skmtc.dev/kubermatic/apis/kubermatic-kubernetes-platform-api/llms.txt) - [OpenAPI document](https://skmtc.dev/kubermatic/apis/kubermatic-kubernetes-platform-api/revisions/815b9bf19db5?raw)
