---
search:
  tags:
    - employees
    - POST
seo:
  description: >-
    Creates a new employee in the workspace with automatic user account creation
    and… Reference for the POST /employees endpoint in the Leadtime Public API
    API.
sidebar:
  badge: POST
  label: Create employee
title: Create employee
type: openapi-operation
---
Creates a new employee in the workspace with automatic user account creation and team assignments.

**How employee creation works:**
1. A new employee record is created with the provided information
2. If `canLogin` is `true`, a user account is automatically created:
   - User status is set to Active
   - In ready workspaces, an invitation email is sent to the employee
   - During initial workspace setup, invitation email delivery is deferred until setup is finished
   - The user is assigned the specified role
3. If an existing HelpdeskUser with the same email exists, it will be upgraded to Employee type
4. Teams are assigned if provided in the `teams` array
5. Employee data is automatically synced with the user account

**Required fields:**
- `firstName`: Employee first name
- `lastName`: Employee last name
- `email`: Unique email address (must not exist in the workspace)
- `roleId`: Role ID to assign to the user account

**Optional fields:**
- `position`: Job title/position
- `canLogin`: Whether employee can login (default: false)
- `teams`: Array of team IDs to assign the employee to
- `avatarId`: File ID from POST /workspace/upload endpoint

**Custom fields:**
Employees do not support custom fields through this API.

**Avatar upload process:**
1. First, upload the avatar file using POST /workspace/upload
2. Get the file ID from the upload response
3. Use that file ID in the `avatarId` field when creating the employee

**Note:** The email address must be unique within the workspace. If `canLogin` is false, no user account is created initially, but one can be created later by updating the employee. To list or verify employees after creation, use GET /employees/grid if you have Employees.manage permission, or GET /workspace/users for the user list. There is no GET /employees list endpoint.

<Operation source="api-reference" id="employeescontroller-createemployee" />
