notifications
POST /v1/notification-connections
Connect a destination.
Упълномощаване
Изпратете API ключ като носител (bearer token). Тази точка за достъп не указва конкретно разрешение в спецификацията, затова дайте на ключа си най-малкото необходимо и проверете отговора, вместо да правите предположения.
Където отива идентификаторът на вашата организация
Този ендпойнт приема org_id като параметър на заявката. Оставете го празен и извикването ще обхване цялото ви поддървано дърво; изпратете го, за да ограничите извикването до една организация.
ИД на вашата организация се намира на екрана с API ключове във вашето табло за управление, до самия ключ. Това е същият ИД във всяко заявка, която правите.
Опитайте
Заменете всичко в квадратни скоби със собствени стойности, а ключовия заместващ символ – с ключ от вашето табло за управление.
curl -X POST https://api.zinndigital.com/v1/notification-connections \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "kind": <string<email, slack, telegram, webhook>>, "label": <string>, "target": <string> }'Влязохте ли в профила си? API конзолата във вашето табло за управление попълва действителното идентификационно число на вашата организация и вашия собствен ключ и изпълнява заявката спрямо реалното API, за да можете да видите действителния отговор. Отворете този крайpoint в API конзолата
Детайли
Adds a destination. Many of the same kind are supported and expected - two Telegram chats, three Slack channels, an accountant's e-mail that belongs to no platform user. A new connection is NOT usable until it has been verified: it must send a real test message first. A destination that has only been typed correctly has not been shown to work, and this whole surface exists because two channels sat configured and silent.
Параметри
| Име | Тип | Задължително | Какво представлява |
|---|---|---|---|
org_id (query) | string | Не | The organization to act on. Omitted resolves to your own ONLY when you belong to exactly one organisation; a principal in more than one must name it, or the call is refused… |
Тяло на заявката
| Име | Тип | Задължително | Какво представлява |
|---|---|---|---|
kind | string<email, slack, telegram, webhook> | Да | SMS and push are deliberately absent - both were rejected. Offering a kind nobody can use is a placeholder with a dropdown. |
label | string | Да | — |
target | string | Да | The NON-secret half - an address, a channel name, a chat id. |
credential | string | Не | The credential itself - a Slack incoming-webhook URL, or a Telegram bot token. Required for those two kinds and refused for the others: a webhook's signing secret is ours to mint… |
personal | boolean | Не | true = this is MY destination and only my own matrix addresses it. The owning user is the authenticated principal, never a value in this body. |
Отговор
| Име | Тип | Задължително | Какво представлява |
|---|---|---|---|
id | string | Не | — |
kind | string<email, slack, telegram, webhook> | Не | — |
label | string | Не | — |
target | string | Не | — |
personal | boolean | Не | — |
verified | boolean | Не | Until this is true nothing is routed here. For a machine destination it becomes true when a real test message has been delivered; for an e-mail address it becomes true only when… |
verified_at | string | Не | — |
checked_at | string | Не | When we last managed to LOOK, as against verified_at which is when we last PROVED it works. One field cannot answer both: without the pair, "we have not been able to reach your… |
awaiting_confirmation | boolean | Не | An e-mail destination that has been sent its confirmation link and is waiting for the recipient. Neither verified nor failed - a third state, and showing it as "not verified"… |
verify_error | string | Не | — |
verify_error_code | string<their_endpoint_refused, their_endpoint_unreachable, their_credential_rejected, their_recipient_refused, not_configured, our_fault, could_not_check, > | Не | The TRANSLATABLE half of verify_error. That sentence is authored English and this payload is rendered in 57 other languages, so a German customer was shown a translated wrapper… |
health | string<healthy, idle, failing, unverified> | Не | ⚖️ Owner, 2026-09-03 - "can you get something to check that is set up and working properly please". verified answers did this EVER work; this answers is it working NOW,… |
last_delivery_at | string | Не | When a real notification was last DELIVERED here, as against verified. |
last_failure_at | string | Не | — |
last_delivery_error | string | Не | Why the last delivery failed, in copy WE authored, chosen from a closed table by what failed and where it was going (engine.notifications.failure_copy). It is never the… |
last_delivery_error_code | string<their_endpoint_refused, their_endpoint_unreachable, their_credential_rejected, their_recipient_refused, not_configured, our_fault, could_not_check, > | Не | The translatable half of last_delivery_error, on the same contract as verify_error_code. Classified by the adapter at the seam that knew what happened, never re-derived… |
consecutive_failures | integer | Не | Reset to 0 by any success, so a destination that recovers stops reporting itself broken with nobody pressing anything. failing is three in a row - one 502 from somebody's own… |
signing_secret | string | Не | Webhook destinations only, and returned ONCE on create. Use it to verify the X-Zinn-Signature header. There is no endpoint that will show it again - one would turn a read of the… |
signing_secret_notice | string | Не | — |
routes | object | Не | The FULL grid for this connection, one boolean per notification topic. |