ai
PUT /v1/ai/site-agent/preferences
Choose what the AI may do for one kind of fix.
Autenticação
Envie uma chave de API como um token de portador. A chave deve ter a permissão sites.view; uma chave sem ela é recusada com 403, e não 404.
Este endpoint não requer um ID de organização. Sua chave já identifica a organização à qual pertence, e a resposta é delimitada a ela.
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/ai/site-agent/preferences \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "action": <string>, "mode": <AiSiteAgentMode> }'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
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`.
Corpo da requisição
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
action | string | Sim | — |
mode | AiSiteAgentMode | Sim | 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… |
Resposta
| Nome | Tipo | Obrigatório | O que é |
|---|---|---|---|
action | string | Sim | The fix this row is about — an agent action key or a support remedy key. |
requested | AiSiteAgentMode | Sim | What the customer chose, stored as they chose it. |
effective | AiSiteAgentMode | Sim | What will actually happen — `requested` clamped to `ceiling`. |
ceiling | AiSiteAgentMode | Sim | 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 | Sim | 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 | Não | Why the ceiling is where it is, in words a customer reads. |
Erros que este endpoint pode retornar
401 · 403 · 422 · 429