notifications
PUT /v1/notification-preferences
Turn a topic's mail on or off.
Uwierzytelnianie
Wyślij klucz API jako token bearer. Ten punkt końcowy nie określa konkretnego uprawnienia w specyfikacji, więc nadaj swojemu kluczowi minimum potrzebnych uprawnień i sprawdź odpowiedź zamiast zakładać.
Miejsce na identyfikator organizacji
Ten punkt końcowy przyjmuje org_id jako parametr zapytania. Pomiń go, a wywołanie obejmie całe drzewo dzierżawy; prześlij go, aby ograniczyć wywołanie do jednej organizacji.
Identyfikator Twojej organizacji znajduje się na ekranie kluczy API w Twoim panelu, obok samego klucza. Jest to ten sam identyfikator w każdym wywołaniu, które wykonujesz.
Wypróbuj
Zastąp wszystko w nawiasach ostrych własnymi wartościami, a zastępczy znacznik klucza kluczem ze swojego pulpitu nawigacyjnego.
curl -X PUT https://api.zinndigital.com/v1/notification-preferences \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "preferences": <object[]> }'Zalogowany? Konsola API w Twoim panelu uzupełnia rzeczywiste identyfikator organizacji oraz Twój własny klucz i wykonuje żądanie względem aktywnego API, dzięki czemu możesz zobaczyć rzeczywistą odpowiedź. Otwórz ten punkt końcowy w konsoli API
Szczegóły
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.
Parametry
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
org_id (query) | string | Nie | The 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… |
Treść żądania
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
preferences | object[] | Tak | — |
for_organization | boolean | Nie | Write 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… |
Odpowiedź
| Nazwa | Typ | Wymagane | Co to jest |
|---|---|---|---|
data | NotificationPreference[] | Tak | — |
Błędy, które ten punkt końcowy może zwrócić
401 · 403 · 422 · 429