notifications
PUT /v1/notification-preferences
Turn a topic's mail on or off.
Autenticação
Envie uma chave de API como um token bearer. Este endpoint não especifica uma permissão específica na documentação, portanto, conceda à sua chave o mínimo necessário e verifique a resposta em vez de assumir.
Onde vai o ID da sua organização
Este endpoint aceita org_id como parâmetro de consulta. Omita-o e a chamada abrangerá toda a sua subárvore de locatários; envie-o para restringir a chamada a uma única organização.
O ID da sua organização está na tela de chaves de API no seu painel, ao lado da própria chave. É o mesmo ID em todas as chamadas que você fizer.
Experimente
Substitua qualquer item entre colchetes por seus próprios valores e o espaço reservado para a chave por uma chave do seu painel.
curl -X PUT https://api.zinndigital.com/v1/notification-preferences \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "preferences": <object[]> }'Conectado? O console da API no seu painel preenche o ID da sua organização real e a sua própria chave, e executa a requisição contra a API de produção para que você possa ver a resposta real. Abra este endpoint no console da API
Detalhes
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.
Parâmetros
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
org_id (query) | string | Não | 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… |
Corpo da requisição
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
preferences | object[] | Sim | — |
for_organization | boolean | Não | 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… |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
data | NotificationPreference[] | Sim | — |
Erros que este endpoint pode retornar
401 · 403 · 422 · 429