Update Desk Org Settings
PUT /desk/org-settings
Update org-level desk settings. PARTIAL - unset fields are untouched.
Requires settings:write, declared on this route because the app’s own
gate is a Depends-defaulted PARAMETER of the handler and a direct call
resolves nothing.
THIS IS THE ORG’S ON SWITCH, AND ITS SPEND CAPS. Saving here registers the
org on the desk worker’s poll list - and saving every decision off
unregisters it - so this one call starts or stops the desk producing work
for the whole organisation. It also carries max_auto_account_plans_per_day,
max_account_replans_per_day and max_skill_plans_per_day, which are
daily caps on CHARGED model calls, and desk_acts_on_signals,
desk_drafts_with_ai and stalled_deal_send_email, which let the desk act
and email on its own. A plain write would make raising an org’s spend cap
the same grant as renaming a record.
400 with the reason on anything the settings validator refuses, including an empty body - “no settings provided” is an error here rather than a silent no-op.
Authorizations
Parameters
Header Parameters
Request Body required
Org-level desk settings. PARTIAL - an unset field is left untouched.
Mirrors desk.interfaces.fastapi.dtos.DeskOrgSettingsUpdate field for
field, pinned by test, because it is constructed inside the proxy.
THREE KINDS OF FIELD LIVE HERE AND THEY ARE NOT EQUALLY QUIET
Most are thresholds and ids. But max_auto_account_plans_per_day,
max_account_replans_per_day, max_skill_plans_per_day and
max_ai_reads_per_day are the org’s DAILY SPEND CAPS on charged model
calls, and desk_acts_on_signals, desk_drafts_with_ai,
desk_ai_card_reads, desk_writes_deal_plans, reps_may_fire_workflows
and stalled_deal_send_email are the switches that let the desk act - and
email - on its own. That is why this operation is not tiered a plain
write; see the router docstring.
Every value is validated by the app’s own validated_payload() and
save_desk_org_settings, which answer 400 with the reason. This surface
does not second-guess either.
object
object
Per-signal policy override. Mirrors the app’s DeskSignalPolicyUpdate.
Open (extra="allow") rather than pinned: this nests inside a JSONB
settings blob the desk extends per signal family, and a closed mirror would
reject a key the app has just learned to read.
object
Responses
200
Successful Response
object
An open envelope for one desk object.
Open on purpose - see the module docstring. A rebuilder gets every field the desk returns, including ones added after this contract version.
object
object
Whether there are more pages
Items per page
Current page number (1-indexed)
Total number of items
422
Validation Error