---
title: "PUT /thing-groups/updateThingGroupsForThing"
method: PUT
path: "/thing-groups/updateThingGroupsForThing"
---

# PUT /thing-groups/updateThingGroupsForThing

`PUT /thing-groups/updateThingGroupsForThing`

Updates the groups to which the thing belongs.

Requires permission to access the [UpdateThingGroupsForThing](https://docs.aws.amazon.com/service-authorization/latest/reference/list_awsiot.html#awsiot-actions-as-permissions) action.

## Request body

- object
  - `thingName` string — The thing whose group memberships will be updated.
  - `thingGroupsToAdd` ThingGroupName[] — The groups to which the thing will be added.
  - `thingGroupsToRemove` ThingGroupName[] — The groups from which the thing will be removed.
  - `overrideDynamicGroups` boolean — Override dynamic thing groups with static thing groups when 10-group limit is reached. If a thing belongs to 10 thing groups, and one or more of those groups are dynamic thing groups, adding a thing to a static group removes the thing from the last dynamic group.

## Response `200`

Success

- UpdateThingGroupsForThingResponse

## Other responses

- `480` — InvalidRequestException
- `481` — ThrottlingException
- `482` — InternalFailureException
- `483` — ResourceNotFoundException

---

[API](https://skmtc.net/aws/apis/iot.md) · [All operations](https://skmtc.net/aws/apis/iot/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/aws/iot/revisions/deef5c4b09f0/schema)
