> ## Documentation Index
> Fetch the complete documentation index at: https://docs.requesty.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Group Labels

> Update labels for a group. The request body replaces the entire `labels` map stored for the group. Setting an empty object clears all labels. Requires an API key with manage permissions.

Update labels for a group. Labels are key-value pairs that can be used for organization and filtering. The request body replaces the entire `labels` map stored for the group, so sending an empty object clears all labels.

<Note>
  Use [Get Group](/api-reference/endpoint/manage-group/manage-group-get) or [List Groups](/api-reference/endpoint/manage-group/manage-group-list) to retrieve the current labels for a group before updating.
</Note>


## OpenAPI

````yaml PATCH /v1/manage/group/{id}/label
openapi: 3.0.3
info:
  title: Requesty Management API
  description: >-
    Requesty Management API for API key management, groups, members, and
    organization settings.
  version: 1.0.0
servers:
  - url: https://api-v2.requesty.ai
    description: Management API endpoint
security:
  - BearerAuth: []
paths:
  /v1/manage/group/{id}/label:
    servers:
      - url: https://api-v2.requesty.ai
        description: Management API endpoint
    patch:
      summary: Update group labels
      description: >-
        Update labels for a group. The request body replaces the entire `labels`
        map stored for the group. Setting an empty object clears all labels.
        Requires an API key with manage permissions.
      operationId: updateGroupLabels
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
            format: uuid
          description: The group ID
          example: 123e4567-e89b-12d3-a456-426614174000
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateGroupLabelsRequest'
      responses:
        '200':
          description: Group labels updated successfully
        '400':
          description: Bad request - invalid group ID or request body.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: Unauthorized - missing or invalid Authorization header.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '403':
          description: Forbidden - API key does not have manage permissions.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '404':
          description: Not found - the group does not exist.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '500':
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    UpdateGroupLabelsRequest:
      type: object
      required:
        - labels
      properties:
        labels:
          type: object
          additionalProperties:
            type: string
          description: >-
            Key-value pairs of labels. Replaces the entire labels map for the
            group. An empty object clears all labels.
          example:
            department: engineering
      example:
        labels:
          department: engineering
    ErrorResponse:
      type: object
      required:
        - error
      properties:
        error:
          type: object
          required:
            - origin
            - message
          properties:
            origin:
              type: string
              enum:
                - router
                - provider
              description: >-
                Whether the error originated from Requesty's router or an
                upstream provider.
            message:
              type: string
              description: Human-readable error description.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      description: API key for authentication

````