# Create a document template

Publishes the next version of one kind of paper this workspace issues. Body: `kind` (`fee_agreement` or `financing_disclosure`), `title` and `body` are the words; `state` is the two-letter US state they are written for and absent means every state, which is what a fee agreement always is; `bodyFormat` is markdown (the default) or text. There is no edit and no delete by design — a version's words are immutable, so correcting them is publishing version n+1, and paper already issued keeps pointing at the version it was made from. A workspace admin's, because the words the company issues bind the company.

Access class: `workspace:admin`.

## Endpoint

`POST /v1/document-templates`

## Request body

Content type: `application/json`.

```json
{
  "body": {
    "body": "string",
    "bodyFormat": "string",
    "kind": "string",
    "state": "string",
    "title": "string"
  },
  "params": {},
  "query": {}
}
```

## Responses

### 201

the action's answer

Content type: `application/json`.

```json
{
  "data": {
    "body": "string",
    "bodyFormat": "string",
    "createdAt": "string",
    "createdBy": 1,
    "id": "",
    "kind": "string",
    "state": "string",
    "system": true,
    "title": "string",
    "version": 1
  }
}
```

### default

a refusal: `{"error": "<what a person needs to read>"}`. 401 no credential, 402 the plan does not include this, 403 the seat does not, 404 the thing does not exist or is not yours to see.

Content type: `application/json`.

```json
{
  "error": "string"
}
```
