---
title: "Create a user"
method: POST
path: "/api/user"
tags: ["Users"]
---

# Create a user

`POST /api/user`

## Request body

- CreateUserRequest
  - `apikey` string — Deprecated legacy API key transport. Prefer the `x-api-key` header.
  - `email` string, email, required — Email address of the user to create.
  - `name` string — Display name for the user.
  - `permissions` string[] — Permissions to assign to the user.
  - `subscribedToUpdates` boolean — Whether the user should be subscribed to marketing updates.

## Response `200`

User created successfully.

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

## Other responses

- `400` — Bad request or user already exists.
- `401` — Invalid API key.
- `404` — Domain 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)
