# Manage Gateway Groups

Gateway groups allow you to organize data plane instances into logical groups, enabling environment isolation (dev/staging/production), team-based separation, or geographic grouping. Each gateway group has its own configuration scope and can run different versions of the data plane.

This guide shows how to create, inspect, and update gateway groups with the enterprise API.

## Prerequisites[​](#prerequisites "Direct link to Prerequisites")

* An API7 Enterprise instance is running.
* A [token from the Dashboard](https://docs.api7.ai/api7-gateway/reference/obtain-dashboard-token.md).

## Create a Gateway Group[​](#create-a-gateway-group "Direct link to Create a Gateway Group")

You can create a new gateway group to logically group your gateway instances.

`environment` picks the licensed CPU core quota the group's data plane instances consume: `production` (the default) or `non_production`. See [Core Quota](https://docs.api7.ai/api7-gateway/configure-and-manage/license-management.md#core-quota). It is available in API7 Enterprise from version 3.10.5; earlier versions silently ignore the field and put every gateway group on the single core quota they support.

```
curl -k "https://localhost:7443/api/gateway_groups" -X POST \

  -H "X-API-KEY: ${API_KEY}" \

  -H "Content-Type: application/json" \

  -d '{

    "name": "docs-temp-group",

    "description": "Docs validation gateway group",

    "type": "api7_gateway",

    "environment": "non_production",

    "labels": {

      "env": "docs-test"

    }

  }'
```

## List Gateway Groups[​](#list-gateway-groups "Direct link to List Gateway Groups")

Listing gateway groups helps you view all existing logical groups and their configurations.

```
curl -k "https://localhost:7443/api/gateway_groups" \

  -H "X-API-KEY: ${API_KEY}"
```

## Generate an Instance Token[​](#generate-an-instance-token "Direct link to Generate an Instance Token")

Data plane instances need a token to register with a gateway group. Each gateway group can generate its own unique token.

```
curl -k "https://localhost:7443/api/gateway_groups/{gateway_group_id}/instance_token" -X POST \

  -H "X-API-KEY: ${API_KEY}"
```

## Update a Gateway Group[​](#update-a-gateway-group "Direct link to Update a Gateway Group")

You can update the name, description, environment, and labels of an existing gateway group. Omitting `environment` leaves the group on its current core quota.

```
curl -k "https://localhost:7443/api/gateway_groups/{gateway_group_id}" -X PUT \

  -H "X-API-KEY: ${API_KEY}" \

  -H "Content-Type: application/json" \

  -d '{

    "name": "docs-temp-group-updated",

    "description": "Updated docs validation group",

    "environment": "production",

    "labels": {

      "env": "docs-test",

      "team": "docs"

    }

  }'
```

## Validate the Configuration[​](#validate-the-configuration "Direct link to Validate the Configuration")

Verify the configuration by retrieving the details of a specific gateway group.

```
curl -k "https://localhost:7443/api/gateway_groups/{gateway_group_id}" \

  -H "X-API-KEY: ${API_KEY}"
```

## Next Steps[​](#next-steps "Direct link to Next Steps")

* [Understand Gateway Groups](https://docs.api7.ai/api7-gateway/key-concepts/gateway-groups.md) — learn the architecture concepts.
* [Configure Secret Management](https://docs.api7.ai/api7-gateway/how-to-guides/ops/secret-manager.md) — manage secrets within gateway groups.
