notifications

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

Replace this site's notification channels.

Όλα τα τελικά σημεία notifications

Όλα τα έγγραφα προγραμματιστών

Πισtoποίηση

Στείλτε ένα κλειδί API ως διακριτικό φορέα (bearer token). Αυτό το τελικό σημείο δεν ορίζει μια συγκεκριμένη άδεια στην προδιαγραφή, οπότε δώστε στο κλειδί σας τα ελάχιστα δυνατά δικαιώματα και ελέγξτε την απόκριση αντί να κάνετε υποθέσεις.

Πού μπαίνει το αναγνωριστικό του οργανισμού σας

Αυτό το τελικό σημείο δέχεται την παράμετρο org_id ως παράμετρο ερωτήματος. Παραλείψτε την και η κλήση καλύπτει ολόκληρο το υποδέντρο μίσθωσής σας· στείλτε την για να περιορίσετε την κλήση σε έναν οργανισμό.

Το αναγνωριστικό του οργανισμού σας βρίσκεται στην οθόνη των κλειδιών API στον πίνακα ελέγχου σας, δίπλα στο ίδιο το κλειδί. Είναι το ίδιο αναγνωριστικό σε κάθε κλήση που πραγματοποιείτε.

Δοκιμάστε το

Ατικatastήstε ό,τι βρίskεtai μέσα σe γώniaδeς μe τis δikές sas timές, kai to placeholder klεidioύ μe éna klεidi apó ton pinaka ελέgchou sas.

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.

Παράμετροι

ΌνομαΤύpοςΥποχρεωτικόΤι είναι
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…

Σώμα αίτησης

ΌνομαΤύpοςΥποχρεωτικόΤι είναι
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.

Απάντηση

ΌνομαΤύpοςΥποχρεωτικόΤι είναι
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