---
title: "Query contracts"
method: POST
path: "/contracts"
tags: ["contracts"]
deprecated: true
---

# Query contracts

`POST /contracts`

> **Deprecated.**

Queries v1 contracts matching the provided filter and returns a paginated result.

## Request body

- ContractFilter
  - `statuses` string[] — Filter by contract statuses.
  - `contractIDs` FileContractID[] — Filter by specific contract IDs.
  - `renewedFrom` FileContractID[] — Filter by the contract ID this contract was renewed from.
  - `renewedTo` FileContractID[] — Filter by the contract ID this contract was renewed to.
  - `renterKey` PublicKey[] — Filter by renter public keys.
  - `minNegotiationHeight` integer — Minimum block height at which the contract was negotiated.
  - `maxNegotiationHeight` integer — Maximum block height at which the contract was negotiated.
  - `minExpirationHeight` integer — Minimum contract expiration block height.
  - `maxExpirationHeight` integer — Maximum contract expiration block height.
  - `limit` integer — Maximum number of contracts to return per page. Defaults to 100.
  - `offset` integer — Number of contracts to skip for pagination.
  - `sortField` string — Field to sort results by. Valid values are "status", "negotiationHeight", "expirationHeight".
  - `sortDesc` boolean — Sort in descending order when true.

## Response `200`

Contracts matching filter.

- ContractsResponse
  - `count` integer, required — Total number of contracts matching the filter.
  - `contracts` Contract[], required — Contracts matching the filter for the current page.

## Changes

- **2026-02-28** `42e63d370299` — 2 breaking
  - the `limit` request property's max was decreased to `100.00`
  - the `limit` request property's min was increased to `1.00`
- **2026-02-28** `087a58eeff36` — 2 info
  - endpoint deprecated
  - the `limit` request property's min was decreased from `1.00` to `0.00`
- **2025-10-08** `103993fc0091` — 2 info
  - endpoint reactivated
  - the `limit` request property's max was increased from `100.00` to `500.00`

[Change history](https://skmtc.dev/siafoundation/apis/hostd-api/changes/contracts/post.md)

---

[API](https://skmtc.dev/siafoundation/apis/hostd-api.md) · [All operations](https://skmtc.dev/siafoundation/apis/hostd-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/siafoundation/hostd-api/revisions/08ff756929fc/schema)
