---
title: "Archive a User"
method: POST
path: "/api/users/archive/{id}"
tags: ["Users"]
---

# Archive a User

`POST /api/users/archive/{id}`

## Request

- Base URL: `https://app.timetastic.co.uk` (the document declares no server; this is the origin it was published from)
- URL: `https://app.timetastic.co.uk/api/users/archive/{id}`
- Auth: none declared

Use this to archive a user from Timetastic. They will be immediately logged out and unable to log in.
            
This endpoint is limited to 2 requests per second. An `archiveDate` must be supplied in the body.

## Path parameters

- `id` integer, required

## Request body

- TimetasticCoreModelsApiModelsArchiveUserApiModel
  - `archiveDate` string, date-time: The Date this user left your organisation.Must be in the past (UTC). Timetastic will display this on the archived user's profile and in reports

## Response `200`

The user was archived.

## Other responses

- `400`: The user could not be archived. `errorStatus` says why.
- `401`: The request was not authenticated — the API token is missing or invalid.
- `403`: The authenticated user is not an administrator.
- `429`: The endpoint limit of 2 requests per second was exceeded.

---

[API](https://skmtc.dev/timetastic/apis/timetastic-api.md) · [All operations](https://skmtc.dev/timetastic/apis/timetastic-api/llms.txt) · [OpenAPI document](https://skmtc.dev/timetastic/apis/timetastic-api/revisions/709ccb0412c3?raw)
