---
title: "Query Knowledge"
method: POST
path: "/knowledge/query"
tags: ["knowledge"]
---

# Query Knowledge

`POST /knowledge/query`

## Request

- Base URL: `https://api-docs.upsmith.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api-docs.upsmith.com/knowledge/query`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

## Headers

- `timezone` string
- `x-user-id` string, nullable
- `x-actor-email` string, nullable
- `x-request-source` string, nullable
- `x-operation-id` string, nullable
- `x-commit-message` string, nullable
- `x-confirmation-id` string, nullable
- `x-chat-id` string, nullable
- `organization-id` string, nullable

## Request body

- PropertyQuery
  - `entity_ids` string[], required
  - `property_ids` string[], required
  - `filters` PropertyFilter[]
    - `property_id` string, required
    - `operator` 'eq' | 'gte' | 'lte'
    - `value` union, required
      - boolean
      - integer
      - number
      - string

## Response `200`

Successful Response

- PropertyQueryResponse
  - `evaluated_at` string, date-time, required
  - `properties` UpsmithKnowledgeContractsPropertiesPropertyDefinition[], required
    - `id` string, required
    - `subject_kind` string, required
    - `answer_type` string, required
    - `definition` object, required
    - `storage_id` string, nullable
    - `key` string, nullable
    - `version` integer, nullable
    - `storage_answer_type` string, nullable
  - `facts` PropertyValue[], required
    - `entity_id` string, required
    - `property_id` string, required
    - `fact_id` string, required
    - `run_id` string, nullable, required
    - `as_of` string, date-time, required
    - `status` 'known' | 'unknown' | 'disputed', required
    - `freshness` 'current' | 'stale', required
    - `value` unknown, required
    - `usable_value` unknown, required
    - `evidence_ids` string[], required
    - `property_type_id` string, nullable
    - `written_by` string, nullable
  - `evidence` UpsmithKnowledgeContractsPropertiesEvidenceReference[]
    - `id` string, required
    - `run_id` string, nullable, required
    - `source_kind` string, required
    - `source_ref` string, required
    - `observed_at` string, date-time, required

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/upsmith/apis/upsmith-api.md) - [All operations](https://skmtc.dev/upsmith/apis/upsmith-api/llms.txt) - [OpenAPI document](https://skmtc.dev/upsmith/apis/upsmith-api/revisions/cce8b07a5787?raw)
