notifications
POST /v1/notification-connections
Connect a destination.
Xác thực
Gửi khóa API dưới dạng mã thông báo bearer. Điểm cuối này không nêu rõ quyền cụ thể trong thông số kỹ thuật, vì vậy hãy cấp cho khóa của bạn quyền tối thiểu cần thiết và kiểm tra phản hồi thay vì phỏng đoán.
Nơi điền id tổ chức của bạn
Điểm cuối này nhận org_id làm tham số truy vấn. Hãy bỏ trống để áp dụng cho toàn bộ cây thuê của bạn; hoặc truyền giá trị vào để thu hẹp phạm vi gọi về một tổ chức duy nhất.
Mã tổ chức của bạn nằm ở màn hình khóa API trong bảng điều khiển, ngay bên cạnh khóa đó. Đây là cùng một mã trong mọi lệnh gọi mà bạn thực hiện.
Dùng thử
Thay thế bất kỳ nội dung nào trong ngoعل (angle brackets) bằng giá trị của riêng bạn và trình giữ chỗ key bằng một key từ trang tổng quan của bạn.
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> }'Đã đăng nhập? Bảng điều khiển API trong trang quản lý của bạn sẽ tự điền ID tổ chức thực tế và khóa của riêng bạn, sau đó chạy yêu cầu đối với API trực tiếp để bạn có thể xem phản hồi thực tế. Mở điểm cuối này trong bảng điều khiển API
Chi tiết
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.
Tham số
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
org_id (query) | string | Không | 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 `422… |
Nội dung yêu cầu
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
kind | string<email, slack, telegram, webhook> | Có | SMS and push are deliberately absent - both were rejected. Offering a kind nobody can use is a placeholder with a dropdown. |
label | string | Có | — |
target | string | Có | The NON-secret half - an address, a channel name, a chat id. |
credential | string | Không | 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 min… |
personal | boolean | Không | 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. |
Phản hồi
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
id | string | Không | — |
kind | string<email, slack, telegram, webhook> | Không | — |
label | string | Không | — |
target | string | Không | — |
personal | boolean | Không | — |
verified | boolean | Không | 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 | Không | — |
checked_at | string | Không | 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 you… |
awaiting_confirmation | boolean | Không | 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" ma… |
verify_error | string | Không | — |
verify_error_code | string<their_endpoint_refused, their_endpoint_unreachable, their_credential_rejected, their_recipient_refused, not_configured, our_fault, could_not_check, > | Không | 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 wrappe… |
health | string<healthy, idle, failing, unverified> | Không | ⚖️ 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 | Không | When a real notification was last DELIVERED here, as against verified. |
last_failure_at | string | Không | — |
last_delivery_error | string | Không | 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 provid… |
last_delivery_error_code | string<their_endpoint_refused, their_endpoint_unreachable, their_credential_rejected, their_recipient_refused, not_configured, our_fault, could_not_check, > | Không | 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 down… |
consecutive_failures | integer | Không | 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 ow… |
signing_secret | string | Không | 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 t… |
signing_secret_notice | string | Không | — |
routes | object | Không | The FULL grid for this connection, one boolean per notification topic. |