# campaign

## abtasty-cli feature-experimentation campaign create

#### NAME

`abtasty-cli feature-experimentation campaign create` - Create a campaign

#### SYNOPSIS

`abtasty-cli feature-experimentation campaign create [-d DATA_RAW | --data-raw=DATA_RAW ]`

#### DESCRIPTION

Create a campaign in your account

#### EXAMPLES

{% hint style="warning" %}
🚧 Fill the project\_id

Make sure to fill the correct project\_id for the example
{% endhint %}

```shell
abtasty-cli feature-experimentation campaign create -d DATA_RAW
```

```shell
abtasty-cli feature-experimentation campaign create -d "{\"project_id\":\"<PROJECT_ID>\",\"name\":\"test_campaign\",\"description\":\"<DESCRIPTION>\",\"type\":\"ab\",\"variation_groups\":[{\"variations\":[{\"name\":\"VARIATION_NAME\",\"allocation\":50,\"reference\":true}]}]}"
```

```shell
abtasty-cli feature-experimentation campaign create -d "{\"project_id\":\"<PROJECT_ID>\",\"name\":\"test_campaign\",\"description\":\"<DESCRIPTION>\",\"type\":\"ab\",\"variation_groups\":[{\"variations\":[{\"name\":\"VARIATION_NAME\",\"allocation\":50,\"reference\":true,\"modifications\":{\"value\":{\"color\":\"blue\"}}},{\"name\":\"VARIATION_NAME1\",\"allocation\":50,\"reference\":false,\"modifications\":{\"value\":{\"color\":\"red\"}}}],\"targeting\":{\"targeting_groups\":[{\"targetings\":[{\"operator\":\"CONTAINS\",\"key\":\"TARGETING_KEY\",\"value\":\"TARGETING_KEY_VALUE\"}]}]}}],\"scheduler\":{\"start_date\":\"2023-04-01 10:00:00\",\"stop_date\":\"2024-01-01 08:00:00\",\"timezone\":\"Europe/Paris\"},\"primary_goal\":{\"type\":\"event\",\"label\":\"GOAL_LABEL_PRIM\"},\"secondary_goals\":[{\"type\":\"event\",\"label\":\"GOAL_LABEL_SEC\"}]}"
```

#### REQUIRED FLAGS

`--data-raw = _DATA_RAW_`

The raw data contains all the info to create your campaign, check the [Remote Control API documentation](/server-side/remote-control-api.md) for more details (Check also Shell - Example)

{% hint style="danger" %}
❗️ Raw data format

Note that you should insert data without spaces, line breaks, tabulation etc...
{% endhint %}

***

## abtasty-cli feature-experimentation campaign list

#### NAME

`abtasty-cli feature-experimentation campaign list` - List all campaigns

#### SYNOPSIS

`abtasty-cli feature-experimentation campaign list \[--output-format = OUTPUT_FORMAT [table|json|json-pretty]]`

#### DESCRIPTION

List all campaigns in your account

#### EXAMPLES

```shell
abtasty-cli feature-experimentation campaign list
```

#### FLAGS

`--output-format = _OUTPUT_FORMAT_`

The output format for printing command output resources. The default is table. The supported formats are: json-pretty, table, json.

***

## abtasty-cli feature-experimentation campaign get

#### NAME

`abtasty-cli feature-experimentation campaign get` - Get a campaign

#### SYNOPSIS

`abtasty-cli feature-experimentation campaign get [-i CAMPAIGN_ID | --id = CAMPAIGN_ID]`

#### DESCRIPTION

Get a campaign in your project

#### EXAMPLES

```shell
abtasty-cli feature-experimentation campaign get -i CAMPAIGN_ID
```

#### REQUIRED FLAGS

`--id = _CAMPAIGN_ID_`

The id of the campaign you want to display

#### FLAGS

`--output-format _OUTPUT_FORMAT_`

The output format for printing command output resources. The default is table. The supported formats are: json-pretty, table, json.

***

## abtasty-cli feature-experimentation campaign edit

#### NAME

`abtasty-cli feature-experimentation campaign edit` - Edit a campaign

#### SYNOPSIS

`abtasty-cli feature-experimentation campaign edit [-i CAMPAIGN_ID | --id = CAMPAIGN_ID] [-d DATA_RAW | --data-raw=DATA_RAW ]`

#### DESCRIPTION

Edit a campaign in your project

#### EXAMPLES

```shell
abtasty-cli feature-experimentation campaign edit -i CAMPAIGN_ID -d DATA_RAW
```

#### REQUIRED FLAGS

`--id = _CAMPAIGN_ID_`

The id of the campaign you want to edit

`--data-raw = _DATA_RAW_`

The raw data contains all the info to edit your campaign, check the [Remote Control API documentation](/server-side/remote-control-api.md) for details

{% hint style="danger" %}
❗️ Raw data format

Note that you should insert data without spaces, line breaks, tabulation etc...
{% endhint %}

***

## abtasty-cli feature-experimentation campaign delete

#### NAME

`abtasty-cli feature-experimentation campaign delete` - Delete a campaign

#### SYNOPSIS

`abtasty-cli feature-experimentation campaign delete [-i CAMPAIGN_ID | --id = CAMPAIGN_ID]`

#### DESCRIPTION

Delete a campaign in your project

#### EXAMPLES

```shell
abtasty-cli feature-experimentation campaign delete -i CAMPAIGN_ID
```

#### REQUIRED FLAGS

`--id = _CAMPAIGN_ID_`

The id of the campaign you want to delete

***

## abtasty-cli feature-experimentation campaign switch

#### NAME

`abtasty-cli feature-experimentation campaign switch` - Switch a campaign status

#### SYNOPSIS

`abtasty-cli feature-experimentation campaign switch [-i CAMPAIGN_ID | --id = CAMPAIGN_ID] \[-s STATUS | --status = STATUS [active, paused, interrupted]]`

#### DESCRIPTION

Switch a campaign status in your project

#### EXAMPLES

```shell
abtasty-cli feature-experimentation campaign switch -i CAMPAIGN_ID -s STATUS
```

#### REQUIRED FLAGS

`--id = _CAMPAIGN_ID_`

The id of the campaign you want to change status

`--status = _STATUS_`

The status you want to set to the campaign. Only 3 values are possible: active, paused, and interrupted


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.abtasty.com/server-side/command-line-interface/ab-tasty-cli-reference-v1xx/feature-experimentation/feature-experimentation-campaign.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
