> ## 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 Design System

> Adjust the visual identity every AI-generated email renders inside

Adjust the company's email design system. This is a partial update - only the fields you pass change - and it applies to every future AI email generation and sequence enrichment.

The adjustment is persisted into the company's `emailDesignPrompt` design direction text - the single source of truth: the new identity's sentences are prepended so they win any later parse, and custom prose the text carried is preserved below them. For free-prose edits, use `PATCH /companies/:companyId` with `emailDesignPrompt` instead.

## Request

<ParamField body="designCode" type="object">
  Partial visual-grammar adjustment. Fields: `kickerStyle` (`chip` |
  `letterspaced` | `none`), `titleAlignment` (`left` | `center`),
  `buttonShape` (`rounded` | `pill`), `dividerStyle` (`line` | `space`),
  `density` (`airy` | `compact`), `openerTreatments` (array drawn from
  `hero-image`, `hero-color`, `header-hero`, `editorial-masthead`,
  `title-led`).
</ParamField>

<ParamField body="compositionSpine" type="string">
  Which worked-example skeleton anchors generation: `hero-led`, `editorial`,
  or `product-spec`.
</ParamField>

<ParamField body="reset" type="boolean">
  `true` clears the direction text and returns to the brand-derived
  defaults; the next generation prefills the text again. Cannot be combined
  with other fields.
</ParamField>

```bash theme={null}
curl -X PATCH "https://api.sequenzy.com/api/v1/email-design-system" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "compositionSpine": "editorial",
    "designCode": {
      "kickerStyle": "letterspaced",
      "openerTreatments": ["editorial-masthead", "title-led"]
    }
  }'
```

## Responses

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "message": "Updated the email design system and rewrote the design direction text to match.",
    "designSystem": {
      "version": 1,
      "designCode": {
        "version": 1,
        "kickerStyle": "letterspaced",
        "titleAlignment": "center",
        "buttonShape": "pill",
        "dividerStyle": "line",
        "density": "airy",
        "openerTreatments": ["editorial-masthead", "title-led"]
      },
      "compositionSpine": "editorial",
      "source": "custom"
    },
    "directionText": "Short uppercase letter-spaced kickers above section titles. Centered headings and hero content. Fully rounded pill buttons. Thin divider lines between sections. Generous spacing: one idea per section with room to breathe. Open emails with an editorial masthead (kicker, display title, short standfirst, thin divider) or a plain typography-first opening (kicker, title, short lead text). Compose emails as typography-first editorial pieces: display headings, hairline rules, and quiet actions.",
    "isDefault": false
  }
  ```

  ```json 400 theme={null}
  {"success": false, "error": {"code": "BAD_REQUEST", "message": "Invalid email design system: unrecognized design code value"}}
  ```

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

  ```json 404 theme={null}
  {"success": false, "error": {"code": "NOT_FOUND", "message": "Company not found"}}
  ```

  ```json 409 theme={null}
  {"success": false, "error": {"code": "CONFLICT", "message": "The email design system was modified concurrently; retry the update."}}
  ```
</ResponseExample>
