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

# Update Standing Policy

> Change a standing policy, bind another template, or switch it off and on

Changes one standing policy. Send only the fields to change: a field you leave out keeps its value. This is a database write: nothing is signed and nothing goes on chain. See [List Standing Policies](https://docs.trusset.org/endpoints/operators/list-standing-policies.md) for what a policy does.

Switching a policy off with `enabled: false` is the reversible pause: the policy stays stored and matches no market until it is switched on again. [Delete Standing Policy](https://docs.trusset.org/endpoints/operators/delete-standing-policy.md) removes it for good.

Only an account Trusset approved as a lender of record can write policies. Any other account is refused with `403 CURATOR_NOT_APPROVED` before the body is read.

## Path Parameters

**policyId** `string` *required*

Policy ID from [List Standing Policies](https://docs.trusset.org/endpoints/operators/list-standing-policies.md), 1 to 100 characters.

## Body Parameters

**kind** `string`

`DEPLOYER` or `COLLATERAL_TOKEN`.

**address** `string`

The deployer wallet or collateral token, `0x` followed by 40 hex characters, not the zero address. Stored lowercased. When another policy of this instance already names the same `kind` and `address`, the change is refused with `409 STANDING_POLICY_EXISTS`.

**label** `string | null`

At most 120 characters. `null` or a blank label clears it.

**termsTemplateId** `string | null`

Binds another template of this instance's [terms library](https://docs.trusset.org/endpoints/lending/list-terms-templates.md), 1 to 100 characters. `null` binds none. An archived template is refused with `409 TEMPLATE_ARCHIVED`.

**acceptanceTerms** `object | null`

Replaces the whole object: keys you leave out are removed, not kept. `null` clears it. The keys and their rules are those of [Create Standing Policy](https://docs.trusset.org/endpoints/operators/create-standing-policy.md#body-parameters), and any other key is refused with `400 VALIDATION_ERROR`.

**agreementPolicy** `object | null`

Replaces the loan agreement policy, with the rules of [Create Standing Policy](https://docs.trusset.org/endpoints/operators/create-standing-policy.md#body-parameters). `null` clears it. A change stamps `agreementPolicySetAt`; markets adopted before that keep what they have.

**enabled** `boolean`

`false` switches the policy off, `true` switches it back on. A policy whose bound template has been archived cannot be switched on: the request is refused with `409 TEMPLATE_ARCHIVED`, because a market adopted under it would go live without terms of use. Bind another template, or `null`, in the same request.

## Response Fields

**data** `object`

**policy** `object`

The policy after the change, with the fields of a row on [List Standing Policies](https://docs.trusset.org/endpoints/operators/list-standing-policies.md#response-fields) except `template`.

```bash cURL theme={null}
curl -X PUT "https://api.trusset.org/lending-external-securities-v2/api/markets/standing-policies/cmwh3p7k20004l80dq2x9v1ab" \
  -H "X-API-Key: trusset_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "enabled": true,
    "termsTemplateId": "cmwh5c2d80007l80dn4r6t8wy"
  }'
```

```typescript TypeScript theme={null}
const res = await fetch(
  `https://api.trusset.org/lending-external-securities-v2/api/markets/standing-policies/${policyId}`,
  {
    method: 'PUT',
    headers: {
      'X-API-Key': 'trusset_your_key_here',
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ enabled: true, termsTemplateId: 'cmwh5c2d80007l80dn4r6t8wy' })
  }
);
const { success, data, error } = await res.json();
if (!success) throw new Error(`${error.code}: ${error.message}`);
```

```json Response theme={null}
{
  "success": true,
  "data": {
    "policy": {
      "id": "cmwh3p7k20004l80dq2x9v1ab",
      "instanceId": "cmrz4d1v20000cghx8k6p3m7t",
      "kind": "DEPLOYER",
      "address": "0x1234f9a07c6b53d81e2a4f70c9b385d6014a7e52",
      "label": "ACME Industrial AG",
      "termsTemplateId": "cmwh5c2d80007l80dn4r6t8wy",
      "acceptanceTerms": {
        "admin": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
        "issuer": "0x4e91a7c05d3b62f18a0c94e7db2358f1c60a4e93",
        "realizationMode": "ISSUER_REDEMPTION",
        "liquidityCommitment": "250000",
        "maxFixedRateBps": 1200
      },
      "enabled": true,
      "createdBy": "cmrz3a8q10000cghxf5w2n9k4",
      "updatedBy": "cmrz3a8q10000cghxf5w2n9k4",
      "createdAt": "2026-11-15T09:20:11.000Z",
      "updatedAt": "2026-11-17T08:41:30.000Z"
    }
  },
  "error": null,
  "metadata": {
    "timestamp": "2026-11-17T08:41:30.000Z",
    "requestId": "550e8400-e29b-41d4-a716-446655440000",
    "instanceId": "cmrz4d1v20000cghx8k6p3m7t"
  }
}
```

```json Error - Template Archived theme={null}
{
  "success": false,
  "data": null,
  "error": {
    "code": "TEMPLATE_ARCHIVED",
    "message": "The terms template this policy binds (\"Secured credit line, house terms\") is archived, so the policy cannot be switched on: a market adopted under it would go live without terms of use. Bind another template, or none, in the same request."
  },
  "metadata": {
    "timestamp": "2026-11-17T08:40:02.000Z",
    "requestId": "550e8400-e29b-41d4-a716-446655440001",
    "instanceId": "cmrz4d1v20000cghx8k6p3m7t"
  }
}
```

## Error Codes

| Code | HTTP | Cause |
| - | - | - |
| `VALIDATION_ERROR` | `400` | `policyId` or a field breaks its type, format or length rule, or `acceptanceTerms` carries a key it does not take |
| `INVALID_STANDING_POLICY` | `400` | `address` or an address in `acceptanceTerms` is the zero address |
| `STANDING_POLICY_SAVE_FAILED` | `400` | The policy could not be saved for a reason that carries no code of its own |
| `CURATOR_NOT_APPROVED` | `403` | Trusset has not approved this account to act as a lender of record |
| `STANDING_POLICY_NOT_FOUND` | `404` | No policy with this ID exists on this instance, also when another request removed it while this one ran |
| `TEMPLATE_NOT_FOUND` | `404` | `termsTemplateId` names no template of this instance |
| `STANDING_POLICY_EXISTS` | `409` | Another policy of this instance already names this `kind` and `address` |
| `TEMPLATE_ARCHIVED` | `409` | `termsTemplateId` names an archived template, or `enabled: true` switches on a policy whose template is archived without binding another in the same request |
| `RATE_LIMIT_EXCEEDED` | `429` | More than 10 writes in the minute |


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