BizKitHub
DocsAPI ReferenceIssue/bff/issue/run-ai-workflow
postIssueAdmin BFF

/bff/issue/run-ai-workflow

Manually triggers the Phase 4+ ISSUE ORCHESTRATOR on a single issue. The orchestrator pre-screens the ticket body for prompt-injection, loads a hard-scoped reporter context (contact + own orders + prior tickets), optionally dispatches to the KB specialist and the Order specialist, and writes ONE internal draft-reply comment that the operator can edit and send. The customer NEVER sees it directly; ticket status / priority / assignee / deadline are deliberately untouched. Bypasses the org experimental_ai_agents_enabled flag — operator intent is explicit by clicking the button. Spam / human_only tickets still short-circuit. The response surfaces the orchestrator run id so the admin can deep-link into /ai-agent-run/:externalId.

IssuepostBffIssueRun-ai-workflow

Parameters

JSON body

Request body

application/json
issueKeystringRequired

Issue key to process.

ExamplePROJ-123

Response schema

1 status code documented

200Success
successbooleanRequired

Whether the orchestrator run completed successfully.

skipped"spam" | "human_only" | "closed" | "no_author" | "not_found" | nullRequired
One of 2:
Variant 1
"spam" | "human_only" | "closed" | "no_author" | "not_found"
Variant 2
null
actionsobject[]Required

The orchestrator writes at most one draft_reply action; mapped here to the legacy comment shape so the admin UI can invalidate the comment list. Internal dispatch events (KB / order specialist) are not surfaced through this endpoint — see /ai-agent-run/:externalId for the full trace.

Each array item:
kind"comment"Required
commentIdstringRequired

Server-side comment id (matches selectIssueCommentList item.id).

messagestringRequired

Draft reply preview (first ~180 chars of the full body).

runExternalIdstring | nullRequired
One of 2:
Variant 1
string

ai__agent_run.external_id of this orchestrator run — null when the run was short-circuited before insert.

Variant 2
null
draftPreviewstring | nullRequired
One of 2:
Variant 1
string

First ~180 chars of the draft reply body — mirrors actions[0].message when a draft was produced.

Variant 2
null

Response example

application/json
{
  "success": false,
  "actions": [
    {
      "kind": "comment",
      "commentId": "example_commentId",
      "message": "example_message"
    }
  ]
}

Request example

POST /bff/issue/run-ai-workflow

post
curl -X POST "https://api.bizkithub.com/bff/issue/run-ai-workflow" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -d '{
  "issueKey": "PROJ-123"
}'

Need an API key?

All BizKitHub public API endpoints require authentication via API key.

Get API Key