Answer a support request before the ticket is filed. This endpoint runs a non-streaming RAG pass and returns an answer plus a confidence-based deflection decision.
Auth: client key.

Request body

With a deflector_id, the request runs on that deflector’s stored confidence threshold, its own origin allowlist, and its configured source groups — none of which the calling page can widen. Without one it falls back to the package default, which is what pre-integration embeds send.

Response

Reporting the outcome

Send this when the user submits the ticket anyway. It’s the only signal worth sending: a user who read the answer and closed the tab is a success and reports nothing, so the deflection rate is computed as (answered − submitted) / answered. Answer quality is rated separately, through the same 👍/👎 feedback endpoint as every other surface — a deflection persists a conversation and messages like any other answer.

How confidence is computed

Confidence measures how well the retrieved passages actually answer this question, normalised so that 0.5 is the boundary between answerable and not however your deployment is configured. Three things override it:
  • An answer that declines (“I don’t have information about…”) drops below the boundary whatever the passages scored. A model saying it does not know is better evidence than any retrieval score.
  • A verdict that the corpus does not cover the question returns 0 — and the excerpts and citations are withheld from the model entirely, so it cannot assemble a plausible answer out of passages it was never given.
  • An answer whose claims are not supported by its own sources returns 0. Retrieval scoring cannot catch this: the passages can be right while the answer states a default value or a flag name that appears in none of them.
A check that could not run leaves the confidence alone. Failing every deflection closed on a provider outage trades one failure mode for a worse one.
  • deflect: true → show the answer with a “That answered my question” dismissal and a “Continue to submit ticket” escape hatch.
  • deflect: false or request failure → submit the form normally. Never block the user.
  • Follow-up questions → call the chat endpoint with thread_id set to the returned conversation_id.
  • Rate the answer → POST /api/v1/public/feedback with the returned message_id. The deflection rate says a ticket was avoided and nothing about whether the answer was right.
Every exchange is logged as a deflection trace and surfaces in analytics. Prefer zero code? Use the drop-in form deflector script.