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

# Prepare a campaign draft

> Validate locally, create once, then read back for review.

## Define a LinkedIn draft

```json draft.json theme={null}
{
  "name": "Partnerships for review",
  "audience": "Partnership leads in Italian software companies",
  "steps": [
    {"type": "message", "message": "Hello, I would like to discuss a partnership.", "wait_days": 2}
  ]
}
```

The supported LinkedIn sequence has up to four steps. A connection request can appear only first, with a note at most 300 characters. Provider account restrictions can be lower. Email drafts accept `name` only; then use [campaign setup](https://docs.emailx.ai/en/overview/campaign-setup.md) to select their templates and senders.

## Preview, create, verify

```bash theme={null}
emailx campaigns create-draft --workspace 123 --channel linkedin --file draft.json --idempotency-key review-001 --dry-run --json
emailx campaigns create-draft --workspace 123 --channel linkedin --file draft.json --idempotency-key review-001 --json
emailx campaigns get 456 --workspace 123 --channel linkedin --json
```

The first command performs local schema validation and produces a redacted preview. **It makes no HTTP call** and cannot verify current permissions, state or provider eligibility. The second creates the inactive draft. Replace `456` with the returned ID, confirm `draft`, and open its `review_path` on the configured app host.

## Input rules

`--file -` reads a JSON object from stdin. The size limit is 256 KiB. Arrays as the root body, duplicate fields, unknown fields and nonfinite numbers are rejected. Never use a new idempotency key to escape an uncertain result; [read back first](https://docs.emailx.ai/en/api-reference/idempotency.md).

Draft preparation commands do not launch a campaign or send outreach. Review content, audience, sender settings and [recommended account volumes](https://docs.emailx.ai/en/overview/sending-limits.md) in the app before any separate launch action. The CLI has a reviewed activation flow for eligible manual LinkedIn campaigns; see [review and launch](https://docs.emailx.ai/en/overview/review-and-launch-linkedin.md).


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