Skip to content

Apply Account Plan

POST
/desk/accounts/{account_id}/plan/apply

Persist the approved steps as a NEW plan version, and return the diff.

proposed_plan must be non-empty. Apply REPLACES the account’s steps, so an empty proposal would blank an active plan; the app answers 400 rather than doing it. Prior versions stay immutable and readable.

Authorizations

Parameters

Path Parameters

account_id
required

The account’s mashup company id (cb_account_plans.account_id).

integer
>= 1

The account’s mashup company id (cb_account_plans.account_id).

Header Parameters

X-Target-Org-Id
Any of:
string

Request Body required

Persist the approved steps as a NEW plan version.

proposed_plan must be non-empty: apply REPLACES the account’s steps, so an empty proposal would blank the plan. The app answers 400 rather than doing it, and this surface forwards that rather than second-guessing it.

object
instruction
Any of:
string
proposed_plan
Array<object>

One step in a plan: who to reach, on what channel, when, and why now.

extra="allow" mirrors the app’s own model, which is also open - the step shape carries per-channel extras the desk adds as it learns new channels, and a closed mirror would DROP them on the way in rather than pass them through.

approval_status is closed because it reaches a real Literal inside the handler: a free value would raise there and escape as a 500 instead of a 422 naming the four states.

object
approval_status
string
default: pending
Allowed values: pending approved rejected edited
channel
Any of:
string
contact_id
Any of:
draft_content
Any of:
string
scheduled_at
Any of:
string
status
Any of:
string
step_id
required

Caller-assigned id, stable across versions.

string
why_now
Any of:
string
key
additional properties
any
rationale
Any of:
string
status
Any of:
string
trigger

What caused this (re)plan.

string
default: manual

Responses

200

Successful Response

object
data
required

An open envelope for a plan, a context read or a committee result.

object
key
additional properties
any
pagination
Any of:
object
has_next
required

Whether there are more pages

boolean
limit
required

Items per page

integer
next_cursor
Any of:
string
notes
Any of:
Array<string>
page
required

Current page number (1-indexed)

integer
total
required

Total number of items

integer
total_available
Any of:
integer
total_is_lower_bound
Any of:
boolean

422

Validation Error

object
detail
Array<object>
object
loc
required
Array
msg
required
string
type
required
string