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

# Campaigns

> Who can join a campaign, how the default campaign works, adding affiliates, and what pausing does.

A campaign is an offer: a commission rate, a landing page, a cookie window and
an attribution model. Every affiliate has a main campaign, and can belong to
more. You manage them under **Campaigns** in your Affixo dashboard, or through
the API (`/v1/campaigns`).

## Who can join

Each campaign has a join mode. In the dashboard it's the **Who can join** card
on the campaign; in the API it's `join_mode`.

| Mode | Dashboard label | What happens |
| - | - | - |
| `anyone` | Anyone | Any of your affiliates can join, and they start earning right away. |
| `approve` | I approve each | Affiliates can ask to join. Each request waits in the campaign's **Waiting for your approval** list until you approve or decline it. |
| `invite` | Invite only | Only affiliates you add can see the campaign. Nobody else can join or ask. |

Affiliates see the campaigns they can join in their portal, under **More
campaigns you can join**. Invite-only and paused campaigns never show there,
and they're left out of your public marketplace listing too.

Declining a request, or removing someone from a campaign, is remembered. That
affiliate can't ask to join the same campaign again.

> [!NOTE]
>
> Older integrations may still send `auto_approve`. It maps onto the same
> setting: `true` means `anyone` and `false` means `approve`. When you send
> both, `join_mode` wins. Sending `auto_approve` on an invite-only campaign
> opens it, because that's what the older two-value setting means.

## The default campaign

Your default campaign is where new affiliates land: signups, marketplace joins
and API invites all go there. Your first campaign becomes the default
automatically, and you can make another one the default at any time.

Because new people land there, the default campaign has two rules:

* **It can't be invite only.** Nobody could join it otherwise.
* **It can't be paused.** To pause it, pick a new default first. The pause
  dialog in the dashboard asks you for one and does both in one step. Through
  the API, set `make_default` on another campaign, then pause this one.

## Adding affiliates to a campaign

**Add every new affiliate automatically** (`auto_enrol` in the API) adds each
new affiliate to the campaign, on top of their main campaign. On a campaign
where you approve each affiliate, they're added as pending and wait for you.
Everywhere else they're active straight away. Turning it off removes no one.

When you turn it on and you already have affiliates, the dashboard asks
whether to add your current affiliates as well. Answering **Only new ones**,
or closing the question, adds nobody. The campaign then shows how many of your
affiliates aren't in it yet, with an **Add them now** button. In the API, send
`enrol_existing: true` when you create the campaign, or `add_existing: true`
with `auto_enrol: true` when you update it.

To add one person, open their affiliate page and move them into the campaign.
Paused and archived campaigns add no one, automatically or otherwise.

Review pending memberships in the campaign's **Waiting for your approval**
list, or with `GET /v1/campaigns/{id}/memberships` and
`POST /v1/campaigns/{id}/memberships/{affiliate_id}`. Until you approve
someone, their sales through that campaign earn their main campaign's rate.

## Pausing a campaign

Pausing stops a campaign without breaking anyone's links.

* **Links still land.** A visitor who clicks a link on a paused campaign
  reaches your site as usual. No click is recorded and no one is credited for
  it.
* **An affiliate's own code keeps working** when they belong to another live
  campaign. Affixo credits your default campaign if they're in it, otherwise
  their oldest active campaign.
* **New referrals earn nothing.** A customer an affiliate first brings in
  while the campaign is paused earns them no commission, and that stays true
  after you resume.
* **Renewals keep paying.** A customer referred before the pause keeps
  earning the affiliate commission on renewals and later purchases, exactly
  as before.
* **Sales are still recorded.** You see every sale, so nothing goes missing.
  A sale that earns nothing also doesn't count toward bonuses, levels or
  contests, and isn't counted as program revenue.
* **Resuming** restarts everything for sales made from then on.

> [!NOTE]
>
> A customer counts as "referred before the pause" when, before the pause
> began, that affiliate already had a sale or signup from them (same
> subscription, Stripe customer, email or visitor), a referral recorded for
> their email or Stripe customer, or a manual referral link for them. A click
> on its own isn't enough.

Archiving a campaign retires it: links still land, but no clicks are recorded
and nobody new is added.

## Related

* [Moving referrals and correcting sales](https://docs.affixo.dev/moving-referrals.md)
* [Sub-affiliates](https://docs.affixo.dev/sub-affiliates.md)
* [How attribution works](https://docs.affixo.dev/attribution.md)


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