notifications

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

Replace this site's notification channels.

همه نقاط پایانی notifications

همهٔ مستندات توسعه‌دهندگان

احراز هویت

یک کلید API را به عنوان یک توکن برbearer ارسال کنید. این نقطه پایانی مجوز خاصی را در مشخصات خود ذکر نمی‌کند، بنابراین به جای فرض کردن، حداقل نیازهای کلید خود را بدهید و پاسخ را بررسی کنید.

جایی که شناسه سازمان شما قرار می‌گیرد

این نقطه پایانی org_id را به عنوان یک پارامتر پرس‌وجو می‌پذیرد. آن را رها کنید تا فراخوانی کل زیردرخت اجاره‌ای شما را پوشش دهد؛ آن را ارسال کنید تا فراخوانی به یک سازمان محدود شود.

شناسه سازمان شما در صفحه کلیدهای API در داشبوردتان، در کنار خود کلید قرار دارد. این شناسه در تمام درخواست‌هایی که ارسال می‌کنید یکسان است.

امتحان کنید

هر چیزی را که داخل براکت‌های زاویه‌دار قرار دارد با مقادیر خودتان جایگزین کنید، و نگهدارنده کلید را با کلیدی از داشبورد خود جایگزین نمایید.

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 در داشبورد شما شناسه سازمان واقعی و کلید خودتان را پر می‌کند و درخواست را روی 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