---
title: "Update an affiliate"
method: PUT
path: "/affiliates"
---

# Update an affiliate

`PUT /affiliates`

Updates an affiliate identified by `affiliateId` or `emailAddress`.

This endpoint returns a **count of updated records**, not the affiliate object. Call [Get Affiliate(s)](/api-reference/affiliates/get) afterwards if you need the updated affiliate.

Sending `affiliateLink` **adds another** referral link to the affiliate — it does not rename or replace existing links. Use the [affiliate link endpoints](/api-reference/links/update) to rename or remove a link.

## Request body

- AffiliateUpdate — Identify the affiliate with either affiliateId or emailAddress.
  - `affiliateId` string — The ID of the affiliate (required if emailAddress is not provided)
  - `emailAddress` string, email — The email of the affiliate (required if affiliateId is not provided)
  - `firstName` string — First name of the affiliate
  - `lastName` string — Last name of the affiliate
  - `email` string, email — Email of the affiliate
  - `commissionRate` number, float — Commission rate for the affiliate
  - `affiliateStatus` 'active' | 'inactive' — Set the affiliate active or pending. Any other value falls back to the program's auto-approve setting.
  - `affiliateLink` string — Adds an additional referral link with this slug. Existing links are kept — this never renames or replaces them. Fails with 400 if the slug is already used in this program.

## Response `200`

The number of affiliate records that matched and were updated. `count` is `0` when no affiliate in this program matched.

- UpdateCount
  - `count` integer — How many records matched the filter and were updated

## Other responses

- `400` — Neither `affiliateId` nor `emailAddress` was supplied, the requested affiliate link is already in use, or the update failed.
- `401` — The `Authorization` header is missing, is not a `Bearer` header, or the token is not valid.
- `403` — API access is not enabled for this account.
- `404` — The affiliate program this token belongs to no longer exists.
- `429` — Too many requests for this token on this endpoint. Please slow down.

---

[API](https://skmtc.net/referly/apis/referly-api.md) · [All operations](https://skmtc.net/referly/apis/referly-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/referly/referly-api/revisions/0f506d61b9c3/schema)
