# renderContentTemplate

Render a content template against a contact: collapse [a|b] spintax and substitute merge fields: the CONTACT vocabulary updateWorkflowGraph lists ({{firstName}}, {{contactPropertyAddress}}, {{userFirstName}}, …), matched exactly and case-sensitively. Returns the rendered subject/body plus missingVariables: every token that did NOT render, whether it had no value for this contact or could not render at all because contactId was omitted (contact tokens then remain as literal {{...}} text AND are listed as missing). Inspect missingVariables (empty = fully rendered). Send with sendText / sendEmail (behind the organization’s send consent attestation). Pass spintaxSeed for a deterministic variant. Omitting contactId previews spintax and user tokens only: never send a no-contact render of a template with contact tokens.

- Call: `POST https://server.goliathdata.com/api/v1/call` with `{ "operationId": "renderContentTemplate", "variables": {...} }`
- Scope: `READ`
- Type: query
- Idempotency: a read; rejects `Idempotency-Key`
- Rate-limited: no

## Variables

- `templateId`: `ID!` (required)
- `contactId`: `ID`
- `spintaxSeed`: `Int`

## Response (data, an example)

```json
{
  "workflowAutomationsQuery": {
    "renderContentTemplate": {
      "subject": "…",
      "body": "…",
      "bodyFormat": "…",
      "missingVariables": [
        "…"
      ],
      "usedVariables": [
        "…"
      ]
    }
  }
}
```

## Example

```bash
curl https://server.goliathdata.com/api/v1/call \
  -H "Authorization: Bearer $GOLIATH_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operationId": "renderContentTemplate",
    "variables": {
      "templateId": "<templateId>"
    }
  }'
```
