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

# Build Account Health Fix

> Build the draft sequence a finding asks for

Build the sequence an "event without a sequence" finding asks for. Its primary
action in [Get Account Health](./get) has `kind: "create_sequence"`. The draft
is triggered by the event, named for the moment (for example "New customer
onboarding" for `saas.purchase`), and lays out the timing and one titled email
step per message. Like a sequence from a template, its emails are then written
with AI.

The sequence stays inactive. Review the emails, then turn it on with
[Enable Sequence](../sequences/enable), which refuses while a step has no
email. Calling this again returns the same draft with `created: false` and
never rewrites its emails.

Other findings act through existing endpoints listed in each action's `api`,
such as `POST /sequences/{id}/disable` to pause a sequence.

Requires the `sequences:write` scope.

## Request

```bash theme={null}
curl -X POST "https://api.sequenzy.com/api/v1/account-health/insights/ins_123/fix" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

## Path

<ParamField path="insightId" type="string" required>
  The insight ID.
</ParamField>

## Response fields

<ResponseField name="sequenceId" type="string">
  The draft sequence.
</ResponseField>

<ResponseField name="created" type="boolean">
  `false` when a draft for this insight already existed.
</ResponseField>

<ResponseField name="enrichmentStatus" type="string">
  Only when `created` is `true`. `processing` while AI writes the emails; poll
  [Get Sequence](../sequences/get) for progress. `not_queued` means the draft
  exists but writing could not start: open it in the dashboard to write the
  emails, and do not build it again.
</ResponseField>

<ResponseExample>
  ```json 201 theme={null}
  {
    "success": true,
    "sequenceId": "seq_456",
    "created": true,
    "enrichmentStatus": "processing"
  }
  ```

  ```json 400 theme={null}
  {
    "error": "Only an event without a sequence can be fixed by building one."
  }
  ```

  ```json 409 theme={null}
  {
    "error": "This sequence is already being built. Try again in a moment.",
    "code": "IN_PROGRESS"
  }
  ```
</ResponseExample>

On `409`, retry after a few seconds; the first request's draft is returned.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.