---
title: "Set Service Account Roles"
method: PUT
path: "/v1/service-accounts/{service_account_id}/roles"
tags: ["beta.service_accounts"]
---

# Set Service Account Roles

`PUT /v1/service-accounts/{service_account_id}/roles`

Replace the workspace roles assigned to a service account.

Requires the Workspace admin (`workspace_admin`) role.

## Path parameters

- `service_account_id` string, uuid, required

## Request body

- SetServiceAccountRolesRequest — unresolved $ref

## Response `200`

Successful Response

- ListServiceAccountRolesResponse — unresolved $ref

## Other responses

- `422` — Validation Error

## Changes

- **2026-09-16** `4cb0b5382d4f` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/mistral/apis/mistral-ai-api/changes/v1/service-accounts/:service_account_id/roles/put.md)

---

[API](https://skmtc.dev/mistral/apis/mistral-ai-api.md) · [All operations](https://skmtc.dev/mistral/apis/mistral-ai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mistral/apis/mistral-ai-api/revisions/4cb0b5382d4f?raw)
