---
updatedAt: 2026-08-23T17:14:33.000Z
agentTools:
  projectIndex: https://x9.readme.io/llms.txt
---

# Update Client Group

Replace a client group's configuration. This is a full update — send every field, not only the ones you are changing.

Margin and permission settings have their own endpoints below.

# OpenAPI definition

````json
{
  "openapi": "3.1.0",
  "info": {
    "title": "X9 Connect API",
    "description": "X9 Connect — the partner integration API for the X9 trading platform.\n\n**Authentication:** Send your X9 Connect key in the **X-Api-Key** header (company-scoped access — only your company's groups & accounts). Use the **Authorize** button above to enter your credential.\n\n**API environment:** The API explorer defaults to `https://betaapi.x9trader.com/api/broker`. Use the environment selector to switch to `https://1xapi.x9trader.com/api/broker`.\n\n**Errors** come back in a consistent envelope:\n\n```json\n{\n  \"status\": false,\n  \"error\": { \"code\": \"AUTH_MISSING_TOKEN\", \"message\": \"Authentication required\" },\n  \"request_id\": \"8b993fdf-e997-4370-ae6f-2a594a8c1e85\",\n  \"timestamp\": \"2026-08-19T18:06:57.698387+00:00\"\n}\n```\n\nQuote `request_id` when reporting a problem — it identifies the exact call in our logs.\n\n**Real-time:** a WebSocket at `/api/broker/v1/stream` carries live quotes and your accounts' position, order, trade, and balance events. See the **Real-Time Stream** section.\n\n**Upgrading from the old API?** Everything that used to live under `/api/v1` and `/api/v2` on `webapi.x9trader.com` now sits under `/api/broker/v1`, and the auth header changed from `X-CRM-Token` to `X-Api-Key`. Each endpoint below names the old path it **Replaces**.",
    "version": "1.0.0"
  },
  "tags": [
    {
      "name": "Groups",
      "description": "Client groups — the container that decides an account's spreads, margin rules, and trading permissions."
    }
  ],
  "paths": {
    "/v1/groups/{client_group_id}": {
      "put": {
        "tags": [
          "Groups"
        ],
        "summary": "Update Client Group",
        "description": "Replace a client group's configuration. This is a full update — send every field, not only the ones you are changing.\n\nMargin and permission settings have their own endpoints below.",
        "operationId": "update_group_v1_groups__client_group_id__put",
        "parameters": [
          {
            "name": "client_group_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Client Group Id",
              "description": "Client group id"
            },
            "description": "Client group id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/GroupUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Client group updated successfully",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Validation error"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "403": {
            "description": "Access denied (credential scope)"
          },
          "404": {
            "description": "Client group not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "GroupUpdate": {
        "properties": {
          "name": {
            "type": "string",
            "minLength": 1,
            "title": "Name"
          },
          "client_group_type_id": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "title": "Client Group Type Id"
          },
          "client_group_category_id": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "title": "Client Group Category Id"
          },
          "currency": {
            "type": "string",
            "minLength": 1,
            "title": "Currency"
          },
          "trade_server_id": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "title": "Trade Server Id"
          },
          "spread_profile_id": {
            "type": "integer",
            "exclusiveMinimum": 0,
            "title": "Spread Profile Id"
          },
          "push_notification": {
            "type": "boolean",
            "title": "Push Notification"
          },
          "enable_connections": {
            "type": "boolean",
            "title": "Enable Connections"
          },
          "change_pass_at_first_login": {
            "type": "boolean",
            "title": "Change Pass At First Login"
          },
          "risk_warning": {
            "type": "boolean",
            "title": "Risk Warning"
          },
          "regulatory_restrictions": {
            "type": "boolean",
            "title": "Regulatory Restrictions"
          },
          "digits": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 0
              },
              {
                "type": "null"
              }
            ],
            "title": "Digits"
          }
        },
        "type": "object",
        "required": [
          "name",
          "client_group_type_id",
          "client_group_category_id",
          "currency",
          "trade_server_id",
          "spread_profile_id",
          "push_notification",
          "enable_connections",
          "change_pass_at_first_login",
          "risk_warning",
          "regulatory_restrictions"
        ],
        "title": "GroupUpdate"
      },
      "HTTPValidationError": {
        "properties": {
          "detail": {
            "items": {
              "$ref": "#/components/schemas/ValidationError"
            },
            "type": "array",
            "title": "Detail"
          }
        },
        "type": "object",
        "title": "HTTPValidationError"
      },
      "ValidationError": {
        "properties": {
          "loc": {
            "items": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "integer"
                }
              ]
            },
            "type": "array",
            "title": "Location"
          },
          "msg": {
            "type": "string",
            "title": "Message"
          },
          "type": {
            "type": "string",
            "title": "Error Type"
          }
        },
        "type": "object",
        "required": [
          "loc",
          "msg",
          "type"
        ],
        "title": "ValidationError"
      }
    },
    "securitySchemes": {
      "CRMTokenAuth": {
        "type": "apiKey",
        "in": "header",
        "name": "X-Api-Key",
        "description": "CRM token (X9 Connect key) — company-scoped access to your assigned groups & accounts. Issued per company / company admin."
      }
    }
  },
  "servers": [
    {
      "url": "https://{environment}.x9trader.com/api/broker",
      "description": "X9 Connect",
      "variables": {
        "environment": {
          "default": "betaapi",
          "enum": [
            "betaapi",
            "1xapi"
          ],
          "description": "Select the X9 Connect backend"
        }
      }
    }
  ],
  "security": [
    {
      "CRMTokenAuth": []
    }
  ]
}
````