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

# Replace a bot group

> Replace a bot group.


## OpenAPI

```yaml openapi.json put /v1/bot-groups/{id}
openapi: 3.1.0
info:
  title: Ocean One API
  version: 2.3.1
servers:
  - url: https://api.plungeai.com
paths:
  /v1/bot-groups/{id}:
    put:
      operationId: put-v1-bot-groups-id
      tags:
        - Bots
      summary: Replace a bot group
      description: Same body and checks as create; the group must be yours.
      security:
        - ozkBearer: []
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                name:
                  type: string
                  description: 1-40 letters, digits, "_", "." or "-"; unique per account
                members:
                  type: array
                  items:
                    type: string
                  minItems: 2
                  maxItems: 6
                  description: Your saved-bot ids
              required:
                - name
                - members
      responses:
        "200":
          description: Updated
          content:
            application/json:
              schema:
                type: object
                properties:
                  group:
                    type: object
                    properties:
                      id:
                        type: string
                      name:
                        type: string
                      members:
                        type: array
                        items:
                          type: string
                        description: Saved-bot ids, 2 to 6
                      created_at:
                        type: integer
                        description: Unix seconds
                      updated_at:
                        type: integer
                        description: Unix seconds
                    required:
                      - id
                      - name
                      - members
        "400":
          description: invalid_json — body is not valid JSON or YAML; invalid_format — format must be one of json, yaml, markdown, text
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: unauthorized — missing, invalid or revoked ozk_ key
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "404":
          description: "group_not_found — no bot group with that id for this account; not_found — no route for this method on this path: every other method answers it"
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "409":
          description: name_taken — you already have a group with that name
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "422":
          description: invalid_name or invalid_members
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "503":
          description: not_enabled — bot groups are not enabled yet
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
components:
  schemas:
    Error:
      type: object
      description: Standard error envelope. Every error response also carries an `X-Error-Code` response header equal to error.code, so a client branches on the header regardless of the negotiated body format (json | yaml | markdown | text). When the request created an execution, the `X-Execution-Id` response header is also set. Errors follow the negotiated format like success bodies.
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
            connect:
              type: object
              description: "On a 424 connection_required / credential_required: where the missing connection is made."
              properties:
                provider:
                  type: string
                method:
                  type: string
                  enum:
                    - oauth
                    - api_key
                    - wallet
                link:
                  type: string
                  example: POST /v1/connections/stripe/link
          required:
            - code
            - message
          additionalProperties: true
      required:
        - error
  securitySchemes:
    ozkBearer:
      type: http
      scheme: bearer
      description: "ozk_ platform API key (Authorization: Bearer ozk_…)"
```
