> ## 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 Templates

> List the templates of this instance's terms library

Returns the templates of this instance's terms library. A template is a terms of use document kept once and bound to many markets: [Save Terms](https://docs.trusset.org/endpoints/lending/save-terms.md) with `templateId` publishes its text on one market, and a [standing policy](https://docs.trusset.org/endpoints/operators/list-standing-policies.md) publishes it on every market adopted under the policy. Only the instance that authored a template can bind it.

Templates are versioned. A change to the title or the text writes a new version, and a market bound to the template keeps the version it published until it is bound again. `usage` counts the markets on each version state.

Any key of the instance can read the library. Creating, editing and archiving templates needs an account Trusset approved as a lender of record, which `canAuthor` reports. This is a database read: nothing is read from the chain.

## Query Parameters

**includeArchived** `string` (default: false)

`true` or `1` to include archived templates. Any other value leaves them out.

## Response Fields

**data** `object`

**templates** `array`

Templates that are not archived first, then archived ones, each group by last change, newest first. The text itself is not included: read it with [Get Terms Template](https://docs.trusset.org/endpoints/lending/get-terms-template.md).

**id** `string`

Template ID. Save Terms takes it as `templateId`, and a standing policy as `termsTemplateId`.

**instanceId** `string`

The instance that authored the template.

**title** `string`

Template title.

**version** `integer`

Current version. `1` for a new template, raised by every change to the title or the text.

**contentHash** `string`

keccak256 over the UTF-8 bytes of the current text.

**archived** `boolean`

`true` once archived. An archived template cannot be bound to a market or a standing policy.

**archivedAt** `string`

ISO 8601 time of archiving, or `null`.

**createdBy** `string`

The issuer account that created the template, or `null`.

**updatedBy** `string`

The issuer account that last changed it, or `null`.

**createdAt** `string`

ISO 8601.

**updatedAt** `string`

ISO 8601.

**contentBytes** `integer`

Size of the current text in bytes of UTF-8.

**usage** `object`

The markets whose terms are bound to the template.

**markets** `integer`

Every market bound to the template, in any state.

**current** `integer`

Markets serving the template's current version as published.

**outdated** `integer`

Markets serving an older version, not customised.

**customised** `integer`

Markets whose text was edited after binding.

**unpublished** `integer`

Markets whose bound terms are a draft or offline.

**canAuthor** `boolean`

Whether this account may create, edit and archive templates: `true` only for an account Trusset approved as a lender of record.

```bash cURL theme={null}
curl "https://api.trusset.org/lending-external-securities-v2/api/markets/terms-library?includeArchived=true" \
  -H "X-API-Key: trusset_your_key_here"
```

```typescript TypeScript theme={null}
const res = await fetch(
  'https://api.trusset.org/lending-external-securities-v2/api/markets/terms-library?includeArchived=true',
  { headers: { 'X-API-Key': 'trusset_your_key_here' } }
);
const { data } = await res.json();
const live = data.templates.filter((template) => !template.archived);
```

```json Response theme={null}
{
  "success": true,
  "data": {
    "templates": [
      {
        "id": "cmwh2t9e10002l80d7s3k5m8c",
        "instanceId": "cmrz4d1v20000cghx8k6p3m7t",
        "title": "Secured credit line, house terms",
        "version": 3,
        "contentHash": "0x6c1f0b2e9a47d385c2e0f81b97a4d6c3e5f2a1b0c9d8e7f6a5b4c3d2e1f0a9b8",
        "archived": false,
        "archivedAt": null,
        "createdBy": "cmrz3a8q10000cghxf5w2n9k4",
        "updatedBy": "cmrz3a8q10000cghxf5w2n9k4",
        "createdAt": "2026-11-10T08:15:00.000Z",
        "updatedAt": "2026-11-16T13:58:22.000Z",
        "contentBytes": 4812,
        "usage": {
          "markets": 4,
          "current": 2,
          "outdated": 1,
          "customised": 1,
          "unpublished": 0
        }
      }
    ],
    "canAuthor": true
  },
  "error": null,
  "metadata": {
    "timestamp": "2026-11-17T10:00:00.000Z",
    "requestId": "550e8400-e29b-41d4-a716-446655440000",
    "instanceId": "cmrz4d1v20000cghx8k6p3m7t"
  }
}
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.