---
title: "Update Gtm Agent Desk"
method: PATCH
path: "/gtm-internal/accounts/{org_id}/domains/{domain_id}/agent-desk"
tags: ["gtm-internal"]
---

# Update Gtm Agent Desk

`PATCH /gtm-internal/accounts/{org_id}/domains/{domain_id}/agent-desk`

## Request

- Base URL: `https://api-v1.unusual.ai` (the document declares no server; this is the origin it was published from)
- URL: `https://api-v1.unusual.ai/gtm-internal/accounts/{org_id}/domains/{domain_id}/agent-desk`
- Auth: OAuth 2
  - Password
  - Token URL: `/auth/login`

Flip desk switches for one domain, and return the whole recomputed panel.

Returning the panel (not just the changed field) is what lets the UI show the
SERVER's state rather than the click's intent — these toggles change what a
live public desk does, and an optimistic flip that silently failed would
leave the panel lying about a customer's desk.

Refuses to CREATE a desk (404): a missing desk row means this domain was
never provisioned for AgentDesk, and one conjured from a toggle would have no
slug convention, no offerings and no prompt. Refuses an unknown
`retrieval_mode` (400): nothing downstream would error on it — `desk_reads_index`
reads anything unrecognised as "exa" — so the desk would keep using Exa while
the column and this panel both claimed otherwise.

## Path parameters

- `org_id` string, required
- `domain_id` string, required

## Request body

- DeskConfigUpdateRequest: Every field Optional and applied only when present. A PATCH that defaulted its fields would turn "set retrieval_mode" into "set retrieval_mode and disable answer pages", which on a live public desk is a silent outage nobody would connect to the click. Absent means untouched — enforced by handing `exclude_unset` to the shared writer.
  - `enabled` boolean, nullable
  - `post_enabled` boolean, nullable
  - `answer_pages_enabled` boolean, nullable
  - `retrieval_mode` string, nullable
  - `knowledge_auto_update` string, nullable
  - `index_on_google` boolean, nullable
  - `index_on_bing` boolean, nullable

## Response `200`

Successful Response

- DeskConfigOut
  - `exists` boolean
  - `domain_id` string, required
  - `host` string, nullable
  - `desk_id` string, nullable
  - `slug` string, nullable
  - `enabled` boolean
  - `post_enabled` boolean
  - `answer_pages_enabled` boolean
  - `retrieval_mode` string
  - `knowledge_auto_update` string
  - `knowledge_auto_update_effective` string
  - `auto_activations_per_day` integer
  - `daily_answer_limit` integer, nullable
  - `index_ingest_enabled` boolean
  - `index_on_google` boolean
  - `index_on_bing` boolean
  - `crawl` DeskCrawlSummaryOut: The crawl-ledger summary the panel's middle block renders.
    - `page_count` integer
    - `indexed_count` integer
    - `excluded_count` integer
    - `pinned_count` integer
    - `changed_since_knowledge` integer
    - `tier_counts` object
    - `last_crawl_at` string, nullable
    - `last_crawl_stats` object, nullable
    - `discovery_warning` object, nullable
    - `cadence_days` object
  - `knowledge` DeskKnowledgeOut: The ACTIVE Knowledge Document, read-only on this surface. Read-only because editing and activating it is a customer act on their own Knowledge tab; a second writer to a version-controlled document with different rules is how version histories stop meaning anything.
    - `exists` boolean
    - `active_version_number` integer, nullable
    - `activated_at` string, nullable
    - `changed_by` string, nullable
    - `source` string, nullable
    - `markdown` string, nullable
    - `proposed_version_count` integer
    - `last_auto_activation` object, nullable
    - `bootstrap_proposal_count` integer
    - `customer_tab_path` string
  - `notifications` DeskNotificationsOut: AGENTDESK-OB(PR-J), D19 — the customer's notification lanes, READ-ONLY. On the staff panel because "request a Slack support channel" is fulfilled by a HUMAN through the existing Connect flow (D19 builds no automation), so the request has to be visible where staff look at an account — otherwise it dies in a Slack scrollback. The webhook fields answer the question that follows: is this customer being notified at all? ``webhook_hint`` is the stored masked display string. The URL itself never crosses this boundary, and nothing here is writable.
    - `webhook_lane` string
    - `webhook_hint` string, nullable
    - `webhook_disabled_reason` string, nullable
    - `webhook_last_delivered_at` string, nullable
    - `support_channel_requested` boolean
    - `weekly_digest_fallback` boolean
    - `desk_conversation_cadence` string
    - `weekly_slack_recap` boolean

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/unusual/apis/dashboard-server.md) - [All operations](https://skmtc.dev/unusual/apis/dashboard-server/llms.txt) - [OpenAPI document](https://skmtc.dev/unusual/apis/dashboard-server/revisions/89f716930ead?raw)
