---
title: "Invite a user"
method: POST
path: "/users"
tags: ["users"]
---

# Invite a user

`POST /users`

Invites a new client user and returns the created record.

## Headers

- `x-client-id` string, cuid, required — The ID of the client

## Request body

- ClientUserInvite
  - `email` string, email, required — Email address that should receive the invitation.
  - `role` 'admin' | 'user', required — Role to assign to the invited user. Can be 'admin', 'user'.
  - `workspaceIds` string[] — Optional list of workspace IDs the user should join immediately.

## Response `201`

User invited

- ClientUser
  - `id` string, cuid, required — Identifier of the client user.
  - `createdAt` string, date-time, required — The date and time when the client user record was created. ISO-8601 format (YYYY-MM-DDTHH:MM:SSZ).
  - `email` string, email, required — Email address of the client user.
  - `firstName` string, nullable, required — First name of the client user, if provided.
  - `lastName` string, nullable, required — Last name of the client user, if provided.
  - `roles` string[], required — List of role names assigned to the user.

## Other responses

- `401` — Unauthorized
- `404` — Role not found
- `409` — User already connected to client or accountant
- `422` — The validation error(s)
- `429` — Rate limit exceeded
- `500` — Internal server error

---

[API](https://skmtc.net/steuerboard/apis/steuerboard-api.md) · [All operations](https://skmtc.net/steuerboard/apis/steuerboard-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/steuerboard/steuerboard-api/versions/9170dd572b31/schema)
