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

# Publish strategy version

> Publishes a new allocation version and makes it the active one.

Publishes a new allocation version. The new version becomes the strategy's
active version. Previous versions stay readable via
[`GET /v2/strategies/{strategyId}/versions`](/api-reference/endpoints/v2-list-strategy-versions).

* Auth: `x-api-key` header (required)
* Required scope: `strategies:write`

<Warning>
  **Affects every enrolled portfolio.** The new allocation is what every
  portfolio enrolled in this strategy will rebalance to on its next scheduled
  run. Pause portfolios via
  [`POST /v2/portfolios/{portfolioId}/stop`](/api-reference/endpoints/v2-stop-portfolio)
  first if you need a staged rollout. Don't grant `strategies:write` to keys
  exposed to end-user surfaces.
</Warning>

### Request body

* `allocation` — required. Same validation as
  [`POST /v2/strategies`](/api-reference/endpoints/v2-create-strategy):
  weights sum to 100, CAIP-19 asset IDs, ≤50 assets.
* `changeLog` — optional, ≤500 chars. Free-form note shown in the version
  history.

Body is strict; unknown keys (including a client-supplied `version`) return
`400`. Version numbers are server-assigned.

### Concurrent publishes

If two publishes for the same strategy arrive at the same time, each gets a
distinct sequential version number and the last one becomes the active
version. Serialize on your side if you need strict ordering.

### Cross-tenant access

Returns `404` — strategies you don't own are not exposed.

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api.glider.fi/v2/strategies/01JWZEE2MF30KVRMRX53N88VA4/versions' \
    --header 'x-api-key: gldr_sk_your_api_key' \
    --header 'content-type: application/json' \
    --data '{
      "allocation": {
        "assets": [
          { "assetId": "eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", "weight": "70" },
          { "assetId": "eip155:1/erc20:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", "weight": "30" }
        ]
      },
      "changeLog": "Increased USDC weight from 60% to 70%"
    }'
  ```

  ```javascript JavaScript theme={null}
  const response = await fetch(
    "https://api.glider.fi/v2/strategies/01JWZEE2MF30KVRMRX53N88VA4/versions",
    {
      method: "POST",
      headers: {
        "x-api-key": "gldr_sk_your_api_key",
        "content-type": "application/json",
      },
      body: JSON.stringify({
        allocation: {
          assets: [
            { assetId: "eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48", weight: "70" },
            { assetId: "eip155:1/erc20:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2", weight: "30" },
          ],
        },
        changeLog: "Increased USDC weight from 60% to 70%",
      }),
    },
  );
  const { data } = await response.json();
  console.log(`Published v${data.version}`);
  ```
</RequestExample>

<ResponseExample>
  ```json 201 theme={null}
  {
    "success": true,
    "data": {
      "version": 4,
      "allocation": {
        "assets": [
          {
            "assetId": "eip155:1/erc20:0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48",
            "weight": "70"
          },
          {
            "assetId": "eip155:1/erc20:0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2",
            "weight": "30"
          }
        ]
      },
      "changeLog": "Increased USDC weight from 60% to 70%",
      "isHead": true,
      "createdAt": "2026-04-29T12:00:00.000Z"
    }
  }
  ```
</ResponseExample>
