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

# Update Email Component

> Update an email component's metadata or replace its blocks.

# Update Email Component

You can rename a component, change its description or type, or replace its blocks. Omitted fields are preserved.

Replacing `blocks` bumps the component `version`. Emails that already cloned the component keep the copy they were built with; the new version applies to emails built afterwards.

<Note>
  Editing the component pinned as the default footer keeps its unsubscribe link
  enabled, the same as writing it through the defaults route.
</Note>

## Request

<ParamField path="componentId" type="string" required>
  Email component ID.
</ParamField>

<ParamField body="name" type="string">
  New component name, unique within the company.
</ParamField>

<ParamField body="description" type="string">
  New description. Send an empty string to clear it.
</ParamField>

<ParamField body="blocks" type="array">
  Replacement blocks. Replaces the whole block list and must contain at least
  one block.
</ParamField>

<ParamField body="componentType" type="string">
  `section` or `footer`.
</ParamField>

```bash theme={null}
curl -X PATCH "https://api.sequenzy.com/api/v1/email-components/cmp_123" \
  -H "Authorization: Bearer API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Promo banner v2"}'
```

## Responses

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "component": {
      "id": "cmp_123",
      "companyId": "comp_123",
      "name": "Promo banner v2",
      "description": null,
      "blocks": [{ "id": "block_1", "type": "text", "content": "<p>Sale</p>" }],
      "componentType": "section",
      "defaultSlot": null,
      "version": 2,
      "createdAt": "2026-01-10T10:00:00.000Z",
      "updatedAt": "2026-08-12T11:00:00.000Z"
    }
  }
  ```

  ```json 400 theme={null}
  {
    "success": false,
    "error": "No supported fields provided"
  }
  ```

  ```json 401 theme={null}
  {
    "success": false,
    "error": "Invalid API key"
  }
  ```

  ```json 404 theme={null}
  {
    "success": false,
    "error": "Component not found"
  }
  ```

  ```json 409 theme={null}
  {
    "success": false,
    "error": "A component with this name already exists"
  }
  ```
</ResponseExample>
