notifications
PUT /v1/notification-preferences
Turn a topic's mail on or off.
Authentifizierung
Senden Sie einen API-Schlüssel als Bearer-Token. Dieser Endpunkt gibt in der Spezifikation keine spezifische Berechtigung an. Versehen Sie Ihren Schlüssel daher mit den minimal erforderlichen Rechten und prüfen Sie die Antwort, anstatt Annahmen zu treffen.
Hier kommt Ihre Organisations-ID hin
Dieser Endpunkt akzeptiert org_id als Abfrageparameter. Lassen Sie ihn weg, erfasst der Aufruf Ihren gesamten Mandanten-Unterbaum; übergeben Sie ihn, um den Aufruf auf eine Organisation einzugrenzen.
Die ID Ihrer Organisation finden Sie im Dashboard auf dem Bildschirm für API-Schlüssel direkt neben dem Schlüssel selbst. Sie ist bei jedem Ihrer Aufrufe dieselbe.
Ausprobieren
Ersetzen Sie alles in spitzen Klammern durch Ihre eigenen Werte und den Platzhalter für den Schlüssel durch einen Schlüssel aus Ihrem Dashboard.
curl -X PUT https://api.zinndigital.com/v1/notification-preferences \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "preferences": <object[]> }'Angemeldet? Die API-Konsole in Ihrem Dashboard trägt automatisch Ihre echte Organisations-ID sowie Ihren eigenen Schlüssel ein und führt die Anfrage gegen die Live-API aus, sodass Sie die tatsächliche Antwort sehen können. Öffnen Sie diesen Endpunkt in der API-Konsole
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.
Parameter
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
org_id (query) | string | Nein | 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… |
Anfragekörper
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
preferences | object[] | Ja | — |
for_organization | boolean | Nein | 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… |
Antwort
| Name | Typ | Erforderlich | Was es ist |
|---|---|---|---|
data | NotificationPreference[] | Ja | — |
Fehler, die dieser Endpunkt zurückgeben kann
401 · 403 · 422 · 429