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

# Create a user in a company

`POST /api/users`

## Request body

- object
  - `email` string, email, nullable
  - `companyId` string, required
  - `firstName` string, required
  - `lastName` string, nullable

## Response `201`

Default Response

- object
  - `id` string, required
  - `firstName` string, nullable, required
  - `lastName` string, nullable, required
  - `email` string, nullable, required
  - `primaryCompanyId` string, nullable, required
  - `primaryRole` string, nullable, required
  - `langId` string, nullable, required
  - `isBlocked` number, nullable, required
  - `intercomHash` string, nullable, required
  - `emailSha256` string, nullable, required
  - `avatarFileUrl` string, nullable, required
  - `originalAvatarFileUrl` string, nullable, required

## Other responses

- `400` — Default Response
- `401` — Default Response
- `403` — Default Response
- `409` — Default Response

## Changes

> 22 revisions in range; 1 not diffed.

- **2026-08-31** `97e51f27dc77` — 14 breaking, 13 info
  - request property `email` list-of-types was narrowed by removing types `null` from media type `application/json`
  - request property `lastName` list-of-types was narrowed by removing types `null` from media type `application/json`
  - added the pattern `^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$` to the request property `email`
  - the response property `avatarFileUrl` became nullable for the status `201`
  - …23 more
- **2026-08-12** `ac2cf3c5eae2` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/retraced/apis/api-reference/changes/api/users/post.md)

---

[API](https://skmtc.dev/retraced/apis/api-reference.md) · [All operations](https://skmtc.dev/retraced/apis/api-reference/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/retraced/api-reference/revisions/97e51f27dc77/schema)
