---
title: "Replace one marketing asset. An unknown id writes nothing and is a 404."
method: PUT
path: "/api/v1/admin/affiliate-assets/{asset_id}"
tags: ["Affiliate Admin"]
---

# Replace one marketing asset. An unknown id writes nothing and is a 404.

`PUT /api/v1/admin/affiliate-assets/{asset_id}`

## 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/affiliate-assets/{asset_id}`
- Auth: one of:
  - API key in cookie `session`
  - HTTP bearer

## Path parameters

- `asset_id` integer, required

## Request body

- AdminAssetRequest: A marketing asset the admin creates or edits.
  - `description` string, nullable
  - `is_active` boolean
  - `kind` string, required
  - `sort_order` integer
  - `title` string, required
  - `url` string, required

## Response `200`

OK

- AdminAssetItem: An asset as the admin editor sees it, `is_active` included.
  - `description` string, nullable
  - `id` integer, required
  - `is_active` boolean, required
  - `kind` string, required
  - `sort_order` integer, required
  - `title` string, required
  - `url` 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)
