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

# List Terms Versions

> List superseded versions of the terms of use for a market

Returns the version history of the market's terms of use, newest first. Every save keeps the superseded text as a version, so the terms a market presented at any point stay recoverable and auditable.

Version bodies are not included here. This endpoint answers what changed and when.

## Path Parameters

<ParamField path="marketId" type="string" required>Market ID.</ParamField>

## Query Parameters

<ParamField query="limit" type="integer" default="25">
  Versions to return. Minimum 1, maximum 100.
</ParamField>

## Response Fields

<ResponseField name="data" type="object">
  <Expandable>
    <ResponseField name="versions" type="array">
      Versions ordered by `version` descending. Empty when the market has no terms.

      <Expandable>
        <ResponseField name="id" type="string">Version record ID.</ResponseField>
        <ResponseField name="version" type="integer">Version number.</ResponseField>
        <ResponseField name="title" type="string">Document title at that version.</ResponseField>
        <ResponseField name="contentHash" type="string">Hash of the content at that version.</ResponseField>
        <ResponseField name="curatorAddress" type="string">Address of the lender of record that saved it.</ResponseField>
        <ResponseField name="published" type="boolean">Whether that version was published rather than left as a draft.</ResponseField>
        <ResponseField name="createdAt" type="string">ISO 8601 timestamp.</ResponseField>
      </Expandable>
    </ResponseField>

    <ResponseField name="current" type="integer">The market's current version number, or null when no terms exist.</ResponseField>
  </Expandable>
</ResponseField>

<RequestExample>
  ```bash cURL theme={null}
  curl "https://api.trusset.org/lending-external-securities/api/markets/{marketId}/terms/versions?limit=10" \
    -H "X-API-Key: trusset_your_key_here"
  ```
</RequestExample>

<ResponseExample>
  ```json Response theme={null}
  {
    "success": true,
    "data": {
      "versions": [
        {
          "id": "sectermsv_003",
          "version": 2,
          "title": "ACME Secured Lending Facility: Terms of Use",
          "contentHash": "0x51ab7c206e94d38f1c0b7ae5390d24c68f1b0537ad92e4c6108b53f7d420ae19",
          "curatorAddress": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
          "published": true,
          "createdAt": "2025-06-02T16:41:09.000Z"
        },
        {
          "id": "sectermsv_002",
          "version": 1,
          "title": "ACME Secured Lending Facility: Terms of Use",
          "contentHash": "0xc06e3f9145b8a27d0e5347fb1c9820a6d4738e5107ba2c9df6410a83e27b5cd4",
          "curatorAddress": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
          "published": true,
          "createdAt": "2025-05-28T14:03:07.000Z"
        }
      ],
      "current": 3
    }
  }
  ```

  ```json Response - No Terms theme={null}
  {
    "success": true,
    "data": {
      "versions": [],
      "current": null
    }
  }
  ```
</ResponseExample>

## Error Codes

| Code                | HTTP  | Cause                                   |
| ------------------- | ----- | --------------------------------------- |
| `NO_MARKET_ADDRESS` | `400` | The market has no on-chain address      |
| `MARKET_NOT_FOUND`  | `404` | No market with this ID on your instance |
