---
title: "Archive an existing user. Sets isArchived=true, deletes all role assignments, and disables all ProjectMember rows (freeing any consumed paid-role seats)."
method: POST
path: "/api/UserProfile/Archive"
tags: ["UserProfile"]
---

# Archive an existing user. Sets isArchived=true, deletes all role assignments, and disables all ProjectMember rows (freeing any consumed paid-role seats).

`POST /api/UserProfile/Archive`

Admin role only. Archiving an already-archived user is a no-op and returns the current record. You cannot archive yourself.

## Request body

- UserProfileIDRequest — Request body for POST /api/UserProfile/Archive and POST /api/UserProfile/Unarchive.
  - `UserID` integer — UserID of the existing UserProfile to archive or unarchive.

## Response `200`

Returns the archived user (IsArchived = true).

- UserDetails — A user/team member record with profile information, availability hours, billing rates, roles, and tags.
  - `UserID` integer — Unique identifier for the user.
  - `AccountIDFK` integer — The Avaza account this user belongs to.
  - `Email` string — User's email address.
  - `Firstname` string — User's first name.
  - `Lastname` string — User's last name.
  - `PositionTitle` string — User's job title or position.
  - `Phone` string — User's phone number.
  - `Mobile` string — User's mobile phone number.
  - `TimeZone` string — Windows Timezone ID
  - `IANATimezone` string — IANA tz database timezone name
  - `isTeamMember` boolean — Whether the user is an internal team member (true) or external contact (false).
  - `CompanyIDFK` integer — The company the user is associated with (for external contacts).
  - `CompanyName` string — Name of the user's associated company.
  - `DefaultBillableRate` number, double — The user's default billing rate per hour.
  - `DefaultCostRate` number, double — The user's default cost rate per hour.
  - `MondayAvailableHours` number, double — Available working hours on Mondays.
  - `TuesdayAvailableHours` number, double — Available working hours on Tuesdays.
  - `WednesdayAvailableHours` number, double — Available working hours on Wednesdays.
  - `ThursdayAvailableHours` number, double — Available working hours on Thursdays.
  - `FridayAvailableHours` number, double — Available working hours on Fridays.
  - `SaturdayAvailableHours` number, double — Available working hours on Saturdays.
  - `SundayAvailableHours` number, double — Available working hours on Sundays.
  - `Roles` RoleDetails[] — List of security roles assigned to the user.
    - `RoleCode` string — Unique code for the role (e.g. Admin, PM, TimesheetUser).
    - `RoleName` string — Display name of the role.
  - `Tags` UserTagDetails[] — List of tags applied to the user for categorisation.
    - `UserTagID` integer — Unique identifier for the user tag.
    - `UserTagName` string — Display name of the user tag.

## Other responses

- `400` — Validation error or attempt to archive self.
- `401` — Unauthorized.
- `403` — Forbidden — caller is not an Admin.

---

[API](https://skmtc.net/avaza/apis/avaza-api-documentation.md) · [All operations](https://skmtc.net/avaza/apis/avaza-api-documentation/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/avaza/avaza-api-documentation/versions/1eeadf750514/schema)
