notifications

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

Replace this site's notification channels.

सबै notifications इन्डपइन्टहरू

सबै विकासकर्ता कागजातहरू

प्रमाणीकरण

एपिआई कुञ्जीलाई बियरर टोकन (bearer token) को रूपमा पठाउनुहोस्। यो इन्डपोइन्टले विशिष्ट अनुमति खुलाएको छैन, त्यसैले अनुमान गर्नुको सट्टा आफ्नो कुञ्जीलाई आवश्यक पर्ने न्यूनतम अधिकार दिनुहोस् र प्रतिक्रिया जाँच गर्नुहोस्।

तपाईंको संस्थाको आइडी राख्ने ठाउँ

यो इन्डपोइन्टले org_id लाई क्वेरी प्यारामिटरको रूपमा लिन्छ। यसलाई छुटाउनुभयो भने कलले तपाईंको सम्पूर्ण टेनेन्सी सबट्रीलाई समेट्छ; यसलाई एउटा संस्थामा मात्र सीमित गर्न पठाउनुहोस्।

तपाईंको संस्थाको आइडी (ID) तपाईंको ड्यासबोर्डमा रहेको API कुञ्जीहरू (keys) स्क्रिनमा, कुञ्जीको छेउमा हुन्छ। तपाईंले गर्ने प्रत्येक कलमा यही आइडी प्रयोग हुन्छ।

प्रयास गर्नुहोस्

कोणीय कोष्ठकभित्र भएका जुनसुकै कुरालाई आफ्नो मानहरूद्वारा बदल्नुहोस्, र मुख्य स्थानहोल्डरलाई तपाईंको ड्यासबोर्डको कुञ्जीद्वारा बदल्नुहोस्।

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