Skip to Content
BlitzPulse docs are live. Looking for Blitz Global? Visit https://blitzglobalcapital.com.
Api ReferenceSupport Ai API

Support Ai API

Auto-generated from openapi-snapshot.json. Do not edit by hand — changes are overwritten by scripts/docs/generate_api_reference.py.

14 endpoints in this group.

GET /api/support/ai/cases

List My Cases

List the caller’s support cases.

Parameters

NameInTypeRequiredDescription
status_filterquerystringoptional

Responses

CodeDescription
200Successful Response
422Validation Error

POST /api/support/ai/cases

Create Case

Create a tenant-scoped human support case for the caller.

Request body: application/json

Responses

CodeDescription
200Successful Response
422Validation Error

GET /api/support/ai/cases/{case_id}

Get My Case

Fetch one caller-owned support case with public comments.

Parameters

NameInTypeRequiredDescription
case_idpathintegerrequired

Responses

CodeDescription
200Successful Response
422Validation Error

POST /api/support/ai/cases/{case_id}/comments

Add My Case Comment

Add a public caller comment to an open support case.

Parameters

NameInTypeRequiredDescription
case_idpathintegerrequired

Request body: application/json

Responses

CodeDescription
200Successful Response
422Validation Error

GET /api/support/ai/conversations

List Conversations

Responses

CodeDescription
200Successful Response

POST /api/support/ai/conversations

Create Conversation

Create a new support conversation owned by the authenticated user.

Returns the new conversation_id. The full SSE message turn (LLM streaming + tool execution) lands in #1095b.

Request body: application/json

Responses

CodeDescription
200Successful Response
422Validation Error

DELETE /api/support/ai/conversations/{conversation_id}

Delete Conversation

GDPR delete (LLD §9) — cascade-delete user’s conversation + messages.

Was a vendor_outage stub in prior #1133. Now actually deletes:

  • support_ai_intent_classifications (via message FK)
  • support_ai_tool_calls (via message FK)
  • support_ai_feedback (via message FK)
  • support_ai_messages (via conversation FK CASCADE)
  • support_ai_conversations row itself

Audit events for admin actions are retained per LLD §9 (the user’s own conversation deletion is not an audit-retained event — it’s a data-subject right).

Parameters

NameInTypeRequiredDescription
conversation_idpathintegerrequired

Responses

CodeDescription
200Successful Response
422Validation Error

GET /api/support/ai/conversations/{conversation_id}

Get Conversation

Parameters

NameInTypeRequiredDescription
conversation_idpathintegerrequired

Responses

CodeDescription
200Successful Response
422Validation Error

POST /api/support/ai/conversations/{conversation_id}/escalate

Escalate Conversation

Mark conversation as escalated (LLD §13).

Was a vendor_outage stub in prior #1133. Now sets status=‘escalated’ and returns the ticket-form URL for the FE to redirect into the existing support-ticket flow with the conversation snapshot.

Per LLD §13: ticket creation is FE-mediated — the bot does NOT auto-create a ticket. After escalation, the conversation is read-only (the message endpoint will reject new turns once status=‘escalated’ — enforced when #1095b wires the streaming path).

Parameters

NameInTypeRequiredDescription
conversation_idpathintegerrequired

Request body: application/json

Responses

CodeDescription
200Successful Response
422Validation Error

POST /api/support/ai/conversations/{conversation_id}/feedback

Submit Feedback

Persist user feedback on a conversation; auto-flag for improvement.

Improvement loop (#1100):

  • Negative feedback (helpful=false OR rating<=2) auto-creates a training candidate row with candidate_type='negative_feedback', status=‘queued’, PII-redacted comment.
  • Admin reviews via admin endpoints (approve/reject).
  • Approved candidates are exported by an offline pipeline (not in this PR — see #1100c).

Parameters

NameInTypeRequiredDescription
conversation_idpathintegerrequired

Request body: application/json

Responses

CodeDescription
200Successful Response
422Validation Error

POST /api/support/ai/conversations/{conversation_id}/messages

Create Message

Submit a user turn.

Order per LLD §3:

  1. master flag → typed-degraded master_flag_off if off
  2. tenant + user scope assertion
  3. rate-limit + cost-cap gate (#1133 critical gap)
  4. ownership check on conversation_id (cross-tenant 404)
  5. classifier — refused intents short-circuit (no LLM call, no assistant turn row; user turn + classification persisted)
  6. allowed intents:
    • SSE clients (Accept: text/event-stream) get a streaming assistant turn through _stream_assistant_response, Layer D output filter applied on accumulated text
    • JSON clients get a runtime_not_wired typed-degraded — SSE is the supported path for #1095b

Parameters

NameInTypeRequiredDescription
conversation_idpathintegerrequired
acceptheaderoptional

Request body: application/json

Responses

CodeDescription
200Successful Response
422Validation Error

POST /api/support/ai/disclosure/accept

Accept Disclosure

Pin AI-disclosure acceptance for the user (LLD §10).

Idempotent: re-accepting the same version is a no-op (the latest accepted_at simply moves forward).

Request body: application/json

Responses

CodeDescription
200Successful Response
422Validation Error

GET /api/support/ai/disclosure/status

Disclosure Status

Has the user accepted the current AI-disclosure version (LLD §10)?

Responses

CodeDescription
200Successful Response

GET /api/support/ai/quota

Get Quota Status

Return the caller’s current AI Support quota status.

Responses

CodeDescription
200Successful Response