notifications
GET /v1/sites/{site_id}/notification-channels
Which channels this site's notifications go to.
身份验证
请将 API 密钥作为 bearer 令牌发送。此端点在规范中未指明具体的权限,因此请为您的密钥赋予所需的最小权限,并通过检查响应来确认,而不是盲目假设。
您的组织 ID 应填在此处
此端点将 org_id 作为查询参数。不填则调用涵盖您的整个租户子树;发送该参数则将调用范围缩小到一个组织。
您的组织ID位于控制面板的API密钥屏幕上,就在密钥本身的旁边。这是您在每次调用时使用的相同ID。
免费试用
将尖括号中的内容替换为您自己的值,并将键占位符替换为您仪表板中的一个键。
curl -X GET https://api.zinndigital.com/v1/sites/{site_id}/notification-channels \
-H "Authorization: Bearer zdk_live_…"已登录?您仪表板中的 API 控制台会自动填入您真实的组织 ID 和您自己的密钥,并针对实时 API 运行请求,以便您查看实际的响应。 在 API 控制台中打开此端点
详细信息
The destinations this site routes to, plus whether e-mail is currently being sent. The response carries BOTH what the customer asked for (email_muted) and what is actually happening (email_active, email_reason), and they can differ. E-mail may be switched off only while another channel is connected and healthy; if every alternative goes bad, e-mail resumes on its own and overriding_choice is true. A client that rendered only the stored flag would show a toggle that disagrees with the customer's inbox - which is the exact failure this feature exists to prevent, because the notification telling you Slack has died would otherwise go to Slack.
参数
| 名称 | 类型 | 必填 | 内容简介 |
|---|---|---|---|
site_id (path) | string | 是 | — |
org_id (query) | string | 否 | The organization to act on. Omitted resolves to your own ONLY when you belong to exactly one organisation; a principal in more than one must name it. A reseller managing a client… |
响应
| 名称 | 类型 | 必填 | 内容简介 |
|---|---|---|---|
site_id | string | 是 | — |
channels | SiteNotificationChannel[] | 是 | — |
email_muted | boolean | 是 | What the customer ASKED for. Not necessarily what is happening. |
email_active | boolean | 是 | Whether e-mail is actually being sent right now. Computed at send time from the live health of the other channels, never read from a stored flag. |
email_reason | string<not_muted, muted, alternatives_failing, no_alternative, unreadable> | 是 | Why. not_muted - the customer never turned it off. muted - off, as asked, with a healthy alternative. alternatives_failing - back ON because their other channels have… |
healthy_alternatives | integer | 否 | How many non-e-mail destinations this site routes to are delivering. |
overriding_choice | boolean | 否 | True when e-mail is being sent DESPITE the customer having muted it. This is the state a screen must explain, or the toggle appears broken. |