notifications
PUT /v1/sites/{site_id}/notification-channels
Replace this site's notification channels.
Санҷиши ҳаққоният
Kalitи API-ро ҳамчун token-и bearer фиристед. Ин нуқтаи ниҳоӣ дар мушаххасот иҷозати мушаххасеро нишон намедиҳад, бинобар ин ба калиди худ ҳадди ақали заруриро диҳед ва ба ҷои тахмин кардан, ҷавобро санҷед.
Ҷое, ки рақами мушаххаси ташкилоти шумо ҷойгир аст
Ин нуқтаи поёнӣ org_id-ро ҳамчун параметри дархостӣ қабул мекунад. Онро хориҷ кунед ва даъват тамоми зердарахти иҷораи шуморо фаро мегирад; барои маҳдуд кардани даъват ба як созмон онро фиристед.
Rakami муайянкунандаи ташкилоти шумо дар экрани калидҳои API дар панели идоракунии шумо, дар паҳлӯи худи калид ҷойгир аст. Ин як раками муайянкунанда дар ҳар یک дархосте, ки шумо иҷро мекунед, якхела аст.
Санҷидан
Ҳар чизро дар қаavски кунҷӣ бо қиматҳои худ ва ҷойи нигоҳдорандаи калидро бо калима аз панели идоракунии худ иваз кунед.
curl -X PUT https://api.zinndigital.com/v1/sites/{site_id}/notification-channels \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "channels": <SiteNotificationChannel[]> }'Воarid шудаед? Консоли API дар панели идоракунии шумо рақами мушаххаси ташкилоти воқеӣ ва калиди худро пур мекунад ва дархостро бар зидди API-и фаъол иҷро мекунад, то шумо посухи воқеиро бубинед. Ин нуқтаи ниҳоиро дар консоли API кушоед
Тафсилот
The COMPLETE desired routing, sent as one document. A channel absent from the list is one the customer removed - a POST-only surface could not express removal, and the screen is a matrix the customer edits in several places before pressing save once. Refused 422 when email_muted is true and no listed destination is a non-e-mail channel that is verified and delivering. The check runs against the routing you are ABOUT to save, not the current one, so "connect Slack and turn e-mail off" works in a single request. It is refused at the point of asking rather than accepted and ignored: a toggle that accepts a value it will not honour reads as a broken setting.
Параметрҳо
| Ном | Намуд | Талаб карда мешавад | Ин чӣ аст |
|---|---|---|---|
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… |
Ҷисми дархост
| Ном | Намуд | Талаб карда мешавад | Ин чӣ аст |
|---|---|---|---|
channels | SiteNotificationChannel[] | Бале | The COMPLETE set. Anything absent is removed. |
email_muted | boolean | Не | Ask for e-mail to be switched off. Refused 422 unless at least one listed destination is a non-e-mail channel that is verified and delivering. |
Ҷавоб
| Ном | Намуд | Талаб карда мешавад | Ин чӣ аст |
|---|---|---|---|
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. |
Хатоҳое, ки ин нуқтаи ниҳоӣ метавонад баргардонад
422