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

# Quickstart: send your first campaign

> Create a list, add a contact, and send your first email campaign in five minutes.

## 1. Get your API key

In your Mailercloud account, open **Settings → API** and create a key. You can create up to 10 keys. Every request below sends this key in the `Authorization` header (plain text, no `Bearer` prefix).

## 2. Create a list

```bash theme={null}
curl --request POST \
  --url https://cloudapi.mailercloud.com/v1/list \
  --header 'Authorization: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"list_type": 1, "name": "Newsletter Subscribers"}'
```

The response includes the list's `id` — you'll need it in the next steps.

## 3. Add a contact

```bash theme={null}
curl --request POST \
  --url https://cloudapi.mailercloud.com/v1/contacts \
  --header 'Authorization: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "email": "jane@example.com",
    "first_name": "Jane",
    "list_id": "YOUR_LIST_ID"
  }'
```

## 4. Create a campaign

`name`, `subject`, `sender`, and `list_ids` are required, plus your HTML content:

```bash theme={null}
curl --request POST \
  --url https://cloudapi.mailercloud.com/v1/campaign \
  --header 'Authorization: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "name": "My first campaign",
    "subject": "Hello from Mailercloud",
    "sender": {
      "sender_email": "you@yourdomain.com",
      "sender_name": "Your Name"
    },
    "list_ids": ["YOUR_LIST_ID"],
    "html": "<html><body><h1>Hello!</h1><p>My first campaign.</p></body></html>"
  }'
```

<Warning>
  The sender email must belong to a [verified sender](/api-reference/senders) on your account.
</Warning>

## 5. Send a test email, then schedule

Preview it in your own inbox first:

```bash theme={null}
curl --request POST \
  --url https://cloudapi.mailercloud.com/v1/campaign/testmail/YOUR_CAMPAIGN_ID \
  --header 'Authorization: YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{"email": "you@yourdomain.com"}'
```

Happy with it? Send or schedule it with [Schedule Campaign](/api-reference/campaigns/schedule-campaign).

## Next steps

* [Send transactional email](/guides/transactional-email) for receipts, OTPs, and notifications
* [Sync contacts in real time](/guides/contact-sync) from your app or website
* [Set up webhooks](/guides/webhooks) to receive campaign events
