---
title: "Create the caller's pending affiliate application (spec 4.1)."
method: POST
path: "/api/v1/affiliate/apply"
tags: ["Affiliate"]
---

# Create the caller's pending affiliate application (spec 4.1).

`POST /api/v1/affiliate/apply`

## Request

- Base URL: `https://api.avatarfactory.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.avatarfactory.io/api/v1/affiliate/apply`
- Auth: one of:
  - API key in cookie `session`
  - HTTP bearer

<br/>Applying records the current terms version, so `accept_terms` is required.<br/>`service.apply` emits the `affiliate_applied` analytics event; this route<br/>deliberately does not emit it again.

## Request body

- ApplyRequest: The affiliate application form (spec 4.1). `accept_terms` must be true: applying is the moment the current terms version is recorded, so an application without it is refused.
  - `accept_terms` boolean
  - `channels` string[], required
  - `email` string, required
  - `full_name` string, required
  - `payout_details` object
  - `payout_method` string, required
  - `phone` string, nullable

## Response `201`

Created

- AffiliateMeResponse: Everything the portal needs for its first paint. `code`, `link` and `payout_details` mirror the same fields on `affiliate` so the link card and the profile form do not have to unwrap a nullable object. `affiliate` is null for a user who never applied.
  - `affiliate` AffiliateView: The caller's own affiliate row. Payout details are masked here too.
    - `applied_at` string, date-time, nullable
    - `channels` string[]
    - `code` string, required
    - `code_renamed` boolean, required
    - `commission_rate_bps` integer, required
    - `decided_at` string, date-time, nullable
    - `decline_reason` string, nullable
    - `email` string, required
    - `full_name` string, required
    - `id` integer, required
    - `payout_details` object
    - `payout_method` string, required
    - `phone` string, nullable
    - `status` string, required
    - `terms_accepted_at` string, date-time, nullable
    - `terms_version` string, nullable
  - `balances` BalancesView
    - `available_cents` integer
    - `lifetime_cents` integer
    - `paid_cents` integer
    - `pending_cents` integer
  - `code` string, nullable
  - `link` string, nullable
  - `needs_terms_acceptance` boolean
  - `payout_details` object
  - `terms_version` string, required

## Other responses

- `409`: Conflict
- `422`: Unprocessable Entity

---

[API](https://skmtc.dev/avatarfactory/apis/avatarfactory-api.md) · [All operations](https://skmtc.dev/avatarfactory/apis/avatarfactory-api/llms.txt) · [OpenAPI document](https://skmtc.dev/avatarfactory/apis/avatarfactory-api/revisions/66fc7aa3f296?raw)
