---
title: "Update a user"
method: PATCH
path: "/api/user"
tags: ["Users"]
---

# Update a user

`PATCH /api/user`

## Request body

- UpdateUserRequest
  - `apikey` string — Deprecated legacy API key transport. Prefer the `x-api-key` header.
  - `email` string, email, required — Email address of the user to update.
  - `name` string — Updated display name for the user.
  - `permissions` string[] — Updated permissions for the user.
  - `subscribedToUpdates` boolean — Updated marketing subscription preference for the user.

## Response `200`

User updated successfully.

- UserMutationSuccess
  - `email` string, required — MD5 hash of the user email.

## Other responses

- `400` — Bad request.
- `401` — Invalid API key.
- `404` — Domain or user not found.
- `500` — Internal server error.

---

[API](https://skmtc.net/codelitdev/apis/courselit-rest-api.md) · [All operations](https://skmtc.net/codelitdev/apis/courselit-rest-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/codelitdev/courselit-rest-api/versions/3b48f60910dc/schema)
