---
title: "Archive an avatar (set archived=1). Returns JSON on success."
method: POST
path: "/api/v1/avatars/{avatar_id}/archive"
tags: ["Avatars"]
---

# Archive an avatar (set archived=1). Returns JSON on success.

`POST /api/v1/avatars/{avatar_id}/archive`

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

<br/>The legacy `/avatars/<id>/archive` page route still exists for HTML<br/>form posts, but the React SPA must use this JSON variant so it can<br/>detect a 401 / 403 instead of silently following a 302.

## Path parameters

- `avatar_id` integer, required

## Response `200`

OK

- ArchiveResponse
  - `archived` integer, required
  - `success` boolean, 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)
