notifications

PUT /v1/notification-preferences

Turn a topic's mail on or off.

Tutti gli endpoint notifications

Autenticazione

Invia una chiave API come bearer token. Questo endpoint non specifica un permesso specifico nella specifica, quindi assegna alla tua chiave i permessi minimi necessari e verifica la risposta invece di fare supposizioni.

L'ID della tua organizzazione va qui

Questo endpoint accetta org_id come parametro di query. Omettilo e la chiamata coprirà l'intero sottoalbero del tuo tenant; invialo per limitare la chiamata a una singola organizzazione.

L'identificativo della tua organizzazione si trova nella schermata delle chiavi API nella tua dashboard, accanto alla chiave stessa. È lo stesso identificativo in ogni chiamata che effettui.

Provalo

Sostituisci qualsiasi elemento tra parentesi angolari con i tuoi valori e il segnaposto key con una chiave dalla tua dashboard.

curl -X PUT https://api.zinndigital.com/v1/notification-preferences \
  -H "Authorization: Bearer zdk_live_…" \
  -H "Content-Type: application/json" \
  -d '{ "preferences": <object[]> }'

Hai effettuato l'accesso? La console API nella tua dashboard inserisce il tuo ID organizzazione reale e la tua chiave personale, ed esegue la richiesta sull'API live in modo da poter vedere la risposta effettiva. Apri questo endpoint nella console API

Dettagli

Sets your own answer, or the organization's default when `for_organization` is true. Your own answer outranks your organization's, in BOTH directions - so an admin silencing a topic for everyone does not lock out the one colleague who needs it. `user_id` is never read from the body. The row is written for the authenticated principal, because a member of an organization must not be able to silence a colleague's mail. Turning off a topic whose every message is one we are obliged to send answers **422** naming the topic and the duty - never a silent drop, which would leave you believing you had unsubscribed.

Parametri

NomeTipoObbligatorioChe cos'è
org_id (query)stringNoThe organization to act on. Omitted (or empty) means your own. A reseller managing a client org must name it - defaulting silently would write the reseller's own preferences whi…

Corpo della richiesta

NomeTipoObbligatorioChe cos'è
preferencesobject[]
for_organizationbooleanNoWrite the ORGANIZATION's default instead of your own answer. A separate flag rather than an omitted `user_id`, because "set this for everyone" is a different intention and must…

Risposta

NomeTipoObbligatorioChe cos'è
dataNotificationPreference[]

Errori che questo endpoint può restituire

401 · 403 · 422 · 429