# archiveContractTemplate

Take a template out of the list and the pickers (status ARCHIVED). Contracts already sent from it are not changed, but they leave the Contracts list with it for its Archived view, so tell the person how many went out first (listContractTemplates). Undo with unarchiveContractTemplate. A one-off PDF (sent without a template) is discarded for good instead. Needs the manage contracts capability.

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

## Variables

- `input`: `AdminContractArchiveTemplateInput!` (required)
  - `templateId`: `ID!` (required)

## Response (data, an example)

```json
{
  "contractsMutation": {
    "archiveTemplate": {
      "id": "<ID>",
      "name": "…",
      "status": "DRAFT"
    }
  }
}
```

## 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": "archiveContractTemplate",
    "variables": {
      "input": {
        "templateId": "<templateId>"
      }
    }
  }'
```
