> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mithunai.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Record what a visitor did after the form deflector answered

> Record whether the support-form deflector's answer solved the visitor's question, or whether they sent the form anyway. Counted in usage analytics.

The widget's [form deflector](https://docs.mithunai.com/channels/widget.md#form-deflector) shows a cited answer beside a support form before it is sent. This records what happened next on the thread the answer came from: `deflected` when the visitor said it solved their question and did not send the form, `submitted` when they sent it anyway. The embedded widget calls it for you; call it yourself only if you build your own deflector on the widget API.

The outcome is stored on the conversation and counted in [Get usage analytics](https://docs.mithunai.com/api-reference/analytics/get-usage.md) under `deflections`. A later call replaces an earlier one, so a visitor who said it helped and then sent the form counts as `submitted`. Nothing else about the conversation changes. The call is recorded in the audit log as `conversation.deflection`, with the outcome and nothing else.

Call this from the visitor's browser with the embed's **public widget key** in `X-MITHUNAI-Widget-Key` and the thread's `X-MITHUNAI-Visitor-Token`. A missing or wrong token, an unknown conversation ID and a malformed ID all return the same `404`. See [Website widget](https://docs.mithunai.com/channels/widget.md).

**conversation\_id** `string` *required*

The conversation's ID (UUID), from [Start a widget
conversation](https://docs.mithunai.com/api-reference/widget/start-thread.md).

**X-MITHUNAI-Widget-Key** `string` *required*

The deployment's public widget key, `mithunai_wk_…`.

**X-MITHUNAI-Visitor-Token** `string` *required*

The visitor token returned when this thread was started.

**Origin** `string` *required*

Set by the browser. It must exactly match an origin allowed for this deployment.

**outcome** `string` *required*

`deflected` or `submitted`. Anything else returns `400`.

## Response

**outcome** `string` *required*

The outcome recorded.

```bash cURL theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl --request POST "$MITHUNAI_URL/mithunai/api/v1/widget/conversations/5d1c8e2a-4b7f-4a90-9c36-0e2f7b8a1d45/deflection" \
  --header "X-MITHUNAI-Widget-Key: $MITHUNAI_WIDGET_KEY" \
  --header "X-MITHUNAI-Visitor-Token: $VISITOR_TOKEN" \
  --header "Origin: https://help.example.com" \
  --header "Content-Type: application/json" \
  --data '{"outcome": "deflected"}'
```

```json 200 theme={"theme":{"light":"github-light","dark":"github-dark"}}
{ "outcome": "deflected" }
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.