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

# Resolve

> POST /v1/resolve. One value for one declared fact at one point in time, chosen by the declared policy, or a refusal with every candidate attached.

The fact must be [declared](/api-reference/facts) first. Candidates are the nodes carrying that `fact_key` that were known at `as_of` (and, with `valid_at`, in force then). The declared policy picks one. When it cannot, the answer says so and attaches every candidate.

## Request

<ParamField body="fact" type="string" required>
  The `fact_key`.
</ParamField>

<ParamField body="as_of" type="timestamp or date" required />

<ParamField body="valid_at" type="timestamp" />

<ParamField body="rules_as_of" type="timestamp">
  Apply the declaration that was in force at this instant instead of at `as_of`. Declarations are time-aware, so a fact declared today is `undeclared_fact` for a 2024 `as_of` unless you pass `rules_as_of`. When given, it is recorded in the certificate.
</ParamField>

## Response

Always `200`.

<ResponseField name="status" type="string">
  `answered` or `no_answer`.
</ResponseField>

<ResponseField name="value" type="any">
  The chosen `fact_value`, when answered.
</ResponseField>

<ResponseField name="reason" type="string">
  When `no_answer`: `undeclared_fact` (no declaration at that instant), `no_data` (no node carries this key), `not_yet` (values exist but none was known at `as_of`), `no_value_at` (none in force at `valid_at`), `unresolved_conflict` (the policy cannot choose; all candidates attached).
</ResponseField>

<ResponseField name="policy" type="string">
  The policy applied.
</ResponseField>

<ResponseField name="candidates" type="object[]">
  Every candidate considered, with its value and times.
</ResponseField>

<ResponseField name="certificate" type="object">
  Scoped to this fact. Carries `rules_as_of` when it was given.
</ResponseField>

<CodeGroup>
  ```bash Request theme={null}
  curl -s -X POST $TCKG/v1/resolve -H 'content-type: application/json' -d '{
    "fact": "belief:user:randy:NVDA:direction",
    "as_of": "2024-10-01", "rules_as_of": "2026-10-03T07:30:00Z"
  }'
  ```

  ```json Response (answered) theme={null}
  {"status": "answered", "value": {"direction": "down"}, "policy": "latest_valid",
   "candidates": [{"value": {"direction": "down"}, "asserted_at": "2024-09-18T00:00:00+00:00", "...": "..."},
                  {"value": {"direction": "up"},   "asserted_at": "2024-03-15T00:00:00+00:00", "...": "..."}],
   "certificate": {"fact": "belief:user:randy:NVDA:direction", "as_of": "2024-10-01T23:59:59.999999+00:00",
                   "rules_as_of": "2026-10-03T07:30:00+00:00", "tx_as_of": "..."}}
  ```

  ```json Response (conflict) theme={null}
  {"status": "no_answer", "reason": "unresolved_conflict", "policy": "latest_valid",
   "candidates": [{"value": {"direction": "up"}, "...": "..."}, {"value": {"direction": "down"}, "...": "..."}],
   "certificate": {"...": "..."}}
  ```
</CodeGroup>

Add `"valid_at": "2024-06-01"` to the first request to ask "what was in force in June, as known in October": the answer is `up`.


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