agency-board
POST /v1/agency/boards/{boardId}/ai/run
Run one AI function on this board.
المصادقة
أرسل مفتاح واجهة برمجة التطبيقات (API) كرمز حامل (bearer token). لا يحدد نقطة النهاية هذه إذنًا محددًا في المواصفات، لذا امنح مفتاحك الحد الأدنى الذي محتاجه وتحقق من الاستجابة بدلاً من الافتراض.
لا يقبل هذا الطرف أي معرف للمؤسسة. يحدد مفتاحك بالفعل المؤسسة التي ينتمي إليها، وتكون الاستجابة محصورة في نطاقها.
جربه الآن
استبدل أي شيء بين أقواس زاوية بقيمك الخاصة، والعنصر النائب للمفتاح بمفتاح من لوحة تحكمك.
curl -X POST https://api.zinndigital.com/v1/agency/boards/{boardId}/ai/run \
-H "Authorization: Bearer zdk_live_…" \
-H "Content-Type: application/json" \
-d '{ "function": <string<draft_card, split_epic, summarise_card, summarise_board, triage_card, find_duplicates, release_notes, whats_blocked>> }'هل سجلت الدخول؟ تقوم وحدة تحكم واجهة برمجة التطبيقات في لوحة التحكم الخاصة بك بربط معرف مؤسستك الحقيقي ومفتاحك الخاص، وتنفذ الطلب مقابل واجهة برمجة التطبيقات المباشرة لتتمكن من رؤية الاستجابة الفعلية. افتح هذه النهاية الطرفية في وحدة تحكم API
التفاصيل
Runs a board AI function and returns its output. **A refusal to spend is a `200`, not a `4xx`.** When the org has no AI credit, no provider key, or is not in good standing, the response carries `skipped: true` with a `skipReason` and a customer-readable `text` — because the customer asked and we told them why not, which is a complete answer rather than a fault in their request. ⛔ A client reading `200` as "it ran" will record a success for a call that did nothing. **Read `skipped`.** `apply` defaults to `false`: AI on a board proposes and a person commits.
المعلمات
| الاسم | النوع | مطلوب | ما هو هذا |
|---|---|---|---|
boardId (path) | Uuid | نعم | Project board ID (UUIDv7). |
جسم الطلب
| الاسم | النوع | مطلوب | ما هو هذا |
|---|---|---|---|
function | string<draft_card, split_epic, summarise_card, summarise_board, triage_card, find_duplicates, release_notes, whats_blocked> | نعم | Which AI function to run. |
card_id | Uuid | لا | UUIDv7 identifier — sortable by creation time (docs/02 §8). |
apply | boolean | لا | Write the result to the board. Defaults to **false**: AI on a board proposes and a person commits, so the irreversible half must be asked for explicitly. |
force | boolean | لا | Re-run rather than replay. An identical call within 15 minutes is served from the previous run with no model call and no charge, so a retried automation cannot bill twice; `forc… |
options | object | لا | Per-function input. `draft_card` takes `brief` and optionally `source`; `release_notes` takes `column_id`. |
الاستجابة
| الاسم | النوع | مطلوب | ما هو هذا |
|---|---|---|---|
function | string | نعم | — |
text | string | نعم | The output, or the reason it was skipped. |
payload | object | لا | Structured result — labels, sub-tasks, candidate duplicates. |
model | string | لا | The model that served it. Null on a skip, because none was chosen. |
provider | string | لا | — |
funding | string<byo, credits, included> | لا | Who paid. `byo` is the customer's own provider key; `credits` and `included` are Zinn®'s. All three are recorded on the same meter. |
usage_id | Uuid | لا | The meter row, so board history and AI spend join up. Null on a skip. |
skipped | boolean | نعم | **Read this.** True means nothing ran and nothing was charged. A caller that treats `200` as "it worked" records a success for a call that did nothing. |
skip_reason | string | لا | Machine-readable cause, e.g. `AI_BUDGET_EXHAUSTED`, `AI_NOT_IN_GOOD_STANDING`, `not_enough_discussion`, `nothing_blocked`. |
skip_kind | string<nothing_to_do, not_in_good_standing, not_entitled, unavailable> | لا | The CLASS of the skip, beside its code. `nothing_to_do` is the product working (a healthy board has nothing blocked; a thread is too short to summarise) and is good news, not a… |
skip_params | object | لا | The values the refusal sentence quotes (`count`, `column`), sent structurally so a client can render that sentence in the customer's own language rather than the engine's Englis… |
cached | boolean | لا | Served from the previous identical run rather than the model. |
created_card_ids | Uuid[] | لا | — |
run_id | Uuid | لا | — |
الأخطاء التي يمكن أن تُرجعها نقطة النهاية هذه
401 · 403 · 404 · 422