# Policies tools

[All tool areas](/docs/tools.md). Each tool acts within your access.

## Policies

### list_terms

List every version of the terms, newest first: the organization's, or a product's own. The newest of a product's own replaces the organization's for it; get_settings shows the policies.

Reads · Members of an organization · Needs settings:read

#### Input

- `productId` — string; optional. A product's own terms, which replace the organization's for it; leave out for the organization's

#### Output

- `terms` — array; required. 
  - `terms[]` — object; optional. 
    - `terms[].id` — string; required. 
    - `terms[].productId` — string or null; required. The product whose own terms these are; null: the organization's
    - `terms[].version` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
    - `terms[].body` — string; required. 
    - `terms[].createdAt` — string; required.  format: "date-time"

### publish_terms

Publish a new version of the terms guests accept at checkout: the organization's, or a product's own (which replace the organization's for that product). Versions are never edited: each change is a new version, holds placed from now on lock it, and orders keep the version their guest accepted. Undo removes the version until a guest has held seats under it. Returns a preview to confirm; a person confirms it, never an agent on its own.

Changes · Members of an organization · Needs policies:write

#### Input

- `productId` — string; optional. A product's own terms, which replace the organization's for it; leave out for the organization's
- `body` — string; required. The full terms, as plain text (paragraphs separated by blank lines) minLength: 1; maxLength: 100000

#### Output

- `id` — string; required. 
- `productId` — string or null; required. The product whose own terms these are; null: the organization's
- `version` — integer; required.  minimum: -9007199254740991; maximum: 9007199254740991
- `body` — string; required. 
- `createdAt` — string; required.  format: "date-time"
