---
title: "Update a user"
method: PATCH
path: "/v1/users/{userId}"
tags: ["Users"]
---

# Update a user

`PATCH /v1/users/{userId}`

## Request

- Base URL: `https://api.telgea.com`
- URL: `https://api.telgea.com/v1/users/{userId}`
- Auth: API key in header `x-api-key`

Updates an existing user's information. All fields are optional - only provide the fields you want to update.

You can update basic information like name, as well as organizational assignments like team membership, cost center codes, and employee IDs.

## Path parameters

- `userId` string, uuid, required: UUID of the user.

## Headers

- `idempotency-key` string: A value unique to this request, of 1 to 255 printable ASCII characters — a UUID is the usual choice. Retry with the same key within 24 hours and you get the original response back, even if it was a failure, and nothing is done twice. Send a new key whenever you change the request. Keys are private to your API key and organisation.

## Request body

- UpdateUserBody
  - `email` string, email: Email address
  - `firstName` string: First name
  - `lastName` string: Last name
  - `teamId` string, uuid, nullable: Team to assign the user to. null moves the user to the default team, Unassigned.
  - `costCode` string, nullable: Cost center code for billing purposes (null to remove)
  - `employeeId` string, nullable: External employee identifier (null to remove)

## Response `204`

User updated successfully. No content returned.

## Other responses

- `400`: Request failed schema validation, or was refused by a business rule
- `401`: Missing or invalid API key in the X-API-Key header
- `403`: Insufficient permissions to update users
- `404`: User not found, or `teamId` names no team in your organization
- `409`: No change was made: another user already holds this email address.
- `429`: The API key has used its request quota for the current window. `Retry-After` says how many seconds until it resets.
- `500`: Internal server error. Contact support if this persists.

---

[API](https://skmtc.dev/telgea/apis/telgea-api.md) - [All operations](https://skmtc.dev/telgea/apis/telgea-api/llms.txt) - [OpenAPI document](https://skmtc.dev/telgea/apis/telgea-api/revisions/4e8f8c04fe9e?raw)
