---
title: "Replace the workspace's rules"
method: PUT
path: "/v1/doc-gen/rules"
tags: ["Document Generation"]
---

# Replace the workspace's rules

`PUT /v1/doc-gen/rules`

## Request

- Base URL: `https://api.talonic.com`
- URL: `https://api.talonic.com/v1/doc-gen/rules`
- Auth: HTTP bearer

The submitted list is the complete set the workspace is left with; rules not in it are deleted. An entry without a name or a definition object is dropped. Requires a person at or above member behind the key.

## Request body

- DocGenRulesRequest
  - `rules` DocGenRule[], required
    - `name` string, required
    - `description` string
    - `definition` object, required: The rule, a JSON object whose shape depends on the rule kind (seven kinds). An unreadable definition yields no value when the rule is evaluated.

## Response `200`

The rules as stored.

- object
  - `data` DocGenRule[]
    - `name` string, required
    - `description` string
    - `definition` object, required: The rule, a JSON object whose shape depends on the rule kind (seven kinds). An unreadable definition yields no value when the rule is evaluated.

## Other responses

- `400`: The request is invalid.
- `403`: The API key does not have the required scope.

## Changes

- **2026-10-28** `0a485a46163e`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/talonic/apis/talonic-api/changes/v1/doc-gen/rules/put.md)

---

[API](https://skmtc.dev/talonic/apis/talonic-api.md) - [All operations](https://skmtc.dev/talonic/apis/talonic-api/llms.txt) - [OpenAPI document](https://skmtc.dev/talonic/apis/talonic-api/revisions/9f6d53e2ab5e?raw)
