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

# Generate Subject Lines

> Generate subject line variants for a topic

# Generate Subject Lines

Generates draft subject line variants for a campaign or sequence email.

## Request

<ParamField body="topic" type="string" required>
  Topic, campaign idea, or context for the subject lines.
</ParamField>

<ParamField body="count" type="number">
  Number of variants to generate. Defaults to `5`.
</ParamField>

```bash theme={null}
curl -X POST "https://api.sequenzy.com/api/v1/generate/subjects" \
  -H "Authorization: Bearer seq_live_xxx" \
  -H "Content-Type: application/json" \
  -d '{
    "topic": "April product launch",
    "count": 5
  }'
```

## Responses

<ResponseExample>
  ```json 200 theme={null}
  {
    "success": true,
    "topic": "April product launch",
    "subjects": [
      "Meet what we shipped in April",
      "Your April product update is here"
    ]
  }
  ```

  ```json 400 theme={null}
  {
    "error": "count must be a positive integer"
  }
  ```

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

  ```json 403 theme={null}
  {
    "error": "No companies found. Create a company first using the create_company tool."
  }
  ```

  ```json 500 theme={null}
  {
    "error": "Failed to generate subject lines"
  }
  ```
</ResponseExample>
