Affiliate pre-registration lets you collect affiliates before you launch. Someone
leaves their email on your marketing site, and we reserve a referral link plus a
claim code for them. The link is shareable straight away but stays inactive until
they claim it on an account after launch.

## The flow

1. Your website posts an email address to
   [create a pre-registration](/docs/api/affiliates/create).
2. We reserve a referral code, generate a claim code, and email both to them. The
   response also contains both, so you can show them immediately.
3. Anyone visiting the reserved link before launch sees a branded page explaining
   that it is not live yet.
4. After launch they create an account and enter the claim code on the affiliate
   page. The reserved code becomes their active referral code.

:::warning The email address must match
A claim code only works on an account with the same email address it was issued
to. Anything else would mean an intercepted code is enough to walk off with
someone else's reserved link.
:::

## Reserved means reserved

Once a code is reserved it is never handed to anyone else, not even after the
reservation is withdrawn. The link has already been shared, and reassigning it
would send that traffic to the wrong affiliate.

## Before you start

Pre-registration is off by default. Turn it on in your dashboard under
**Affiliates -> Program settings**, where you can also set how long a claim code
stays valid.

## Endpoints

|                                           |                                                     |
| ----------------------------------------- | --------------------------------------------------- |
| [Create](/docs/api/affiliates/create)     | `POST /v1/affiliates/pre-registrations`             |
| [List](/docs/api/affiliates/list)         | `GET /v1/affiliates/pre-registrations`              |
| [Retrieve](/docs/api/affiliates/retrieve) | `GET /v1/affiliates/pre-registrations/{id}`         |
| [Resend](/docs/api/affiliates/resend)     | `POST /v1/affiliates/pre-registrations/{id}/resend` |
| [Withdraw](/docs/api/affiliates/revoke)   | `DELETE /v1/affiliates/pre-registrations/{id}`      |

## The object

```json
{
    "id": "aff_pre_zd95p9x9prp3cga9thjusesr",
    "object": "affiliate_pre_registration",
    "email": "jamie@example.com",
    "referral_code": "0WWI7YCQ",
    "referral_url": "https://acmefunded.com/r/0WWI7YCQ",
    "status": "pending",
    "source": "api",
    "metadata": { "name": "Jamie" },
    "created_at": "2026-08-03T17:44:13+00:00",
    "expires_at": "2026-09-02T17:44:13+00:00",
    "claimed_at": null,
    "last_sent_at": "2026-08-03T17:44:13+00:00"
}
```

| Field           | Description                                  |
| --------------- | -------------------------------------------- |
| `id`            | Use this in every other endpoint             |
| `referral_code` | The reserved code                            |
| `referral_url`  | The shareable link                           |
| `status`        | `pending`, `claimed`, `revoked` or `expired` |
| `source`        | `api` or `admin`                             |
| `metadata`      | Whatever you sent, returned unchanged        |
| `expires_at`    | Null when claim codes never expire           |

`claim_code` is only ever present on the response that created the reservation.