Swap a creator

Replace one line of a plan awaiting approval (line_id from plan_quote) with another creator's format (unit_id from creators_search or creator_get) at its current all-in price, in one step: both happen or neither does, so the plan is never left with both creators or with none. The plan's total after the swap must fit the key's mandate and the campaign's budget: a creator at or under the removed creator's price always swaps in, a dearer one that would go over the budget is refused (conflict, reason over_budget, budget_cents, remaining_cents). A creator already on the plan is refused (already_in_plan); to change a creator's format, remove the line and add the format. Returns the new line_id, the removed_line_id and the plan as plan_quote returns it. Needs an idempotency_key. Scope: campaigns:write. MCP tool: plan_swap_creator.

post/plans/{id}/lines/{line_id}/swap

Request

  • Base URL: https://app.distribution.tech/api/v1
  • URL: https://app.distribution.tech/api/v1/plans/{id}/lines/{line_id}/swap
  • Auth: HTTP bearer

Path parameters

idstring uuid required
line_idstring uuid required

Headers

Idempotency-Keystring required

8 to 128 letters, digits or . _ : -. Retry with the same key and the same request to get the same answer; it never runs twice.

Request body

unit_idstring uuid required

A format's unit_id from /creators.

Response

OK

line_idstring uuid required
removed_line_idstring uuid required

Changes

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