The availability of features may depend on your plan type. Contact your Customer Success Manager if you have any questions.
Dev guideRecipesAPI ReferenceChangelog
Dev guideAPI ReferenceRecipesChangelogUser GuideGitHubDev CommunityOptimizely AcademySubmit a ticketLog In
API Reference

Create a Campaign

Create a new Campaign in your account

Query Params
string
enum

Action to change the state of the Campaign. 'publish' publishes your campaign, making any changes live to the world. Status will be 'paused'. 'start' publishes your campaign, making any changes live to the world. Status will be 'running'.

Allowed:
Body Params

A string in JSON format that includes all the fields to create a Project

boolean
Defaults to false

Whether the Campaign has been archived

changes
array of objects

A list of changes to apply to the Campaign. This corresponds to the Campaign's Shared Code in the application. Only supports 'custom_css' or 'custom_code' type changes.

changes
string

The description or goal for a Campaign

experiment_priorities
array of arrays of int64s

A list of lists of Experiment IDs that indicate the relative priority of how to show those Experiments in the context of the Campaign. Each list inside of the list represents a group of Experiments of equal priority where groups that appear earlier in the list are of higher priority to be shown.

experiment_priorities
boolean
Defaults to false

Whether the Campaign has been part of journey or not

integer
0 to 10000

Percentage of visitors to exclude from personalization, measured in basis points. 100 basis points = 1% traffic. For example, a value of 500 would mean that 95% of visitors will see a personalized experience and 5% will see the holdback.

string

The journey this campaign is associated with, or null if not set

metrics
array of objects

An ordered list of metrics to track for the Campaign

metrics
string

The name of the Campaign

page_ids
array of int64s

A list of Page IDs used in the Campaign

page_ids
int64
required

The Project ID the Campaign is in

string
enum
Defaults to personalization

Indicates the type of this campaign. Campaigns created or fetched via the API should currently all have a type of personalization, but if you get a campaign_id for an experiment and look it up, you may get an other value.

Allowed:
url_targeting
object
Responses

Language
Credentials
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json