---
title: "Update a service account in the current organization by name."
method: PUT
path: "/organizations/iam/service_accounts/{name}"
---

# Update a service account in the current organization by name.

`PUT /organizations/iam/service_accounts/{name}`

## Request

- Base URL: `https://api.border0.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.border0.com/organizations/iam/service_accounts/{name}`
- Auth: API key in header `Authorization`

## Path parameters

- `name` string, required

## Request body

- V1ServiceAccountUpdatePayload
  - `active` boolean: Whether the service account is active or inactive.
  - `description` string: A short descriptive text about the service account's usage.
  - `name` string: Name (unique slug) for the service account.
  - `role` string: Border0 permission level, may be "client", "member" or "admin"

## Response `200`

OK

- ServiceaccountFull
  - `access_graph` SerializerAccessGraph
    - `edges` SerializerAccessGraphEdge[]
      - `dst_node_id` string
      - `edge_id` string
      - `src_node_id` string
    - `nodes` SerializerAccessGraphNode[]
      - `label` string
      - `metadata` object
      - `node_id` string
      - `resource_id` string
      - `resource_type` 'user' | 'group' | 'service account' | 'policy' | 'socket'
      - `warnings` SerializerWarning[]
        - `args` object
        - `code` string
    - `principal_resource_type` 'user' | 'group' | 'service account' | 'policy' | 'socket'
  - `active` boolean
  - `created_at` string
  - `description` string
  - `directory_service` SerializerDirectoryService
    - `display_name` string
    - `id` string
    - `service_type` string
  - `last_seen_at` string
  - `name` string
  - `role` string
  - `service_account_id` string
  - `updated_at` string

## Other responses

- `400`: Bad Request
- `403`: Forbidden
- `500`: Internal Server Error

---

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