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

# Update Account Number Profile

Update a profile's name, description, or range. Already-issued account numbers are never renumbered.

# 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": "Account Number Profiles",
      "description": "The number ranges that new trading accounts are allocated from."
    }
  ],
  "paths": {
    "/v1/account-number-profiles/{profile_id}": {
      "put": {
        "tags": [
          "Account Number Profiles"
        ],
        "summary": "Update Account Number Profile",
        "description": "Update a profile's name, description, or range. Already-issued account numbers are never renumbered.",
        "operationId": "update_profile_v1_account_number_profiles__profile_id__put",
        "parameters": [
          {
            "name": "profile_id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "title": "Profile Id",
              "description": "Profile id"
            },
            "description": "Profile id"
          }
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/AccountNumberProfileUpdate"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Account number profile updated successfully",
            "content": {
              "application/json": {
                "schema": {}
              }
            }
          },
          "400": {
            "description": "Validation error, or the range overlaps an existing profile"
          },
          "401": {
            "description": "Invalid or missing API key"
          },
          "403": {
            "description": "Access denied (credential scope)"
          },
          "404": {
            "description": "Profile not found"
          },
          "422": {
            "description": "Validation Error",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/HTTPValidationError"
                }
              }
            }
          },
          "429": {
            "description": "Rate limit exceeded"
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "AccountNumberProfileUpdate": {
        "properties": {
          "name": {
            "anyOf": [
              {
                "type": "string"
              },
              {
                "type": "null"
              }
            ],
            "title": "Name"
          },
          "range_start": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 10000
              },
              {
                "type": "null"
              }
            ],
            "title": "Range Start"
          },
          "range_end": {
            "anyOf": [
              {
                "type": "integer",
                "minimum": 10001
              },
              {
                "type": "null"
              }
            ],
            "title": "Range End"
          },
          "description": {
            "anyOf": [
              {
                "type": "string",
                "maxLength": 500
              },
              {
                "type": "null"
              }
            ],
            "title": "Description"
          },
          "is_default": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Default"
          },
          "is_enable": {
            "anyOf": [
              {
                "type": "boolean"
              },
              {
                "type": "null"
              }
            ],
            "title": "Is Enable"
          },
          "company_id": {
            "anyOf": [
              {
                "type": "integer"
              },
              {
                "type": "null"
              }
            ],
            "title": "Company Id"
          }
        },
        "type": "object",
        "title": "AccountNumberProfileUpdate"
      },
      "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": []
    }
  ]
}
````