身份验证
请将 API 密钥作为 bearer 令牌发送。该密钥必须具有 sites.view 权限;缺少该权限的密钥将被拒绝并返回 403 状态码,而非 404。
此端点不需要组织 ID。您的密钥已用于识别其所属的组织,且响应范围也仅限于该组织。
免费试用
将尖括号中的内容替换为您自己的值,并将键占位符替换为您仪表板中的一个键。
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> }'已登录?您仪表板中的 API 控制台会自动填入您真实的组织 ID 和您自己的密钥,并针对实时 API 运行请求,以便您查看实际的响应。 在 API 控制台中打开此端点
详细信息
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`.
请求正文
| 名称 | 类型 | 必填 | 内容简介 |
|---|---|---|---|
action | string | 是 | — |
mode | AiSiteAgentMode | 是 | 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… |
响应
| 名称 | 类型 | 必填 | 内容简介 |
|---|---|---|---|
action | string | 是 | The fix this row is about — an agent action key or a support remedy key. |
requested | AiSiteAgentMode | 是 | What the customer chose, stored as they chose it. |
effective | AiSiteAgentMode | 是 | What will actually happen — `requested` clamped to `ceiling`. |
ceiling | AiSiteAgentMode | 是 | 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 | 是 | 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 | 否 | Why the ceiling is where it is, in words a customer reads. |
此端点可能返回的错误
401 · 403 · 422 · 429