notifications
GET /v1/sites/{site_id}/notification-channels
Which channels this site's notifications go to.
Authentification
Envoyez une clé d'API en tant que jeton du porteur (bearer token). Cet endpoint n'indique pas de permission spécifique dans la spécification, attribuez donc à votre clé le minimum requis et vérifiez la réponse plutôt que de faire des suppositions.
Où insérer l'ID de votre organisation
Cet point de terminaison prend org_id comme paramètre de requête. Omettez-le et l'appel couvrira l'ensemble de votre sous-arbre de location ; envoyez-le pour restreindre l'appel à une seule organisation.
L'identifiant de votre organisation se trouve sur l'écran des clés API de votre tableau de bord, à côté de la clé elle-même. Il s'agit du même identifiant pour chaque appel que vous effectuez.
Essayer
Remplacez tout ce qui se trouve entre crochets par vos propres valeurs, et le espace réservé à la clé par une clé de votre tableau de bord.
curl -X GET https://api.zinndigital.com/v1/sites/{site_id}/notification-channels \
-H "Authorization: Bearer zdk_live_…"Connecté ? La console d'API de votre tableau de bord saisit votre véritable ID d'organisation ainsi que votre propre clé, et exécute la requête sur l'API de production afin que vous puissiez voir la réponse réelle. Ouvrir ce point de terminaison dans la console API
Détails
The destinations this site routes to, plus whether e-mail is currently being sent. The response carries BOTH what the customer asked for (email_muted) and what is actually happening (email_active, email_reason), and they can differ. E-mail may be switched off only while another channel is connected and healthy; if every alternative goes bad, e-mail resumes on its own and overriding_choice is true. A client that rendered only the stored flag would show a toggle that disagrees with the customer's inbox - which is the exact failure this feature exists to prevent, because the notification telling you Slack has died would otherwise go to Slack.
Paramètres
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
site_id (path) | string | Oui | — |
org_id (query) | string | Non | 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… |
Réponse
| Nom | Type | Obligatoire | Qu'est-ce que c'est |
|---|---|---|---|
site_id | string | Oui | — |
channels | SiteNotificationChannel[] | Oui | — |
email_muted | boolean | Oui | What the customer ASKED for. Not necessarily what is happening. |
email_active | boolean | Oui | 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_reason | string<not_muted, muted, alternatives_failing, no_alternative, unreadable> | Oui | 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_alternatives | integer | Non | How many non-e-mail destinations this site routes to are delivering. |
overriding_choice | boolean | Non | 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. |