---
title: "Edit the caller's profile (spec 4.7)."
method: PUT
path: "/api/v1/affiliate/profile"
tags: ["Affiliate"]
---

# Edit the caller's profile (spec 4.7).

`PUT /api/v1/affiliate/profile`

## 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/profile`
- Auth: one of:
  - API key in cookie `session`
  - HTTP bearer

<br/>Payout details are only replaced when the request carries a populated<br/>object. Missing, null or empty means "keep what is stored", because reads<br/>are masked and a round-tripped mask would destroy the real credentials.

## Request body

- ProfileRequest: A profile edit. `payout_details` missing, null, or an empty object means UNCHANGED. Reads return the details masked (R7), so a portal form that echoed what it read would otherwise write `****9999` over the real IBAN. Send a populated object only when the affiliate actually retyped the details. `channels` is APPEND-ONLY once the affiliate is approved or suspended: the list must start with the stored one, entry for entry and in order, and may only grow. Anything else comes back 422 `channels_locked`. The shape stays a plain list here because the rule needs the stored row to judge it, which only the service has: see `channel_lock.violates_lock` for why the lock exists.
  - `channels` string[], required
  - `full_name` string, required
  - `payout_details` object, nullable
  - `payout_method` string, required
  - `phone` string, nullable

## Response `200`

OK

- 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

- `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)
