notifications

PUT /v1/sites/{site_id}/notification-channels

Replace this site's notification channels.

Бүх notifications төгсгөлийн цэгүүд

Хөгжүүлэгчийн бүх баримт бичиг

Баталгаажуулалт

API түлхүүрийг bearer token хэлбэрээр илгөэнэ үү. Энэхүү төгсгөлийн цэг нь тодорхойлолтдоо тодорхой зөвшөөрлийг заагаагүй тул түлхүүрээрээ шаардагдах хамгийн бага эрхийг өгч, таамаглахаас илүүтэйгээр хариуг шалгана уу.

Таны байгууллагын дугаар орох газар

Энэ төгсгөл цэг нь org_id-г асуулгын параметр болгон авдаг. Үүнийг орхивол дуудлага таны бүх түрээсийн дэд модыг хамрах бөгөөд дуудлагыг зөвхөн нэг байгууллагаар хязгаарлахын тулд үүнийг илгээнэ үү.

Танай байгууллагын ID нь таны хяналтын самбар дээрх API түлхүүрийн дэлгэцэнд, түлхүүр өөрөө хажууд байрладаг. Энэ нь таны хийх дуудлага бүрт ижил ID байна.

Туршиж үзэх

Өнцөг хаалтанд байгаа бүх зүйлийг өөрийн утгаар солиж, түлхүүр санамж байрлуулагчийг хяналтын самбарынхаа түлхүүрээр сольж оруулна уу.

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[]> }'

Та нэвтэрсэн байна уу? Таны хяналтын самбар дахь API консол нь таны бодит байгууллагын ID болон өөрийн түлхүүрийг автоматаар бөглөж, шууд ажиллаж буй 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…

Хүсэлтийн бие

НэрТөрөлЗаавал шаардлагатайЭнэ юу вэ
channelsSiteNotificationChannel[]ТиймThe COMPLETE set. Anything absent is removed.
email_mutedbooleanҮгүй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_idstringТийм
channelsSiteNotificationChannel[]Тийм
email_mutedbooleanТиймWhat the customer ASKED for. Not necessarily what is happening.
email_activebooleanТийм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_reasonstring<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_alternativesintegerҮгүйHow many non-e-mail destinations this site routes to are delivering.
overriding_choicebooleanҮгүй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