---
title: "Set Desk Notification Webhook"
method: PUT
path: "/api/domains/{domain_id}/notifications/webhook"
tags: ["domains"]
---

# Set Desk Notification Webhook

`PUT /api/domains/{domain_id}/notifications/webhook`

## 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/api/domains/{domain_id}/notifications/webhook`
- Auth: OAuth 2
  - Password
  - Token URL: `/auth/login`

Save (and enable) the desk's Slack incoming webhook.

Validation is the SSRF gate — https, ``hooks.slack.com``, ``/services/`` path
— and its message is written for the customer, so it is returned verbatim as
the 400 detail. See ``agent_desk/webhook_secret.py`` for why the allowlist is
one host wide.

## Path parameters

- `domain_id` string, required

## Headers

- `x-view-as` string, nullable

## Request body

- SetDeskWebhookRequest
  - `webhook_url` string, required

## Response `200`

Successful Response

- DeskNotificationStateResponse: Row-6 state + everything the settings UI needs. Carries NO secret: only ``webhook_configured`` and the masked ``webhook_hint``. The ``app_*`` quartet (2026-08-11) is the self-serve Slack app install — composed in the route from ``slack_installation``, NOT inside ``notifications.notification_row_state`` (which stays a pure function of the config JSONB). A connected app completes the row the same way a delivering webhook does.
  - `complete` boolean, required
  - `webhook_configured` boolean
  - `webhook_enabled` boolean
  - `webhook_hint` string, nullable
  - `webhook_unreadable` boolean
  - `webhook_failure_count` integer
  - `webhook_disabled_reason` string, nullable
  - `webhook_last_delivered_at` string, nullable
  - `support_channel_requested` boolean
  - `digest_fallback` boolean
  - `lane_available` boolean
  - `email_digest_enabled` boolean
  - `app_available` boolean
  - `app_connected` boolean
  - `app_team_name` string, nullable
  - `app_channel_label` string, nullable
  - `app_token_unreadable` 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)
