Raw schema
{
"type": "object",
"properties": {
"variants": {
"description": "Single-element test: two or more variants. The first is the control.",
"minItems": 2,
"maxItems": 64,
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Shown in stats and in the utm stamp. Defaults to v1, v2, …",
"type": "string",
"minLength": 1
},
"url": {
"description": "Destination for redirect serving.",
"type": "string",
"format": "uri"
},
"image": {
"description": "Image URL, for email variants.",
"type": "string",
"format": "uri"
},
"html": {
"description": "Inline HTML, served by the SDK.",
"type": "string"
},
"markdown": {
"description": "Inline markdown, served by the SDK.",
"type": "string"
},
"text": {
"description": "Inline text, served by the SDK.",
"type": "string"
},
"redirectUrl": {
"description": "Where a click on this variant lands, if it differs per variant.",
"type": "string",
"format": "uri"
}
}
}
},
"slots": {
"description": "Multi-element test: variants per element, keyed by a short name like \"hero\" or \"cta\". The test serves and learns combinations.",
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^[a-z][a-z0-9_-]{0,31}$"
},
"additionalProperties": {
"minItems": 1,
"maxItems": 64,
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"description": "Shown in stats and in the utm stamp. Defaults to v1, v2, …",
"type": "string",
"minLength": 1
},
"url": {
"description": "Destination for redirect serving.",
"type": "string",
"format": "uri"
},
"image": {
"description": "Image URL, for email variants.",
"type": "string",
"format": "uri"
},
"html": {
"description": "Inline HTML, served by the SDK.",
"type": "string"
},
"markdown": {
"description": "Inline markdown, served by the SDK.",
"type": "string"
},
"text": {
"description": "Inline text, served by the SDK.",
"type": "string"
},
"redirectUrl": {
"description": "Where a click on this variant lands, if it differs per variant.",
"type": "string",
"format": "uri"
}
}
}
}
},
"slotRedirects": {
"description": "Where clicks on ONE element land, when elements point at different pages (a hero leading to the campaign landing page, a CTA below it to pricing). Keyed like `slots`. Falls back to `redirectUrl`; a variant's own redirectUrl still wins over both. Setting any of these means every click link must name its slot, which slotLinks does for you.",
"type": "object",
"propertyNames": {
"type": "string",
"pattern": "^[a-z][a-z0-9_-]{0,31}$"
},
"additionalProperties": {
"type": "string",
"format": "uri"
}
},
"name": {
"description": "A label for your own reference, and the one field worth spending a merge tag on in a recurring ESP template: it is part of the test's identity, so n={{campaign_name}} mints a separate, separately readable test per campaign, and the name is what list_tests searches.",
"type": "string",
"minLength": 1
},
"context": {
"description": "Dimensions to learn a separate winner for.",
"maxItems": 8,
"type": "array",
"items": {
"type": "object",
"properties": {
"key": {
"type": "string",
"minLength": 1,
"description": "Dimension name, e.g. country. Becomes ?c_<key>= on serve URLs."
},
"values": {
"description": "Allowed values, when they are enumerable. Anything else is rejected at serving time, which is what stops a crafted URL inventing buckets. It also makes the results readable: bucket keys are one-way hashes, and a declared list is what lets stats recover \"country=nl\" from one. Worth passing even for a `from` dimension, and worth getting right the first time, since `ctx` is inside the test identity and adding values later starts a new test.",
"minItems": 2,
"type": "array",
"items": {
"type": "string",
"minLength": 1
}
},
"from": {
"description": "Fill this dimension from a signal the server derives, so the caller never sends it. Network signals (country, device, …) are guessed from the connection and are suppressed for proxied email fetches; utm_* are read off the link and survive a proxy intact, which makes them the reliable choice for email.",
"type": "string",
"enum": [
"country",
"continent",
"region",
"city",
"timezone",
"device",
"language",
"organization",
"utm_source",
"utm_medium",
"utm_campaign",
"utm_content",
"utm_term"
]
}
},
"required": [
"key"
]
}
},
"redirectUrl": {
"description": "Where clicks land when a variant does not say.",
"type": "string",
"format": "uri"
},
"variantParam": {
"description": "Stamp the served combination into this parameter on redirect, e.g. \"utm_content\", so the test shows up in the customer's own analytics.",
"type": "string",
"minLength": 1,
"maxLength": 32
},
"publishableKey": {
"description": "Registers the new test to the organization identified by a publishable key the user provides for an organization they administer. Result access stays tied to this test's stats secret. Only works on account-enabled deployments; elsewhere a warning says so and the test still works.",
"type": "string",
"pattern": "^pk_[a-z0-9]{24}$"
},
"region": {
"description": "Where the test's state lives. A placement hint (wnam, enam, sam, weur, eeur, apac, oc, afr, me) or \"eu\" for the EU jurisdiction (state guaranteed created and kept inside the EU). Defaults to the creator's own region when the host can tell; without any, state is born wherever the FIRST request comes from, which in email is routinely a mail provider's US datacenter.",
"type": "string",
"enum": [
"wnam",
"enam",
"sam",
"weur",
"eeur",
"apac",
"oc",
"afr",
"me",
"eu"
]
}
},
"$schema": "http://json-schema.org/draft-07/schema#"
}