v7

latestOpenAPI 3.0.3raw.githubusercontent.com2026-08-013764062.2 MB
Strategies

Update strategy segments

Sets the segments of the strategy specified to be exactly the ones passed in the payload. Any segments that were used by the strategy before will be removed if they are not in the provided list of segments.

post/api/admin/segments/strategies

Request body

projectIdstring required

The ID of the project that the strategy belongs to.

strategyIdstring required

The ID of the strategy to update segments for.

environmentIdstring required

The ID of the strategy environment.

segmentIdsinteger[] required

The new list of segments (IDs) to use for this strategy. Any segments not in this list will be removed from the strategy.

Example request

{
  "projectId": "red-vista",
  "strategyId": "15d1e20b-6310-4e17-a0c2-9fb84de3053a",
  "environmentId": "development",
  "segmentIds": [
    1,
    5,
    6
  ]
}

Response

The resource was successfully created.

projectIdstring required

The ID of the project that the strategy belongs to.

strategyIdstring required

The ID of the strategy to update segments for.

environmentIdstring required

The ID of the strategy environment.

segmentIdsinteger[] required

The new list of segments (IDs) to use for this strategy. Any segments not in this list will be removed from the strategy.

Example response

{
  "projectId": "red-vista",
  "strategyId": "15d1e20b-6310-4e17-a0c2-9fb84de3053a",
  "environmentId": "development",
  "segmentIds": [
    1,
    5,
    6
  ]
}