notifications

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

Replace this site's notification channels.

ყველა notifications ენდპოინტი

ყველა დეველოპერის დოკუმენტაცია

ავტორიზაცია

API გასაღები გაგზავნეთ როგორც bearer token. ეს ენდპოინტი სპეციფიკაციაში არ მიუთითებს კონკრეტულ ნებართვას, ამიტომ მიანიჭეთ თქვენს გასაღებს მინიმალური საჭირო უფლებები და ვარაუდის ნაცვლად შეამოწმეთ პასუხი.

სwhere your organisation id goes-ის ადგილი

ეს ენდპოინტი იყენებს პარამეტრად org_id. მისი გამოტოვების შემთხვევაში ზარი ფარავს თქვენი იჯარის მთელ ქვეხეს, ხოლო გაგზავნისას ზარი შეიზღუდება მხოლოდ ერთ ორგანიზაციამდე.

თქვენი ორგანიზაციის ID მითითებულია თქვენი სამართავი პანელის API გასაღებების ეკრანზე, თავად გასაღებთან ახლოს. ის ერთნაირია თქვენ მიერ განხორციელებულ ყველა გამოძახებაში.

სცადეთ

შეSubstituted any value inside angle brackets with your own and the key placeholder with a key from your dashboard.

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-ს წინააღმდეგ, რათა იხილოთ რეალური პასუხი. გაAღით ეს ენდპოინტი 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