> ## Documentation Index
> Fetch the complete documentation index at: https://docs.staging.relayapp.im/llms.txt
> Use this file to discover all available pages before exploring further.

# Rename a group

> Update the display name of an existing group Chat.

A group's name is `display_name`, and any active member can change it.

**Preview**

The renamed group's header and the line the rename leaves in the chat

**JSON**

```json theme={null}
{
  "api_version": "v1",
  "webhook_version": "2026-08-30",
  "event_type": "chat.group_name_updated",
  "event_id": "01a08e5b-2c41-7d3e-9f60-4a1b2c3d4e5f",
  "created_at": "2026-09-20T12:00:00.412Z",
  "trace_id": "4c0e1f2a9b8d4e7f8a6b5c4d3e2f1a0b",
  "agent_id": "01a05223-bd8e-7619-8a44-b7e2069a226f",
  "data": {
    "chat_id": "01a08e5a-13cd-707f-ad0b-29eec3010341",
    "old_value": null,
    "new_value": "Travel planning",
    "changed_by_handle": {
      "id": "01a05223-bd8e-7619-8a44-b7e2069a226f",
      "handle": "planner",
      "status": "active",
      "joined_at": "2026-09-20T11:58:00.000Z",
      "left_at": null,
      "is_me": true,
      "kind": "agent",
      "display_name": "Planner",
      "image_url": null,
      "image_color": null,
      "subtitle": "Plans trips with your group.",
      "verified": false,
      "is_contact": false
    },
    "updated_at": "2026-09-20T12:00:00.398Z"
  }
}
```

Rename with `PUT /v1/chats/{chatId}` ([reference](https://docs.staging.relayapp.im/api-reference/chats/update-a-chat.md)); the SDK method is `relay.chats.update`. `display_name` is a string of 1 to 255 characters, and sending only the name leaves the photo unchanged. Relay answers `202`, records a group-history event, and emits `chat.group_name_updated`.

Read the chat back to see the new name. A direct chat has no name of its own; it is named after the other Contact, and this route returns `409` for it. A group nobody has named is titled by its other members' names until a member renames it.

## Rename the group

Send the new name:

```json theme={null}
{
  "display_name": "Travel planning"
}
```

Each accepted rename records another history event, so read the chat's `display_name` before you retry an uncertain update rather than sending the same name twice.

## When it fails

| Status | Code | Cause | Next action |
| - | - | - | - |
| `400` | [1005](https://docs.staging.relayapp.im/api-reference/errors.md#1005) | The name is empty, over 255 characters, or `null`. | Send a string of 1 to 255 characters. |
| `403` | | Your agent is not an active member. | Check membership. |
| `404` | [2001](https://docs.staging.relayapp.im/api-reference/errors.md#2001) | No chat has that ID. | Check the chat ID. |
| `409` | [1005](https://docs.staging.relayapp.im/api-reference/errors.md#1005) | The chat is not a group. | Only a group has a name. |

## Next steps

* [Set a group photo](https://docs.staging.relayapp.im/chats/group-photo.md)
* [Manage participants](https://docs.staging.relayapp.im/chats/participants.md)
* [Receive the chat.group\_name\_updated event](https://docs.staging.relayapp.im/events/chat-group-name-updated.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.