ai

PUT /v1/ai/site-agent/preferences

Choose what the AI may do for one kind of fix.

جميع نقاط نهاية ai

المصادقة

أرسل مفتاح واجهة برمجة التطبيقات (API key) كرمز حامل (bearer token). يجب أن يحمل المفتاح إذن sites.view؛ والمفتاح الذي لا يملكه يُرفض بالرمز 403 وليس 404.

لا يقبل هذا الطرف أي معرف للمؤسسة. يحدد مفتاحك بالفعل المؤسسة التي ينتمي إليها، وتكون الاستجابة محصورة في نطاقها.

جربه الآن

استبدل أي شيء بين أقواس زاوية بقيمك الخاصة، والعنصر النائب للمفتاح بمفتاح من لوحة تحكمك.

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

التفاصيل

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`.

جسم الطلب

الاسمالنوعمطلوبما هو هذا
actionstringنعم
modeAiSiteAgentModeنعم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…

الاستجابة

الاسمالنوعمطلوبما هو هذا
actionstringنعمThe fix this row is about — an agent action key or a support remedy key.
requestedAiSiteAgentModeنعمWhat the customer chose, stored as they chose it.
effectiveAiSiteAgentModeنعمWhat will actually happen — `requested` clamped to `ceiling`.
ceilingAiSiteAgentModeنعمThe highest mode the PLATFORM currently permits for this fix. The customer cannot raise it; it moves when the fix earns a higher rung.
clampedbooleanنعم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.
reasonstringلاWhy the ceiling is where it is, in words a customer reads.

الأخطاء التي يمكن أن تُرجعها نقطة النهاية هذه

401 · 403 · 422 · 429