> ## 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.

# Create Email Component

> Create a reusable email component from a block list.

# Create Email Component

You can save a block group as a reusable component. Component names are unique per company.

<Note>
  Creating a component with `componentType: "footer"` does not pin it as the
  company default footer. Use [Set Default Email
  Component](/api-reference/email-components/set-default) for that.
</Note>

## Request

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

<ParamField body="blocks" type="array" required>
  Blocks that make up the component. Must contain at least one block.
</ParamField>

<ParamField body="description" type="string">
  Optional human-readable description.
</ParamField>

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

```bash theme={null}
curl -X POST "https://api.sequenzy.com/api/v1/email-components" \
  -H "Authorization: Bearer API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Promo banner","blocks":[{"type":"text","content":"<p>Sale</p>"}]}'
```

## Responses

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

  ```json 400 theme={null}
  {
    "success": false,
    "error": "At least one block is required"
  }
  ```

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

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