# Batch set profile group

Move browser profiles into a group by group name.
- **Preconditions**: provide at least one of `envIds` or `uniqueIds`; `groupName` is required and at most 50 characters. There is no way to clear a profile's group through this endpoint.
- **Effect**: the group is created automatically when the name does not exist, which **counts against the 1000-group team limit** and fails once that is reached. A profile belongs to exactly one group, so the previous group is replaced. When your team authorizes access per group, a group created here is also granted to you.
- **Completion**: synchronous. Group creation is serialized per team, so concurrent calls with a new name do not create duplicates.

Endpoint: POST /env/setGroup/batch
Version: 2026-09-05
Security: OpenApiBearer

## Security:

  - `OpenApiBearer` (unknown)
    http bearer JWT

## Request fields (application/json):

  - `envIds` (array)
    Profile IDs.

  - `uniqueIds` (array)
    Profile sequence numbers.
    Example: [1001]

  - `groupName` (string, required)
    Target group name. Must not be blank.
    Example: Marketing

## Response 200:

  - `200` (unknown)
    Success

## Response 200 fields (application/json):

  - `code` (integer, required)
    Return result code. `0` means success; other codes indicate exceptions.
    Example: 0

  - `msg` (string | null, required)
    Error message. Usually `null` on success.
    Example: null

  - `requestId` (string)
    Operation request ID. This field may be present when the request passes through the API gateway.
    Example: 1d4f3ea968664593860b94b35d4ebf5e

  - `data` (boolean, required)
    Whether the batch operation succeeded.
    Example: true

