Skip to main content
Rename a group, set who is in it, or both in one call. Pass at least one of name, key or attributions — a call with none of them has nothing to update. attributions is the group’s whole membership, not an addition to it: whoever the list leaves out is taken out of the group. Read the group with get_group first and send back every member to keep, or the ones missing from your list are removed. Omitting the argument leaves the membership untouched, so a rename alone is safe; passing an empty list empties the group. Declaring a membership that already matches changes nothing, so the same call can be sent twice. Removing a membership needs the delete permission on groups, as it does in the web app. Only what actually changed comes back in attribution_changes, each row saying whether it was created, moved, or removed. A membership change here recalculates the statements of the users it affects, on the live environment, wherever the group is attributed to a plan — their statements move to NEED_REFRESH and are recalculated in the background. A call that changes nothing triggers no refresh. Renaming propagates too: the group reads under its new name on every statement and in every report that breaks down by its dimension. Available only where the Qobra write tools beta is enabled. Every write to the live environment is recorded in the audit trail as the Qobra MCP agent; writes to a sandbox are not audited.

Parameters

Body

string
required
Id of the group to update — the id list_groups returns, or the one create_group just returned.
string
New display name for the group. Omit to leave the current name as it is.
string
New stable key for the group — the identifier an integration matches it on, distinct from the display name. Omit to leave the current key as it is.
object[]
Who is in the group, as the complete list — every user, each with the months they belong for. This replaces the group’s membership rather than adding to it: anyone missing from the list is taken out of the group. Omit the argument to leave the membership untouched; pass an empty list to empty the group. Send one row per continuous stretch, with no month covered twice for the same user.

Response

Body

object
The group as it now stands after the update.
object[]
Every membership the call actually changed — created, moved, or removed because the declared list no longer held it. Empty when the call only renamed the group, and empty when the declared membership already matched what the group had, which is how a repeated call reads as the no-op it was.