For the complete documentation index, see llms.txt. This page is also available as Markdown.

Variation Groups

Manage variation groups

Get variation groups of the campaign

get

Return the list of the variation groups of the campaign

Authorizations
AuthorizationstringRequired

Prefix the token with 'Bearer ' to indicate it is a bearer token

Path parameters
account_idstringRequired

The ID of the account

account_environment_idstringRequired

The ID of the environment

campaign_idstringRequired

The ID of the campaign

Query parameters
_pageintegerOptional

Index of the page

Example: 0
_max_per_pageintegerOptional

Number of items per page

Example: 10
Responses
200

Success

application/json
current_item_countinteger · intOptional

Returns the number of items in the current page

current_pageinteger · intOptional

Returns the number of the current page

Default: 0
total_countinteger · intOptional

Returns the number of total items

items_per_pageinteger · intOptional

Returns the number of items per page

Default: 10
last_pageinteger · intOptional

Returns the index of the page

get/accounts/{account_id}/account_environments/{account_environment_id}/campaigns/{campaign_id}/variation_groups
GET /v1/accounts/{account_id}/account_environments/{account_environment_id}/campaigns/{campaign_id}/variation_groups HTTP/1.1
Host: api.flagship.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "current_item_count": 1,
  "current_page": 0,
  "total_count": 1,
  "items_per_page": 10,
  "last_page": 1,
  "items": [
    {
      "id": "text",
      "name": "text",
      "variations": [
        {
          "id": "text",
          "name": "text",
          "reference": true,
          "allocation": 1,
          "modifications": {
            "type": "text",
            "value": {}
          }
        }
      ],
      "targeting": {
        "targeting_groups": [
          {
            "targetings": [
              {
                "key": "text",
                "operator": "EQUALS",
                "value": "text"
              }
            ]
          }
        ]
      },
      "allocation_config": {
        "start_date": "2026-01-01T00:00:00.000Z",
        "timezone": "text",
        "start_allocation": 1,
        "periodic_steps": {
          "allocation_step": 1,
          "step": 1,
          "step_type": "day"
        },
        "custom_steps": [
          {
            "allocation_step": 1,
            "step": 1,
            "step_type": "day"
          }
        ],
        "rollback_condition": {
          "goal": {
            "type": "transaction",
            "id": "text",
            "label": "text",
            "operator": "contains",
            "value": "text"
          },
          "operator": "GREATER_THAN",
          "value": 1,
          "min_visitors": 1
        }
      }
    }
  ]
}

Create a variation group

post

Create a variation group

Authorizations
AuthorizationstringRequired

Prefix the token with 'Bearer ' to indicate it is a bearer token

Path parameters
account_idstringRequired

The ID of the account

account_environment_idstringRequired

The ID of the environment

campaign_idstringRequired

The ID of the campaign

Body
idstringRead-onlyOptional

ID of the variation group

namestringOptional

Name of the variation group

Responses
201

Created

application/json
idstringRead-onlyOptional

ID of the variation group

namestringOptional

Name of the variation group

post/accounts/{account_id}/account_environments/{account_environment_id}/campaigns/{campaign_id}/variation_groups
POST /v1/accounts/{account_id}/account_environments/{account_environment_id}/campaigns/{campaign_id}/variation_groups HTTP/1.1
Host: api.flagship.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 614

{
  "name": "text",
  "variations": [
    {
      "name": "text",
      "reference": true,
      "allocation": 1,
      "modifications": {
        "type": "text",
        "value": {}
      }
    }
  ],
  "targeting": {
    "targeting_groups": [
      {
        "targetings": [
          {
            "key": "text",
            "operator": "EQUALS",
            "value": "text"
          }
        ]
      }
    ]
  },
  "allocation_config": {
    "start_date": "2026-01-01T00:00:00.000Z",
    "timezone": "text",
    "start_allocation": 1,
    "periodic_steps": {
      "allocation_step": 1,
      "step": 1,
      "step_type": "day"
    },
    "custom_steps": [
      {
        "allocation_step": 1,
        "step": 1,
        "step_type": "day"
      }
    ],
    "rollback_condition": {
      "goal": {
        "type": "transaction",
        "label": "text",
        "operator": "contains",
        "value": "text"
      },
      "operator": "GREATER_THAN",
      "value": 1,
      "min_visitors": 1
    }
  }
}
{
  "id": "text",
  "name": "text",
  "variations": [
    {
      "id": "text",
      "name": "text",
      "reference": true,
      "allocation": 1,
      "modifications": {
        "type": "text",
        "value": {}
      }
    }
  ],
  "targeting": {
    "targeting_groups": [
      {
        "targetings": [
          {
            "key": "text",
            "operator": "EQUALS",
            "value": "text"
          }
        ]
      }
    ]
  },
  "allocation_config": {
    "start_date": "2026-01-01T00:00:00.000Z",
    "timezone": "text",
    "start_allocation": 1,
    "periodic_steps": {
      "allocation_step": 1,
      "step": 1,
      "step_type": "day"
    },
    "custom_steps": [
      {
        "allocation_step": 1,
        "step": 1,
        "step_type": "day"
      }
    ],
    "rollback_condition": {
      "goal": {
        "type": "transaction",
        "id": "text",
        "label": "text",
        "operator": "contains",
        "value": "text"
      },
      "operator": "GREATER_THAN",
      "value": 1,
      "min_visitors": 1
    }
  }
}

Get one variation group

get

Return one variation group by its id

Authorizations
AuthorizationstringRequired

Prefix the token with 'Bearer ' to indicate it is a bearer token

Path parameters
account_idstringRequired

The ID of the account

account_environment_idstringRequired

The ID of the environment

campaign_idstringRequired

The ID of the campaign

variation_group_idstringRequired

The ID of the variation group

Responses
200

Success

application/json
idstringRead-onlyOptional

ID of the variation group

namestringOptional

Name of the variation group

get/accounts/{account_id}/account_environments/{account_environment_id}/campaigns/{campaign_id}/variation_groups/{variation_group_id}
GET /v1/accounts/{account_id}/account_environments/{account_environment_id}/campaigns/{campaign_id}/variation_groups/{variation_group_id} HTTP/1.1
Host: api.flagship.io
Authorization: YOUR_API_KEY
Accept: */*
{
  "id": "text",
  "name": "text",
  "variations": [
    {
      "id": "text",
      "name": "text",
      "reference": true,
      "allocation": 1,
      "modifications": {
        "type": "text",
        "value": {}
      }
    }
  ],
  "targeting": {
    "targeting_groups": [
      {
        "targetings": [
          {
            "key": "text",
            "operator": "EQUALS",
            "value": "text"
          }
        ]
      }
    ]
  },
  "allocation_config": {
    "start_date": "2026-01-01T00:00:00.000Z",
    "timezone": "text",
    "start_allocation": 1,
    "periodic_steps": {
      "allocation_step": 1,
      "step": 1,
      "step_type": "day"
    },
    "custom_steps": [
      {
        "allocation_step": 1,
        "step": 1,
        "step_type": "day"
      }
    ],
    "rollback_condition": {
      "goal": {
        "type": "transaction",
        "id": "text",
        "label": "text",
        "operator": "contains",
        "value": "text"
      },
      "operator": "GREATER_THAN",
      "value": 1,
      "min_visitors": 1
    }
  }
}

Delete a variation group

delete

Delete a variation group by its id.

Authorizations
AuthorizationstringRequired

Prefix the token with 'Bearer ' to indicate it is a bearer token

Path parameters
account_idstringRequired

The ID of the account

account_environment_idstringRequired

The ID of the environment

campaign_idstringRequired

The ID of the campaign

variation_group_idstringRequired

The ID of the variation group

Responses
204

Deleted

No content

delete/accounts/{account_id}/account_environments/{account_environment_id}/campaigns/{campaign_id}/variation_groups/{variation_group_id}
DELETE /v1/accounts/{account_id}/account_environments/{account_environment_id}/campaigns/{campaign_id}/variation_groups/{variation_group_id} HTTP/1.1
Host: api.flagship.io
Authorization: YOUR_API_KEY
Accept: */*

No content

Update a variation group

patch

Update variation group informations - You can set only the properies you want to update in the request body.

Authorizations
AuthorizationstringRequired

Prefix the token with 'Bearer ' to indicate it is a bearer token

Path parameters
account_idstringRequired

The ID of the account

account_environment_idstringRequired

The ID of the environment

campaign_idstringRequired

The ID of the campaign

variation_group_idstringRequired

The ID of the variation group

Body
idstringRead-onlyOptional

ID of the variation group

namestringOptional

Name of the variation group

Responses
200

Updated

application/json
idstringRead-onlyOptional

ID of the variation group

namestringOptional

Name of the variation group

patch/accounts/{account_id}/account_environments/{account_environment_id}/campaigns/{campaign_id}/variation_groups/{variation_group_id}
PATCH /v1/accounts/{account_id}/account_environments/{account_environment_id}/campaigns/{campaign_id}/variation_groups/{variation_group_id} HTTP/1.1
Host: api.flagship.io
Authorization: YOUR_API_KEY
Content-Type: application/json
Accept: */*
Content-Length: 614

{
  "name": "text",
  "variations": [
    {
      "name": "text",
      "reference": true,
      "allocation": 1,
      "modifications": {
        "type": "text",
        "value": {}
      }
    }
  ],
  "targeting": {
    "targeting_groups": [
      {
        "targetings": [
          {
            "key": "text",
            "operator": "EQUALS",
            "value": "text"
          }
        ]
      }
    ]
  },
  "allocation_config": {
    "start_date": "2026-01-01T00:00:00.000Z",
    "timezone": "text",
    "start_allocation": 1,
    "periodic_steps": {
      "allocation_step": 1,
      "step": 1,
      "step_type": "day"
    },
    "custom_steps": [
      {
        "allocation_step": 1,
        "step": 1,
        "step_type": "day"
      }
    ],
    "rollback_condition": {
      "goal": {
        "type": "transaction",
        "label": "text",
        "operator": "contains",
        "value": "text"
      },
      "operator": "GREATER_THAN",
      "value": 1,
      "min_visitors": 1
    }
  }
}
{
  "id": "text",
  "name": "text",
  "variations": [
    {
      "id": "text",
      "name": "text",
      "reference": true,
      "allocation": 1,
      "modifications": {
        "type": "text",
        "value": {}
      }
    }
  ],
  "targeting": {
    "targeting_groups": [
      {
        "targetings": [
          {
            "key": "text",
            "operator": "EQUALS",
            "value": "text"
          }
        ]
      }
    ]
  },
  "allocation_config": {
    "start_date": "2026-01-01T00:00:00.000Z",
    "timezone": "text",
    "start_allocation": 1,
    "periodic_steps": {
      "allocation_step": 1,
      "step": 1,
      "step_type": "day"
    },
    "custom_steps": [
      {
        "allocation_step": 1,
        "step": 1,
        "step_type": "day"
      }
    ],
    "rollback_condition": {
      "goal": {
        "type": "transaction",
        "id": "text",
        "label": "text",
        "operator": "contains",
        "value": "text"
      },
      "operator": "GREATER_THAN",
      "value": 1,
      "min_visitors": 1
    }
  }
}

Last updated

Was this helpful?