> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mokaru.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Update Cover Letter

> Update a cover letter - only provided fields change

## Overview

Update any field on a cover letter. Only fields you include in the request are modified.

<Note>
  **Plus plan only.** Returns `403` with `{ requiresUpgrade: true }` if the user is on the free plan.
</Note>

<Note>
  **Scope required:** `cover-letter:write` | **Rate limit:** 20 requests/min
</Note>

## Request

```bash theme={null}
PATCH /v1/cover-letter/{id}
```

### Path Parameters

<ParamField path="id" type="string" required>
  Cover letter id
</ParamField>

### Body Parameters

All fields are optional. At least one must be provided.

<ParamField body="title" type="string">Cover letter title.</ParamField>
<ParamField body="content" type="string">Body text.</ParamField>
<ParamField body="templateId" type="string">Cover letter template id. Pass `null` to clear.</ParamField>
<ParamField body="isDefault" type="boolean">Promote to default cover letter (unsets any existing default).</ParamField>
<ParamField body="variables" type="object">Template-variable map. Pass `null` to clear all variables.</ParamField>
<ParamField body="showName" type="boolean">Header: show name.</ParamField>
<ParamField body="showEmail" type="boolean">Header: show email.</ParamField>
<ParamField body="showPhone" type="boolean">Header: show phone.</ParamField>
<ParamField body="showAddress" type="boolean">Header: show address.</ParamField>
<ParamField body="headerAlignment" type="string">`left | center | right`.</ParamField>
<ParamField body="fontFamily" type="string">Font family.</ParamField>
<ParamField body="fontSize" type="number">Font size in pt.</ParamField>
<ParamField body="lineSpacing" type="number">Line spacing.</ParamField>

### Example

```bash theme={null}
curl -X PATCH "https://api.mokaru.ai/v1/cover-letter/clx_cl_abc" \
  -H "Authorization: Bearer mk_your_key" \
  -H "Content-Type: application/json" \
  -d '{ "variables": { "company": "Stripe", "contactPerson": "John Smith" } }'
```

## Response

<ResponseField name="success" type="boolean">Whether the update succeeded.</ResponseField>
<ResponseField name="id" type="string">The cover letter ID.</ResponseField>

```json theme={null}
{ "success": true, "id": "clx_cl_abc" }
```
