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

# Edit a User

`POST /api/users/edit/{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/edit/{id}`
- Auth: none declared

Edits an existing user in Timetastic. Allows you to populate more data into a user record after an
initial ADD operation. You can pass any combination of the following parameters and only those values
will be changed.
            
This endpoint is limited to 2 requests per second.
            
Attempts that supply an email address already in use are counted against your organisation. The
count is shared with the add endpoint, and after 10 of them both start returning 429. The
count expires 24 hours after the *first* failure, not the last, and succeeding in the meantime
does not clear it. Check for an existing user before retrying rather than letting these
accumulate.

## Path parameters

- `id` integer, required

## Request body

- TimetasticCoreModelsApiModelsEditUserApiModel
  - `id` integer: The unique Id for this user
  - `emailAddress` string, nullable: The user's email address. To clear a user's email address you must pass a blank string to this parameter: ""
  - `firstname` string, nullable: The user's first name
  - `lastname` string, nullable: The user's last name
  - `startDate` string, date-time, nullable: The user's start date
  - `birthday` string, date-time, nullable: The user's date of birth
  - `departmentId` integer, nullable: The ID of the department that this user is in
  - `admin` boolean, nullable: Whether the user is a Timetastic Admin (User must have an email address to set this)
  - `director` boolean, nullable
  - `approverId` integer, nullable: The user's Approver - set this to 0 to default the user's approver to their department boss
  - `publicHolidaySetId` integer, nullable: The user's public holiday SetId. HasPublicHolidays will need to be enabled for this to update the user. See Public Holidays for details on "sets"
  - `jobTitle` string, nullable
  - `payrollId` string, nullable
  - `address1` string, nullable
  - `address2` string, nullable
  - `city` string, nullable
  - `postCode` string, nullable
  - `telephone1` string, nullable
  - `telephone2` string, nullable
  - `country` string, nullable
  - `emergencyContactName` string, nullable
  - `emergencyContactPhone` string, nullable
  - `hasPublicHolidays` boolean, nullable: Whether the user has public holidays enabled. If you're setting public holidays for a new user or user that's not had public holidays enabled before you'll also need to pass a valid PublicHolidaySetId in the same request

## Response `200`

The user was updated.

## Other responses

- `400`: The edit was rejected. `errorStatus` says why.
- `401`: The change was not permitted — `errorStatus` says why. An unauthenticated request also returns 401, but with no body at all.
- `403`: The authenticated user is not an administrator.
- `429`: Too many recent requests supplied an email address that was already in use. Exceeding the endpoint limit of 2 requests per second also returns 429, but as a plain text message from the rate limiter rather than this body.

---

[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)
