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

> ## Agent Instructions
> AhaSend stores all message data in the EU. See /facts.
> The API base URL is https://api.ahasend.com. Send the API key in the Authorization: Bearer header. See /api-reference/authentication.
> Use send.ahasend.com for SMTP. Ports 25, 587 and 2525 use STARTTLS. Port 465 is not supported. See /smtp.
> For send-only integrations, create an API Key v2 under Credentials → Add and scope it to messages:send:{your-domain}. See /send-api/credentials and /api-reference/scopes.

# Creating a Campaign

> Create an AhaSend campaign: name, sender and reply-to, lists, subject and preview text, design, personalization with contact fields and the unsubscribe link.

A campaign is one email to one or more lists. This page walks through the parts of a campaign, in the order the campaign page shows them. You can fill them in any order and come back later; a campaign stays a draft until you send or schedule it.

## Name and Start Point

Under **Marketing > Campaigns**, click **Create Campaign**. Give it a name that you will recognize in the list later, such as "October newsletter"; recipients never see it. Under **Start From**, start from scratch or from a copy of one of your [campaign templates](/docs/campaigns/templates).

To send a campaign again, for example next month's edition, **duplicate** an existing campaign instead. The copy is a new draft with the same sender, lists, subject and design.

## Sender and Reply-To

The sender is a name and an address on one of your verified sending domains, for example `Your Company <news@yourdomain.com>`. The domain must have valid DNS records and must not be paused. Any verified domain can send a campaign, whatever its [sending type](/docs/domains#sending-type): campaigns always go out over the marketing infrastructure.

Set a reply-to address that someone reads. Replies to a newsletter are often the most useful feedback you get.

<Tip>
  Use a subdomain for your campaigns, such as `news.yourdomain.com`, and keep your transactional mail on another one. Recipients and mailbox providers then see two senders with two reputations. See [separate subdomains](/docs/deliverability#should-transactional-mail-use-a-separate-subdomain).
</Tip>

## Recipients

Choose one or more [lists](/docs/campaigns/contacts-and-lists); through the API, up to 50. The campaign page shows how many contacts the campaign will reach: the subscribed, enabled contacts on those lists that have not unsubscribed from everything and whose address was not found invalid. A contact on more than one of the lists counts once per list in that number, but gets the email once.

To send to part of a list, filter the list with advanced search and **Save as new list**, then choose that list here.

## Subject and Preview Text

The subject is what the inbox shows first. The preview text is the line most inboxes show after the subject; without one, the inbox shows the first words of the email instead, often the view-in-browser link. Both are required before the campaign can be sent, and both can use [personalization](#personalization).

## Design

A campaign started from scratch gets its design on the campaign page: choose the Simple Editor, the Advanced Editor, or **Custom HTML** to upload your own HTML. The design is the campaign's own copy, so changes here never affect the template it came from. See [the two editors](/docs/campaigns/templates) for what each one does, and for importing MJML or HTML.

### Personalization

Write a contact field between double braces and each recipient sees their own value:

```text theme={null}
Hi {{ first_name }},
Here is the October update for {{ company_name }}.
```

The standard fields are `email`, `first_name` and `last_name`; your [custom fields](/docs/campaigns/contacts-and-lists#custom-fields) are available under their key, shown as the template variable under **Marketing > Contact fields**. Give a default for contacts where the field is empty:

```text theme={null}
Hi {{ first_name|default("there") }},
```

Personalization works in the design, the subject and the preview text. To check the result, click **Preview** on the campaign page and choose a contact, or [send a test](/docs/campaigns/test-and-send#test-sends) to one of your contacts. Template syntax that cannot be rendered, such as an unclosed brace, blocks the send with the issue `text_broken`.

### The Unsubscribe Link

Every campaign must have an unsubscribe link in its HTML. New Simple Editor designs start with one in the footer. In the Advanced Editor, add it from the link dialog under **Automatic Links**, or write `{{ unsubscribe_url }}`:

```html theme={null}
<a href="{{ unsubscribe_url }}">Unsubscribe</a>
```

Each recipient gets their own link, and AhaSend adds the one-click `List-Unsubscribe` headers that Gmail and Yahoo expect from bulk senders. A recipient who unsubscribes is unsubscribed from the list the campaign went to. A campaign without the link has the issue `unsubscribe_link_missing` and cannot be sent; a test can still go out, so you can test a design before the footer is done.

Clicking the unsubscribe link in a test send unsubscribes nobody.

This section is about campaigns. For the unsubscribe link and headers of mail you send through the API or SMTP, see [unsubscribe links and one-click headers](/docs/campaigns/unsubscribe).

## Saving

The editors save as you work, and the campaign page saves each part when you confirm it. The page lists what is still missing before the campaign can go out. The same campaign can be edited in the dashboard and through the [API](/docs/api-reference/campaigns/update-campaign); both change the same draft.

## Related Guides

* [Testing, review and sending](/docs/campaigns/test-and-send), [Contacts and lists](/docs/campaigns/contacts-and-lists), [Templates and editors](/docs/campaigns/templates).
* [Campaigns API](/docs/api-reference/campaigns/overview), [Domain setup](/docs/domains), [Deliverability best practices](/docs/deliverability).


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