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

# Evaluate rule

> Evaluate one rule against supplied input context and return rule-node results.

Evaluates a rule directly from an input context payload. Use this when you want to test rule behavior without binding the evaluation to an existing conversation.

## Headers

<ParamField header="Authorization" type="string" required>
  Bearer token containing your Fini workspace API key. Format: `Bearer fini_...` The key needs `write` scope.
</ParamField>

<ParamField header="Content-Type" type="string" required>
  `application/json`
</ParamField>

## Path parameters

<ParamField path="id" type="string" required>
  Rule ID to evaluate.
</ParamField>

## Body parameters

<ParamField body="inputContext" type="object" required>
  Input context to evaluate the rule against.
</ParamField>

<ParamField body="inputSchemaOverrides" type="object">
  Optional schema overrides for the evaluation.
</ParamField>

## Response

Returns an array of rule-node evaluation results.

<RequestExample>
  ```bash cURL theme={null}
  curl --request POST \
    --url 'https://api-prod.usefini.com/v2/hc-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/evaluate/public' \
    --header 'Authorization: Bearer fini_your_api_key' \
    --header 'Content-Type: application/json' \
    --data '{
    "inputContext": {
      "name": "Example",
      "value": "message"
    },
    "inputSchemaOverrides": {
      "name": "Example",
      "value": "message"
    }
  }'
  ```

  ```javascript Node.js theme={null}
  const response = await fetch('https://api-prod.usefini.com/v2/hc-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/evaluate/public', {
    method: 'POST',
    headers: {
      Authorization: 'Bearer fini_your_api_key',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
    'inputContext': {
      'name': 'Example',
      'value': 'message'
    },
    'inputSchemaOverrides': {
      'name': 'Example',
      'value': 'message'
    }
  }
    )
  });

  const data = await response.json();
  ```

  ```python Python theme={null}
  import requests

  response = requests.post(
      "https://api-prod.usefini.com/v2/hc-rules/4f5ef695-d03b-4d56-8fef-7f2bd5c17ef3/evaluate/public",
      headers={"Authorization": "Bearer fini_your_api_key", "Content-Type": "application/json"},
      json={
      "inputContext": {
          "name": "Example",
          "value": "message"
      },
      "inputSchemaOverrides": {
          "name": "Example",
          "value": "message"
      }
  },
  )

  data = response.json()
  ```
</RequestExample>

<ResponseExample>
  ```json 200 OK theme={null}
  {
    "matched": true,
    "path": [
      "Refund escalation"
    ],
    "output": {
      "reply": "Escalate refund request with order context."
    }
  }
  ```
</ResponseExample>

<Note>
  This route uses synthetic public-API test identifiers for the bot, trace, and session context. Use [Evaluate conversation rule](/en/api-reference/evaluate-conversation-rule) when you need to evaluate against a real conversation.
</Note>
