Browse docsupdate_group
update_group
Changes the name or description of a group you moderate.
Annotations: readOnlyHint: false · destructiveHint: true · idempotentHint: true · openWorldHint: false
When to use it#
When the member asks to rename a group they moderate or change what its description says. Read get_group first, so you know its current details and its publicId. Changing a group contacts nobody: members see the new details the next time they open the group.
Inputs#
| Input | Required | Type | Description |
|---|---|---|---|
group | yes | object | The group resource, as get_group returns it, with the values you want. group.publicId is required. |
updateMask | no | string | Comma-separated fields to change: name, description, or name,description. Prefer naming them. |
- Only the fields the mask names change. Other values in
groupare ignored. - An omitted mask changes the populated nonempty fields, so it cannot clear a description.
- An explicitly empty mask (
"") changes nothing. *alone replaces both fields and clears an omitted description.- A selected
descriptionthat isnullor empty is cleared. A selectednamemust be nonempty, up to 100 characters; a description allows 500. roleandmemberCountare output-only and ignored.websiteDomaincannot be changed here, and naming it in the mask is rejected.
Returns#
Success returns status, outcome, message, and group, the updated group in the shape get_group returns, plus the group's link. outcome is updated, or no_change when the group already had the requested details. After an update, Gravity chooses the group's icon and logo again from its new wording.
Only a moderator can change these details. A member who does not moderate the group gets request_rejected; a group you cannot see is unavailable. The last change saved wins: there is no version check, so read get_group again if the member says someone else may have just edited it. Errors use the common contract.
Examples#
{
"group": {
"publicId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"description": "Weekly dinners, and help with whatever each of us is working on."
},
"updateMask": "description"
}
Example response (synthetic data):
{
"status": "success",
"outcome": "updated",
"message": "Saved the group's new description. Nobody was notified.",
"group": {
"publicId": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"name": "Synthetic family",
"description": "Weekly dinners, and help with whatever each of us is working on.",
"websiteDomain": null,
"memberCount": 2,
"role": "moderator"
},
"link": "https://www.meetgravity.ai/dashboard/groups/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
Related#
get_groupreads the group's current details.create_groupstarts a new group.