notifications
PUT /v1/sites/{site_id}/notification-channels
Replace this site's notification channels.
Ìfàṣẹ́pọ̀
Fi bọ́kì kọ́kọ́ (bearer token) ránṣẹ́ gẹ́gẹ́ bí àmì ìdánimọ̀ API. Ibùdó yìí kò sọ àṣẹ pàtó kan nínú àlàyé rẹ̀, nítorí náà fún kọ́kọ́ rẹ̀ ní ohun tó kéré jù lọ tí ó nílò kí o sì ṣàyẹ̀wò ìdáhùn náà dípò kí o kàn rò ó.
Ibùdó àmì ìdánimọ̀ ilé-iṣẹ́ rẹ sí
Oju-iwọle yii nlo org_id gẹgẹbi ayẹwo ibeere. Fi silẹ ni ita yoo si bo igi iyalo rẹ lapapọ; ranṣẹ si lati dín ibeere naa kù si ajọ kan.
Id àjọ rẹ wa lórí ojú-ìwákòòkò àwọn bọ́tìnnì API nínú daṣibọọdú rẹ, lẹ́gbẹ̀ẹ́ bọ́tìnnì náà gan-an. Ó jẹ́ ìd kan náà nínú gbogbo ìpè tí o bá ṣe.
Gbiyanju rẹ
Rọ́pọ̀ èyíkéyìí nínú àwọn àmì ìtọ́ka < > pẹ̀lú iye tirẹ̀, àti àmì ìdánimọ̀ bọ́tìnnì náà pẹ̀lú bọ́tìnnì kan láti inú dásibọ̀ọ̀dù rẹ.
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[]> }'Ṣé o ti wọlé? Iwọ̀n api ní nú ìgbékalẹ̀ rẹ kún id àjọ gidi rẹ ati bọtini tirẹ, o si nṣiṣẹ ibeere na lòdì si api gidi ki o le rii esi gidi na. Ṣí ojú abáná yìí sílẹ̀ nínú kọnsólù API
Àwọn kúlẹ̀kúlẹ̀
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.
Àwọn ìpìlẹ̀
| Orúkọ | Iru | Tí a nílò | Kini o jẹ |
|---|---|---|---|
site_id (path) | string | Bẹẹni | — |
org_id (query) | string | Bẹẹkọ | 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… |
Akoonu ibeere naa
| Orúkọ | Iru | Tí a nílò | Kini o jẹ |
|---|---|---|---|
channels | SiteNotificationChannel[] | Bẹẹni | The COMPLETE set. Anything absent is removed. |
email_muted | boolean | Bẹẹkọ | 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. |
Idahun
| Orúkọ | Iru | Tí a nílò | Kini o jẹ |
|---|---|---|---|
site_id | string | Bẹẹni | — |
channels | SiteNotificationChannel[] | Bẹẹni | — |
email_muted | boolean | Bẹẹni | What the customer ASKED for. Not necessarily what is happening. |
email_active | boolean | Bẹẹni | 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> | Bẹẹni | 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 | Bẹẹkọ | How many non-e-mail destinations this site routes to are delivering. |
overriding_choice | boolean | Bẹẹkọ | 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. |
Awọn aṣiṣe ti ibudo ipari yii le da pada
422