# keepContractAsTemplate

Keep a one-off contract as a template under a name and category: it joins the template list and pickers. templateId is the contract's own (listContracts, listContactContracts, listDealContracts). One-way.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "keepContractAsTemplate", "variables": {...} }`
- Scope: `WRITE`
- Type: mutation
- Idempotency: honors `Idempotency-Key` (24 h)
- Rate-limited: no

## Variables

- `templateId`: `ID!` (required)
- `name`: `String!` (required)
- `category`: `String!` (required)

## Response (data, an example)

```json
{
  "contractsMutation": {
    "saveAsTemplate": {
      "id": "<ID>",
      "name": "…",
      "category": "…",
      "oneOff": true
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
    "operationId": "keepContractAsTemplate",
    "variables": {
      "templateId": "<templateId>",
      "name": "<String>",
      "category": "<String>"
    }
  }'
```
