---
title: "Set a creator's custom rates"
method: PUT
path: "/campaigns/{id}/custom-rates/{creatorId}"
tags: ["Creators"]
---

# Set a creator's custom rates

`PUT /campaigns/{id}/custom-rates/{creatorId}`

## Request

- Base URL: `https://viral.app/api/v1`
- URL: `https://viral.app/api/v1/campaigns/{id}/custom-rates/{creatorId}`
- Auth: API key in header `x-api-key`

Replaces one creator's custom values on the campaign with the given set: per-video and CPM rates, bonus amounts, the fixed salary, caps and the video target, each naming a payout of the campaign spec by id. An empty set resets them, so the creator follows the campaign. Values equal to the campaign's are not kept. New values apply to every unpaid period of the creator at once; paid payouts keep their snapshots.

## Path parameters

- `id` string, required: Campaign ID with orgcamp_ prefix
- `creatorId` string, required: Organization creator ID with orgcre_ prefix

## Request body

- object: Replaces the creator's custom values on the campaign with this set. An empty set resets them: the creator follows the campaign again.
  - `previewHash` string: The previewHash the dry-run returned for these values. When present, a write that differs is refused (CUSTOM_RATES_PREVIEW_MISMATCH).
  - `videoTarget` integer, nullable: The creator's own video target per cycle, in the campaign's unit (videos or creatives; per-platform campaigns use videoTargetPlatforms). Setting replaces their set (PUT): omitted or null follows the campaign's. Assigning merges: omitted or null keeps what they have, the campaign's own value resets it. A base payout capped at the campaign target is capped at this one instead.
  - `videoTargetPlatforms` object, nullable: For a campaign whose video target counts per platform: the creator's own count per platform (only the campaign's platforms; one left out follows the campaign's), with the same replace and merge rules as videoTarget. E.g. {"tiktok": 20}.
  - `values` object[]: The creator's custom values. A payout left out pays the campaign's value.
    - `id` string, required: The payout's id from the campaign spec: a base payout, a CPM or bonus tier, the fixed salary or the performance cap.
    - `field` 'perVideo' | 'videoCap' | 'amountCap' | 'rate' | 'amount', required: perVideo, videoCap or amountCap on a base payout; rate on a CPM tier; amount on a bonus tier, the fixed salary or the performance cap.
    - `value` number, required: Major units of the campaign currency (a video count for videoCap). 0 switches that payout off for the creator; caps stay above 0.

## Response `200`

OK

- object: One creator's custom rates on a campaign, value by value.
  - `campaignId` string, required: Campaign ID with orgcamp_ prefix
  - `campaignName` string, required
  - `creator` object, required
    - `id` string, required: Organization creator ID with orgcre_ prefix
    - `userId` string, required: User ID with user_ prefix
    - `name` string, nullable, required
    - `email` string, required
    - `image` string, nullable, required
    - `archived` boolean, required
  - `currency` string, required
  - `unavailableReason` string, nullable, required
  - `rows` object[], required
    - `key` string, required
    - `id` string, nullable, required: The payout's id; null for the video target.
    - `field` 'perVideo' | 'videoCap' | 'amountCap' | 'rate' | 'amount' | 'videoTarget', required
    - `platform` 'tiktok' | 'instagram' | 'youtube' | 'facebook' | 'snapchat': A per-platform target's row: the platform its count is for.
    - `countNoun` string: What a count row counts (video by default).
    - `group` string, required
    - `label` string, required
    - `unit` 'money' | 'rate' | 'count', required
    - `unitLabel` string, required
    - `campaignValue` number, required
    - `customValue` number, nullable, required
    - `allowsZero` boolean, required
  - `customRates` object, required: A creator's custom values on a campaign.
    - `videoTarget` integer, nullable, required: The creator's own video target per cycle, in the campaign's unit; null when they follow the campaign's (and on a per-platform target, see videoTargetPlatforms).
    - `videoTargetPlatforms` object, nullable, required: A per-platform target: the creator's own count per platform (platforms left out follow the campaign's); null when they have none.
    - `values` object[], required
      - `id` string, required: The payout's id in the campaign spec.
      - `field` 'perVideo' | 'videoCap' | 'amountCap' | 'rate' | 'amount', required
      - `value` number, required: Major units (a video count for videoCap). 0 = that payout is off for the creator.
  - `hasCustomRates` boolean, required

## Other responses

- `400`: 400
- `401`: 401
- `402`: 402
- `404`: 404
- `408`: 408
- `409`: 409
- `429`: 429
- `500`: 500

---

[API](https://skmtc.dev/viral/apis/viral-app-api.md) · [All operations](https://skmtc.dev/viral/apis/viral-app-api/llms.txt) · [OpenAPI document](https://skmtc.dev/viral/apis/viral-app-api/revisions/31e97fa79ef1?raw)
