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

# Create a campaign

> Create a new draft campaign and associated email message.

<Warning>
  Content API endpoints are currently in an open alpha and are subject to
  change.
</Warning>

## Request

### Body

<ParamField body="name" type="string" required>
  The campaign name.
</ParamField>

## Response

### Success

This endpoint creates a draft campaign and an empty email message in one step.

Use the returned `emailMessageId` with
[Update an email message](/api-reference/update-email-message) to set
subject, sender, preview text, and LMX content.

<ResponseField name="success" type="boolean" required />

<ResponseField name="campaignId" type="string" required>
  The campaign ID.
</ResponseField>

<ResponseField name="name" type="string" required>
  The campaign name.
</ResponseField>

<ResponseField name="status" type="string" required>
  The initial campaign status (`Draft`).
</ResponseField>

<ResponseField name="createdAt" type="string" required>
  ISO 8601 timestamp for when the campaign was created.
</ResponseField>

<ResponseField name="updatedAt" type="string" required>
  ISO 8601 timestamp for when the campaign was last updated.
</ResponseField>

<ResponseField name="emailMessageId" type="string" required>
  The ID of the empty [email message](/api-reference/update-email-message) created for this campaign.
</ResponseField>

<ResponseField name="emailMessageContentRevisionId" type="nullable string" required>
  The initial content revision ID for the email message. Pass this as
  `expectedRevisionId` on your first email message update.
</ResponseField>

### Error

If the request body is invalid, or if no sending domain is configured, a
`400 Bad Request` is returned.

If the API key is invalid (or content API is not enabled for your team), a
`401 Unauthorized` is returned.

<ResponseField name="success" type="boolean" required />

<ResponseField name="message" type="string" required>
  An error message describing what went wrong.
</ResponseField>

<ResponseExample>
  ```json Response theme={"dark"}
  {
    "success": true,
    "campaignId": "cmp_01hxyz",
    "name": "Spring announcement",
    "status": "Draft",
    "createdAt": "2026-03-28T15:00:00.000Z",
    "updatedAt": "2026-03-28T15:00:00.000Z",
    "emailMessageId": "em_01hxyz",
    "emailMessageContentRevisionId": "rev_01hxyz"
  }
  ```

  ```json Error response theme={"dark"}
  {
    "success": false,
    "message": "No sending domain configured."
  }
  ```
</ResponseExample>
