---
title: "Update an existing group"
method: PUT
path: "/segments/{id}"
tags: ["groups"]
---

# Update an existing group

`PUT /segments/{id}`

Update an existing group.

## Request body

- object
  - `name` string — The group's name.

## Response `200`

OK

- BaseGroup
  - `id` integer — The ID of the resource.
  - `created_at` string, date-time — The date and time when the resource was created.
  - `updated_at` string, date-time — The date and time when the resource was last updated.
  - `name` string — The name of the group.

## Other responses

- `400` — Bad request
- `401` — Unauthorized
- `404` — Not found
- `422` — Unprocessable entity
- `default` — Unexpected error

## Changes

- **2021-11-27** `75b3657b756c` — 1 breaking, 1 info
  - removed the media type `application/x-www-form-urlencoded` from the request body
  - added the media type `application/json` to the request body
- **2021-06-20** `e9157e76a1b7` — 1 info
  - endpoint added
- **2021-05-18** `c686bd33a4a5` — 1 breaking
  - api path removed without deprecation

[Change history](https://skmtc.dev/mailbadger/apis/mailbadger-api/changes/segments/:id/put.md)

---

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