Update campaign
Replace a campaign's configuration.
Replace a campaign’s configuration. The body shape matches Create campaign — refer to that page for the full field reference and the period / breakdown shapes.
Date format:
testPeriodandcontrolPeriodrequire full ISO 8601 with timezone. Date-only strings are rejected.
Path parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
id | string | yes | 24-character hexadecimal campaign ID |
Body
Same shape as POST /campaign. See that page for every field, validation rule, and breakdown enum.
Example request
PUT https://api.auravisionlabs.com/v1/campaign/64a1b2c3d4e5f6a7b8c9d0e7
Authorization: Bearer <your_token>
Content-Type: application/json
{
"name": "Summer Promotion (revised)",
"metric": { "key": "entries", "display": "Entries" },
"campaignUplift": 0.12,
"taxonomies": [],
"lineTaxonomies": [],
"testLocations": ["64a1b2c3d4e5f6a7b8c9d0e3"],
"testPeriod": {
"selectedPreset": "custom",
"selectedDates": {
"start": "2024-06-01T00:00:00.000Z",
"end": "2024-06-30T23:59:59.999Z"
}
},
"controlPeriod": {
"selectedPreset": "custom",
"selectedDates": {
"start": "2024-05-01T00:00:00.000Z",
"end": "2024-05-31T23:59:59.999Z"
},
"active": true
},
"selectedBreakdowns": [
{ "key": "genders", "values": ["male", "female"] }
]
}
Example response
Returns the updated campaign object — same shape as Get campaign:
{
"id": "64a1b2c3d4e5f6a7b8c9d0e7",
"organisationId": "64a1b2c3d4e5f6a7b8c9d0e2",
"name": "Summer Promotion (revised)",
"campaignUplift": 0.12,
"lastUpdatedById": "12345",
"lastUpdatedByEmail": "user@example.com",
"lastUpdatedByName": "Jane Smith",
"metric": { "key": "entries", "display": "Entries" },
"taxonomies": [],
"lineTaxonomies": [],
"testLocations": ["64a1b2c3d4e5f6a7b8c9d0e3"],
"testPeriod": {
"selectedPreset": "custom",
"selectedDates": { "start": "2024-06-01T00:00:00.000Z", "end": "2024-06-30T23:59:59.999Z" }
},
"controlPeriod": {
"selectedPreset": "custom",
"selectedDates": { "start": "2024-05-01T00:00:00.000Z", "end": "2024-05-31T23:59:59.999Z" },
"active": true
},
"selectedBreakdowns": [{ "key": "genders", "values": ["male", "female"] }],
"created": "2024-04-15T10:30:00.000Z",
"updatedAt": "2024-04-15T10:35:00.000Z"
}
Related
- Create campaign — full field reference
- Get campaign
- Delete campaign