ai
PUT /v1/ai/site-agent/preferences
Choose what the AI may do for one kind of fix.
Xác thực
Gửi khóa API dưới dạng mã thông báo bearer. Khóa này phải có quyền sites.view; khóa không có quyền này sẽ bị từ chối với mã lỗi 403, không phải 404.
Endpoint này không nhận ID tổ chức. Khóa của bạn đã xác định tổ chức mà nó thuộc về và phản hồi được giới hạn trong phạm vi đó.
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 PUT https://api.zinndigital.com/v1/ai/site-agent/preferences \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "action": <string>, "mode": <AiSiteAgentMode> }'Đã đă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
Records the customer's wish. The **requested** value is stored, never the clamped one: a customer who asks for "just fix it" on a fix still earning its rung keeps that setting, and it takes effect on its own the day the fix is promoted. Storing the clamp instead would quietly downgrade them for ever with no way to see it had happened. An unknown action or remedy key is a `422` naming it, never a silently ignored write. Requires `sites.view`.
Nội dung yêu cầu
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
action | string | Có | — |
mode | AiSiteAgentMode | Có | What the customer wants the AI to do about one kind of fix. `ask` proposes it and waits for a button; `canary` applies it to one site and checks the result; `auto` applies it an… |
Phản hồi
| Tên | Loại | Bắt buộc | Nội dung này là gì |
|---|---|---|---|
action | string | Có | The fix this row is about — an agent action key or a support remedy key. |
requested | AiSiteAgentMode | Có | What the customer chose, stored as they chose it. |
effective | AiSiteAgentMode | Có | What will actually happen — `requested` clamped to `ceiling`. |
ceiling | AiSiteAgentMode | Có | The highest mode the PLATFORM currently permits for this fix. The customer cannot raise it; it moves when the fix earns a higher rung. |
clamped | boolean | Có | True when the customer asked for more than the ceiling allows. The screen must say so — otherwise their choice looks as though it did not register. |
reason | string | Không | Why the ceiling is where it is, in words a customer reads. |
Các lỗi điểm cuối này có thể trả về
401 · 403 · 422 · 429