---
title: "Create a new user (team member or customer contact) in the current Avaza account."
method: POST
path: "/api/UserProfile"
tags: ["UserProfile"]
---

# Create a new user (team member or customer contact) in the current Avaza account.

`POST /api/UserProfile`

Admin role only. If CompanyIDFK is provided the user is created as a Customer Contact, otherwise as a Team Member. Paid-role seat quotas are enforced. If Email already exists in the central GlobalUser table the new UserProfile is linked to that GlobalUser, otherwise a new GlobalUser is created.

## Request body

- NewUserProfile — Request body for POST /api/UserProfile. Creates a team member (CompanyIDFK = null) or a customer contact (CompanyIDFK set).
  - `Email` string — Email address. Must be a valid format and unique within the current account.
  - `Firstname` string — First name. Max 100 characters.
  - `Lastname` string — Last name. Max 100 characters.
  - `TimeZone` string — Windows Time Zone ID (e.g. "Pakistan Standard Time"). If omitted, defaults to the account's timezone.
  - `CompanyIDFK` integer — If set, creates a Customer Contact linked to this Company. If null, creates a Team Member.
  - `PositionTitle` string — User's job title. Max 100 characters.
  - `Mobile` string — Mobile phone number. Max 50 characters.
  - `Phone` string — Phone number. Max 50 characters.
  - `DefaultBillableRate` number, double — Default billable rate per hour. Team members only. Must be non-negative.
  - `DefaultCostRate` number, double — Default cost rate per hour. Team members only. Must be non-negative.
  - `Roles` string[] — Role codes to assign. Each entry must be a RoleCode from the Roles table that is assignable for the user type (UserAssignable=1 for team members, CustomerAssignable=1 for customer contacts). Empty/null = no roles (InvitationStatusCode = "NoRoles").
  - `SendInviteEmail` boolean — If true and at least one role is assigned, sends an invitation email and sets InvitationStatusCode = "InviteSent". See spec for the full matrix.

## Response `200`

Returns the created user.

- UserDetails — A user/team member record with profile information, availability hours, billing rates, roles, and tags.
  - `UserID` integer — Unique identifier for the user.
  - `AccountIDFK` integer — The Avaza account this user belongs to.
  - `Email` string — User's email address.
  - `Firstname` string — User's first name.
  - `Lastname` string — User's last name.
  - `PositionTitle` string — User's job title or position.
  - `Phone` string — User's phone number.
  - `Mobile` string — User's mobile phone number.
  - `TimeZone` string — Windows Timezone ID
  - `IANATimezone` string — IANA tz database timezone name
  - `isTeamMember` boolean — Whether the user is an internal team member (true) or external contact (false).
  - `CompanyIDFK` integer — The company the user is associated with (for external contacts).
  - `CompanyName` string — Name of the user's associated company.
  - `DefaultBillableRate` number, double — The user's default billing rate per hour.
  - `DefaultCostRate` number, double — The user's default cost rate per hour.
  - `MondayAvailableHours` number, double — Available working hours on Mondays.
  - `TuesdayAvailableHours` number, double — Available working hours on Tuesdays.
  - `WednesdayAvailableHours` number, double — Available working hours on Wednesdays.
  - `ThursdayAvailableHours` number, double — Available working hours on Thursdays.
  - `FridayAvailableHours` number, double — Available working hours on Fridays.
  - `SaturdayAvailableHours` number, double — Available working hours on Saturdays.
  - `SundayAvailableHours` number, double — Available working hours on Sundays.
  - `Roles` RoleDetails[] — List of security roles assigned to the user.
    - `RoleCode` string — Unique code for the role (e.g. Admin, PM, TimesheetUser).
    - `RoleName` string — Display name of the role.
  - `Tags` UserTagDetails[] — List of tags applied to the user for categorisation.
    - `UserTagID` integer — Unique identifier for the user tag.
    - `UserTagName` string — Display name of the user tag.

## Other responses

- `400` — Validation error (missing/invalid field, email already exists, invalid RoleCode for user type).
- `401` — Unauthorized.
- `403` — Forbidden — caller is not an Admin.
- `412` — Precondition failed — paid-role license quota would be exceeded.

---

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