`/question` hands you **one concise grounded answer** with citations, drawn from that customer's own index plus anything you indexed organisation-wide for all customers (see [Shared content across all customers](/docs/white-label/upsert-post)).

Reach for it when the result goes straight into your UI, or when you are feeding an agent and would rather spend a few hundred tokens than the user's full context. When you want the raw passages for your own model instead, use [`GET /context`](/docs/white-label/query-customer).

## Concise grounded answer

One short paragraph plus citations, cheap enough to render directly and small enough to keep an agent's context window intact:

```bash
curl "https://context-link.ai/api/v1/question?query=what+is+the+refund+window" \
  -H "Authorization: Bearer $ACME_TOKEN"
```

```json
{
  "result": "ok",
  "answer": "Opened items can be returned within 14 days only if they are faulty.",
  "citations": [ { "n": 1, "title": "Acme Supply refund policy", "url": null } ],
  "format": "markdown"
}
```

The default response stays exactly as shown above. To receive the answer in the same structured shape as [`GET /context`](/docs/white-label/query-customer), add `response_format=structured`:

```bash
curl "https://context-link.ai/api/v1/question?query=what+is+the+refund+window&response_format=structured" \
  -H "Authorization: Bearer $ACME_TOKEN"
```

```json
{
  "format": "structured",
  "query": "what is the refund window",
  "markdown": "Opened items can be returned within 14 days only if they are faulty.",
  "results": [
    {
      "content": "Opened items can be returned within 14 days only if they are faulty.",
      "position": null,
      "rank": 1,
      "score": null,
      "content_sha": "de102e75aefe228bd162c54bd468d184f3acdc0f4f422984452c24e70b7b84f0",
      "sources": [
        {
          "citation": 1,
          "uid": "refund-policy",
          "title": "Acme Supply refund policy",
          "url": "https://docs.example.com/refunds",
          "source_updated_at": "2026-08-12T03:14:15Z",
          "connection": {
            "uid": "support-site",
            "type": "Site",
            "name": "docs.example.com",
            "logo_url": "https://www.google.com/s2/favicons?sz=256&domain=docs.example.com"
          }
        }
      ]
    }
  ]
}
```

The structured response has zero or one result and never has a top-level `result`. When present, its `content` is the answer, `position` is `null`, `rank` is `1`, `score` is `null`, and `content_sha` is the answer's SHA-256 digest. `sources` contains the cited documents and their citation numbers and connection metadata. No context and a `503` model failure both return `markdown: null` and empty `results` in this format; the HTTP status distinguishes the model failure. If `response_format` is absent or has any value other than `structured`, `/question` returns the existing `result`, `answer`, `citations`, and `format` payload unchanged.

<figure style="margin: 1rem 0;">
<video src="/docs/white-label/rag-api-question-demo.mp4" poster="/docs/white-label/rag-api-question-poster.jpg" autoplay loop muted playsinline aria-label="A backend calling GET /api/v1/question with a per-customer token and receiving a concise cited answer from that customer's index" style="max-width: 100%; border-radius: 8px;"></video>
<figcaption style="margin-top: 0.5rem; font-size: 0.875rem; color: #6b7280;">The call from a partner's backend, and the answer rendered in their own product with the citations as footnotes.</figcaption>
</figure>

## Response fields

| Field | Type | Description |
|---|---|---|
| `result` | string | The outcome: `ok`, `no_context`, or `llm_unavailable`. |
| `answer` | string | The grounded answer, `null` on `no_context` and on `llm_unavailable`. |
| `citations` | array | The sources the model actually cited, empty unless `result` is `ok`. |
| `citations[].n` | integer | The marker number used for that source in the answer text. |
| `citations[].title` | string | The source document's title, or `Untitled` when it has none. |
| `citations[].url` | string | The source document's URL, `null` for content with no address such as pushed or memory posts. |
| `format` | string | Always `markdown`. |

The fields above describe the default response.

Structured response:

| Field | Type | Description |
|---|---|---|
| `format` | string | Always `structured`. |
| `query` | string | The question used to generate the answer. |
| `markdown` | string or null | The answer as markdown, or `null` when no answer was generated. |
| `results` | array | Zero or one answer result. |
| `results[].content` | string | The grounded answer. |
| `results[].position` | null | Always `null`. |
| `results[].rank` | integer | Always `1`. |
| `results[].score` | null | Always `null`. |
| `results[].content_sha` | string | SHA-256 digest of the answer. |
| `results[].sources` | array | The sources cited by the answer. |
| `results[].sources[].citation` | integer | The marker number used for that source in the answer. |
| `results[].sources[].uid` | string | The source document's public identifier. |
| `results[].sources[].title` | string | The source document's title. |
| `results[].sources[].url` | string | The source document's URL, or `null` when it has none. |
| `results[].sources[].source_updated_at` | string | When the source document was last updated, in ISO 8601 format. |
| `results[].sources[].connection` | object | The source connection's `uid`, `type`, `name`, and absolute `logo_url`. |

## Reading `result` in the default response

| Value | Meaning |
|---|---|
| `ok` | An answer was grounded in that customer's content. |
| `no_context` | Nothing in that customer's index was relevant. `answer` is `null`. |
| `llm_unavailable` | The model call failed. Served with a `503`. |

Asking one customer's token about another customer's content returns `no_context` in the default response, or `markdown: null` and empty `results` in the structured response; that is the isolation boundary doing its job.

Rate limit: 2 requests per 10 seconds, per token. Each request costs an LLM call of its own, which is why it is tighter than `/context`.

Health check for a stored token: `GET /api/v1/ping` with the same header.

`/question` and [`/context`](/docs/white-label/query-customer) accept the token in either `Authorization: Bearer <token>` or the bare `Authorization: <token>` form. Everything else in this guide requires the `Bearer` prefix.
