---
title: "Verify query commitment"
method: POST
path: "/verify"
tags: ["odf-query"]
---

# Verify query commitment

`POST /verify`

A query proof can be stored long-term and then disputed at a later point
using this endpoint.

Example request:
```json
{
    "input": {
        "query": "select event_time, from, to, close from \"kamu/eth-to-usd\"",
        "queryDialect": "SqlDataFusion",
        "dataFormat": "JsonAoA",
        "include": ["Input", "Proof", "Schema"],
        "schemaFormat": "ArrowJson",
        "datasets": [{
            "id": "did:odf:fed0..26c4",
            "alias": "kamu/eth-to-usd",
            "blockHash": "f162..9a1a"
        }],
        "skip": 0,
        "limit": 3
    },
    "subQueries": [],
    "commitment": {
        "inputHash": "f162..2efc",
        "outputHash": "f162..b088",
        "subQueriesHash": "f162..d210"
    },
    "proof": {
        "type": "Ed25519Signature2020",
        "verificationMethod": "did:key:z6Mk..fwZp",
        "proofValue": "uJfY..seCg"
    }
}
```

Example response:
```json
{
    "ok": false,
    "error": {
        "kind": "VerificationFailed::OutputMismatch",
        "actual_hash": "f162..c12a",
        "expected_hash": "f162..2a2d",
        "message": "Query was reproduced but resulted in output hash different from expected.
                    This means that the output was either falsified, or the query
                    reproducibility was not guaranteed by the system.",
    }
}
```

See [commitments documentation](https://docs.kamu.dev/node/commitments) for details.

## Request body

- VerifyRequest
  - `commitment` Commitment, required
    - `inputHash` string, required
    - `outputHash` string, required
    - `subQueriesHash` string, required
  - `input` QueryRequest, required
    - `dataFormat` 'JsonAoS' | 'JsonSoA' | 'JsonAoA'
    - `datasets` DatasetState[], nullable — Optional information used to affix an alias to the specific [`odf::DatasetID`] and reproduce the query at a specific state in time
      - `alias` string, required — Alias to be used in the query
      - `blockHash` string
      - `id` string, required
    - `include` Include[] — What information to include
    - `limit` integer — Pagination: limits number of records in response to N
    - `query` string, required — Query string
    - `queryDialect` 'SqlDataFusion' | 'SqlFlink' | 'SqlRisingWave' | 'SqlSpark'
    - `schemaFormat` 'ArrowJson' | 'OdfJson' | 'OdfYaml' | 'Parquet' | 'ParquetJson'
    - `skip` integer — Pagination: skips first N records
  - `proof` Proof, required
    - `proofValue` string, required
    - `type` 'Ed25519Signature2020' | 'EcdsaSecp256k1Signature2019', required
    - `verificationMethod` string, required
  - `subQueries` SubQuery[], required — Information about processing performed by other nodes as part of the original operation
    - `commitment` Commitment, required
      - `inputHash` string, required
      - `outputHash` string, required
      - `subQueriesHash` string, required
    - `input` QueryRequest, required
      - `dataFormat` 'JsonAoS' | 'JsonSoA' | 'JsonAoA'
      - `datasets` DatasetState[], nullable — Optional information used to affix an alias to the specific [`odf::DatasetID`] and reproduce the query at a specific state in time
        - `alias` string, required — Alias to be used in the query
        - `blockHash` string
        - `id` string, required
      - `include` Include[] — What information to include
      - `limit` integer — Pagination: limits number of records in response to N
      - `query` string, required — Query string
      - `queryDialect` 'SqlDataFusion' | 'SqlFlink' | 'SqlRisingWave' | 'SqlSpark'
      - `schemaFormat` 'ArrowJson' | 'OdfJson' | 'OdfYaml' | 'Parquet' | 'ParquetJson'
      - `skip` integer — Pagination: skips first N records
    - `proof` Proof, required
      - `proofValue` string, required
      - `type` 'Ed25519Signature2020' | 'EcdsaSecp256k1Signature2019', required
      - `verificationMethod` string, required
    - `subQueries` object, required — Information about processing performed by other nodes as part of this operation

## Response `200`

- VerifyResponse
  - `error` union
    - union
      - object
        - `message` string, required
        - `kind` 'InvalidRequest::InputHash', required
      - object
        - `message` string, required
        - `kind` 'InvalidRequest::SubQueriesHash', required
      - object
        - `message` string, required
        - `kind` 'InvalidRequest::BadSignature', required
    - union
      - object
        - `actual_hash` string, required
        - `expected_hash` string, required
        - `message` string, required
        - `kind` 'VerificationFailed::OutputMismatch', required
      - object
        - `dataset_id` string, required
        - `message` string, required
        - `kind` 'VerificationFailed::DatasetNotFound', required
      - object
        - `block_hash` string, required
        - `dataset_id` string, required
        - `message` string, required
        - `kind` 'VerificationFailed::DatasetBlockNotFound', required
  - `ok` boolean, required — Whether validation was successful

## Other responses

- `400`

## Changes

- **2026-06-04** `af210e5a088a` — 2 info
  - added the new `EcdsaSecp256k1Signature2019` enum value to the request property `proof/type`
  - added the new `EcdsaSecp256k1Signature2019` enum value to the request property `subQueries/items/proof/type`
- **2025-08-03** `411fe35264fd` — 4 info
  - added the new `OdfJson` enum value to the request property `input/schemaFormat`
  - added the new `OdfJson` enum value to the request property `subQueries/items/input/schemaFormat`
  - added the new `OdfYaml` enum value to the request property `input/schemaFormat`
  - added the new `OdfYaml` enum value to the request property `subQueries/items/input/schemaFormat`
- **2025-07-29** `9aea0047e18e` — 6 breaking
  - removed the enum value `EcdsaSecp256k1Signature2019` of the request property `proof/type`
  - removed the enum value `EcdsaSecp256k1Signature2019` of the request property `subQueries/items/proof/type`
  - removed the enum value `OdfJson` of the request property `input/schemaFormat`
  - removed the enum value `OdfJson` of the request property `subQueries/items/input/schemaFormat`
  - …2 more

[Change history](https://skmtc.dev/kamu-data/apis/kamu-rest-api/changes/verify/post.md)

---

[API](https://skmtc.dev/kamu-data/apis/kamu-rest-api.md) · [All operations](https://skmtc.dev/kamu-data/apis/kamu-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/kamu-data/kamu-rest-api/revisions/623327a42b01/schema)
