notifications

PUT /v1/notification-preferences

Turn a topic's mail on or off.

Alle notifications-eindpunten

Authenticatie

Stuur een API-sleutel mee als bearer token. Dit eindpunt vermeldt geen specifieke toestemming in de specificatie, dus geef uw sleutel de minimale rechten die nodig zijn en controleer het antwoord in plaats van zomaar wat aan te nemen.

Waar je organisatie-id komt te staan

Dit eindpunt accepteert org_id als queryparameter. Laat deze achterwege en de aanroep destilleert je gehele tenant-substructie; stuur deze mee om de aanroep te beperken tot één organisatie.

Uw organisatie-id staat op het scherm met API-sleutels in uw dashboard, naast de sleutel zelf. Dit is in elke aanroep die u doet dezelfde id.

Probeer het

Vervang alles tussen punthaakjes door uw eigen waarden en de sleutelplaatsvervanger door een sleutel uit uw dashboard.

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

Ingelogd? De API-console in je dashboard vult je echte organisatie-id en je eigen sleutel in, en voert het verzoek uit tegen de live API zodat je de daadwerkelijke respons kunt zien. Open dit eindpunt in de API-console

Details

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.

Parameters

NaamTypeVerplichtWat dit is
org_id (query)stringNeeThe 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…

Aanvraaglichaam

NaamTypeVerplichtWat dit is
preferencesobject[]Ja
for_organizationbooleanNeeWrite 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…

Reactie

NaamTypeVerplichtWat dit is
dataNotificationPreference[]Ja

Fouten die dit eindpunt kan retourneren

401 · 403 · 422 · 429