Create a campaign variation
Request URI for Sub Account
POST /accounts/40505/campaigns/7/variations
`}
Request Format
{
"variations": {
"name": "New shiny variation"
}
}
Create a campaign variation
📘 Note
Info
To add changes to the variation, please add changes under the key 'changes'. For e.g. to show an alert in variation
{
"variations" : {
.
.
"changes" : "<script>alert('Hello World');</script>"
.
.
}
}
#OpenAPI definition
{
"openapi": "3.1.0",
"info": {
"title": "api",
"version": "4"
},
"servers": [
{
"url": "https://app.wingify.com/api/v2"
}
],
"components": {
"securitySchemes": {
"sec0": {
"type": "apiKey",
"in": "header",
"name": "token"
}
}
},
"security": [
{
"sec0": []
}
],
"paths": {
"/accounts/{account_id}/campaigns/{campaign_id}/variations": {
"post": {
"summary": "Create a campaign variation",
"description": "",
"operationId": "create-a-campaign-variation",
"parameters": [
{
"name": "account_id",
"in": "path",
"description": "Use 'current' keyword to refer to the Main Workspace or the Integer Workspace Id",
"required": true,
"schema": {
"type": "string",
"default": "current"
}
},
{
"name": "campaign_id",
"in": "path",
"description": "Campaign Id",
"required": true,
"schema": {
"type": "integer",
"format": "int32"
}
}
],
"responses": {
"201": {
"description": "201",
"content": {
"application/json": {
"examples": {
"Result": {
"value": "{\n \"_data\": {\n \"id\": 3,\n \"name\": \"New shiny variation\",\n \"isControl\": false,\n \"isDisabled\": false,\n \"heatmapThumbUrl\": \"<url>\",\n \"screenshots\": {\n \"quick\": \"<url>\"\n },\n \"percentSplit\": 33.3333,\n \"editorData\": {\n \"stack\": null\n }\n }\n}"
}
},
"schema": {
"type": "object",
"properties": {
"_data": {
"type": "object",
"properties": {
"id": {
"type": "integer",
"example": 3,
"default": 0
},
"name": {
"type": "string",
"example": "New shiny variation"
},
"isControl": {
"type": "boolean",
"example": false,
"default": true
},
"isDisabled": {
"type": "boolean",
"example": false,
"default": true
},
"heatmapThumbUrl": {
"type": "string",
"example": "<url>"
},
"screenshots": {
"type": "object",
"properties": {
"quick": {
"type": "string",
"example": "<url>"
}
}
},
"percentSplit": {
"type": "number",
"example": 33.3333,
"default": 0
},
"editorData": {
"type": "object",
"properties": {
"stack": {}
}
}
}
}
}
}
}
}
}
},
"deprecated": false
}
}
},
"x-readme": {
"headers": [],
"explorer-enabled": true,
"proxy-enabled": true
},
"x-readme-fauxas": true
}