files/en-us/mozilla/add-ons/webextensions/api/tabgroups/index.md
This API enables extensions to modify and rearrange tab groups.
Tab groups may persist across browser restarts as part of session restore. Tab groups in private browsing windows do not persist across restarts. When a tab group is restored, its groupId may differ from its original value.
The tabGroups API doesn't offer the ability to create or remove tab groups. Use the {{WebExtAPIRef("tabs.group()")}} and {{WebExtAPIRef("tabs.ungroup()")}} methods instead. To query the position of a tab group within a window, use {{WebExtAPIRef("tabs.query()")}}. These APIs in the tabs namespace don't require any permissions.
To use this API, an extension must request the "tabGroups" permission in its manifest.json file. The "tabGroups" permission is not shown to users in permission prompts.
{{WebExtExamples("h2")}}
{{Compat}}