Creators

Switch creators to another campaign

Ends the creators' shared current campaign assignment after the chosen billing period — or on a day inside one, with endBasis: "today" or a custom endDate (that period is cut to the end day and due the day after) — and assigns them to the target campaign starting after it, atomically. All creators must share the same current campaign; the new start must lie after the chosen end. An end on or before the assignment start clears the current assignment entirely instead of ending it.

post/creators/campaigns/switch

Request

  • Base URL: https://viral.app/api/v1
  • URL: https://viral.app/api/v1/creators/campaigns/switch
  • Auth: API key in header x-api-key

Request body

creatorIdsstring[] required
campaignIdstring required
endBasis'prev' | 'current' | 'next' | 'custom' | 'today' required
endDatestring date
startBasis'prev' | 'current' | 'next' | 'custom' | 'today' required
startDatestring date
customRatesPreviewHashstring

The previewHash the custom-rates dry-run (mode merge) returned. When present, custom rates that differ are refused (CUSTOM_RATES_PREVIEW_MISMATCH).

Example request

{
  "customRates": {
    "videoTarget": 15,
    "videoTargetPlatforms": {
      "tiktok": 20
    },
    "values": [
      {
        "id": "rule_A1b2C3d4E5f6",
        "value": 12
      }
    ]
  }
}

Response

OK

updatedinteger required

Changes

No recorded changes to this operation across all 1 revision of this API.