---
title: "Approve the application: status, `decided_at`, `decided_by_user_id`."
method: POST
path: "/api/v1/admin/affiliates/{affiliate_id}/approve"
tags: ["Affiliate Admin"]
---

# Approve the application: status, \`decided_at\`, \`decided_by_user_id\`.

`POST /api/v1/admin/affiliates/{affiliate_id}/approve`

## 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/admin/affiliates/{affiliate_id}/approve`
- Auth: one of:
  - API key in cookie `session`
  - HTTP bearer

<br/>Nothing new is generated. The referral code was created at apply time, so<br/>approving only unlocks it: `code_is_valid` and the attribution guard both<br/>key off the approved status.<br/><br/>Every decision appends an `audit_log` row naming this admin, in the SAME<br/>transaction as the status change. Approving turns a partner's link live,<br/>starts their counting and starts their money, and it used to leave no<br/>trace of who did it (round 15 walkthrough, finding 2).

## Path parameters

- `affiliate_id` integer, required

## Response `200`

OK

- AdminAffiliateItem: One affiliate as the admin queue sees it. Wider than the affiliate's own `AffiliateView`: it carries `user_id` and `decided_by_user_id` so the queue can link to the account and show who decided. `payout_details` is masked here exactly as it is everywhere else.
  - `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
  - `decided_by_user_id` integer, 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
  - `user_id` integer, required

## Other responses

- `404`: Not Found
- `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)
