---
title: "Update Team"
method: PATCH
path: "/api/v1/teams/{team_id}"
tags: ["teams"]
---

# Update Team

`PATCH /api/v1/teams/{team_id}`

## Request

- Base URL: `https://api.badgeia.com`
- URL: `https://api.badgeia.com/api/v1/teams/{team_id}`
- Auth: none declared

Owner-only workspace settings. Today: audit-log retention (#1298).

The only settable field belongs to the audit log, so with
``AUDIT_LOG_ENABLED`` off the route 404s rather than accepting a setting
nothing would act on (rule #4).

## Path parameters

- `team_id` string, uuid, required

## Request body

- TeamUpdate: PATCH /teams/{id}. Only the audit-log retention setting today. Explicit ``null`` means "keep forever"; an omitted field is left unchanged (the router reads ``model_fields_set``).
  - `audit_retention_days` integer, nullable

## Response `200`

Successful Response

- TeamRead
  - `id` string, uuid, required
  - `name` string, required
  - `description` string, nullable, required
  - `plan` string, required
  - `max_seats` integer, required
  - `created_at` string, date-time, required
  - `audit_retention_days` integer, nullable

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/badgeia/apis/badge.md) · [All operations](https://skmtc.dev/badgeia/apis/badge/llms.txt) · [OpenAPI document](https://skmtc.dev/badgeia/apis/badge/revisions/7e7f7fee8b77?raw)
