name or attributions — a call with neither has
nothing to update.
attributions is the plan’s whole membership, not an addition to it:
whoever the list leaves out is taken off the plan. Read the plan with
get_plan first and send back every
membership to keep, or the ones missing from your list are removed. Omitting
the argument leaves the membership untouched, so a rename alone is safe;
passing an empty list clears the plan. Declaring a membership that already
matches changes nothing, so the same call can be sent twice.
Only what actually changed comes back in attribution_changes, each row
saying whether it was created, moved, or removed.
On the live environment, changing a membership triggers a statement refresh
for every user it affects — their statements move to NEED_REFRESH and are
recalculated in the background. A call that changes nothing triggers no
refresh, and a sandbox write causes none either.
Available only where the Qobra write tools beta is enabled. Every write to
the live environment is recorded in the audit trail as the Qobra MCP agent;
writes to a sandbox are not audited.
Parameters
Body
Body
string
required
Id of the plan to update — the id list_plans returns. The plan also
decides which environment the attributions land in, so there is no
sandbox argument here.
string
New display name for the plan. Omit to leave the current name as it is.
object[]
Who the plan attributes, as the complete list — every user and group on
it, each with the months they are on it for. This replaces the plan’s
membership rather than adding to it: anyone missing from the list is
taken off the plan. Omit the argument to leave the membership untouched;
pass an empty list to clear it. Send one row per continuous stretch,
with no month covered twice for the same user or group.
Response
Body
Body
object
The plan as it now stands after the update.
object[]
Every membership the call actually changed — created, moved, or removed
because the declared list no longer held it. Empty when the call only
renamed the plan, and empty when the declared membership already
matched what the plan had, which is how a repeated call reads as the
no-op it was.