---
title: "Update service account"
method: PATCH
path: "/api/v1/service-accounts/{id}"
tags: ["service_accounts"]
---

# Update service account

`PATCH /api/v1/service-accounts/{id}`

Update a service account

## Path parameters

- `id` string, required

## Request body

- UpdateServiceAccountRequest
  - `active` boolean
  - `description` string
  - `name` string
  - `role_ids` string[]

## Response `200`

OK

- ServiceAccount
  - `active` boolean
  - `created_at` string
  - `created_by` string
  - `description` string
  - `id` string
  - `name` string
  - `roles` Role[]
    - `description` string
    - `id` string
    - `name` string
    - `permissions` Permission[]
      - `action` string
      - `description` string
      - `id` string
      - `name` string
      - `resource_type` string
  - `updated_at` string

## Other responses

- `404` — Not Found

---

[API](https://skmtc.dev/marmotdata/apis/marmot-api.md) · [All operations](https://skmtc.dev/marmotdata/apis/marmot-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/marmotdata/marmot-api/revisions/0bd802afff21/schema)
