---
title: "Update a group"
method: PATCH
path: "/v1/groups/{id}"
tags: ["Groups"]
---

# Update a group

`PATCH /v1/groups/{id}`

## Request

- Base URL: `https://api.mentio.dev`
- URL: `https://api.mentio.dev/v1/groups/{id}`
- Auth: HTTP bearer

Rename a group, change your id for it (`externalId`, null clears) or its company description (`context`, null clears: the workspace profile applies again; new mentions are judged with it at once, old ones are not rescored). The default group can be renamed like any other but takes no description: it is the workspace itself and reads the company profile.

## Path parameters

- `id` string, required: Group id (grp_...).

## Request body

- object: Omitted fields are untouched.
  - `name` string: The group's name: a customer, a campaign, a product. Unique per workspace.
  - `externalId` string, nullable: Replaces your id for the group; null clears it.
  - `context` string, nullable: Replaces the group's company description; null clears it (the workspace profile applies again). New mentions are judged with it at once; old ones are not rescored. Not on the default group (400 default_group_context): that one is the workspace itself and reads the profile.

## Response `200`

The updated group

- Group: The group the keyword belongs to.
  - `id` string, required: Group id (grp_...).
  - `name` string, required: The group's name.
  - `externalId` string, nullable, required: Your own id for the group, or null.
  - `isDefault` boolean, required: The workspace's default group, where a keyword lands when no group is named.
  - `context` string, nullable, required: The group's own company description for the classifier, or null for the workspace profile.
  - `stats` object, required: Computed over the group's keywords.
    - `keywords` integer, required: Keywords in the group, muted ones included.
    - `active` integer, required: Keywords in the group that are tracking (not muted).
  - `createdAt` string, required: ISO 8601 timestamp, UTC.
  - `updatedAt` string, required: ISO 8601 timestamp, UTC.

## Other responses

- `400`: A company description on the default group (default_group_context)
- `401`: Missing or invalid API key
- `404`: No such group in this workspace
- `409`: A group with that name or externalId already exists (duplicate_group)

---

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