Update a campaign
Updates a campaign from a partial spec: name, description, videoTarget, briefId and the schedule keys replace only what is present, payouts replaces the whole block. The payout rules are re-derived from the merged spec whenever the payouts sent differ from the current ones, or videoTarget or currency change (a rename, or the current payouts sent back unchanged, leaves them untouched) and apply to all unpaid billing windows immediately; issued payouts keep their stored snapshots. currency and the schedule are editable only while the campaign has no creator assignments or payout history (CAMPAIGN_FIELD_LOCKED otherwise; echoing the current value passes); the end date is managed by the end/reactivate endpoints. Dry-run with POST /campaigns/validate and an id to see which sentences would change.
Request
- Base URL: https://viral.app/api/v1
- URL: https://viral.app/api/v1/campaigns/{id}
- Auth: API key in header x-api-key
Path parameters
Campaign ID with orgcamp_ prefix
Request body
Example request
{
"name": "Updated Creator Rate",
"description": "Updated notes"
}Response
OK
Example response
{
"id": "orgcamp_RwmraAffhMt9",
"timeZone": "UTC",
"videoTargetUnit": "videos",
"status": "active",
"spec": {
"currency": "USD",
"schedule": {
"interval": "month",
"intervalCount": 1,
"anchor": "rolling",
"startsOn": "2026-10-01",
"timeZone": "UTC"
},
"videoTarget": 30,
"videoTargetUnit": "videos",
"briefId": "orgbrief_RwmraAffhMt9",
"payouts": {
"fixedSalary": {
"id": "rule_A1b2C3d4E5f6"
},
"basePayouts": [
{
"id": "rule_A1b2C3d4E5f6",
"perVideo": 10,
"steps": [
{
"id": "rule_A1b2C3d4E5f6",
"perVideo": 45
}
],
"minViews": 1000,
"platforms": [
"tiktok",
"instagram"
],
"conditions": {
"match": "all",
"items": [
{
"field": "contentType",
"operator": "is",
"values": [
"slideshow"
]
},
{
"field": "views",
"operator": "atLeast",
"value": 10000
}
]
},
"scope": "per_creative",
"creatives": "once"
}
],
"cpmPayouts": [
{
"scope": "per_video",
"creatives": "bestInWindow",
"platforms": [
"tiktok",
"instagram"
],
"conditions": {
"match": "all",
"items": [
{
"field": "contentType",
"operator": "is",
"values": [
"slideshow"
]
},
{
"field": "views",
"operator": "atLeast",
"value": 10000
}
]
},
"tiers": [
{
"id": "rule_A1b2C3d4E5f6",
"to": 100000,
"rate": 1
}
]
}
],
"flatBonuses": [
{
"scope": "per_video",
"creatives": "bestInWindow",
"mode": "highest",
"platforms": [
"tiktok",
"instagram"
],
"conditions": {
"match": "all",
"items": [
{
"field": "contentType",
"operator": "is",
"values": [
"slideshow"
]
},
{
"field": "views",
"operator": "atLeast",
"value": 10000
}
]
},
"tiers": [
{
"id": "rule_A1b2C3d4E5f6",
"to": 100000,
"amount": 50
}
]
}
],
"baseCap": {
"id": "rule_A1b2C3d4E5f6"
},
"performanceCap": {
"id": "rule_A1b2C3d4E5f6"
},
"eligibility": {
"windowDays": 31,
"publicationScope": "include_earlier"
}
}
},
"brief": {
"id": "orgbrief_RwmraAffhMt9"
},
"warnings": [
{
"accounts": [
{
"platform": "facebook",
"platformAccountId": "7123456789012345678"
}
]
}
]
}Changes
No recorded changes to this operation across all 1 revision of this API.