Create Entity

​

Invite a new user to the account.

The user is first registered for sign-in with the given email; returns 409 if that email is already registered for sign-in. If registration succeeds and a user with that email already exists in the account, no new user is created: the existing user's ID is returned and the other submitted fields are not applied.

Returns 201 when created, 206 when created but some custom fields could not be saved, 504 if sign-in registration times out, and 500 on other registration failures.

Body·

required
application/json

Input model for creating a new user.

Extends UserInfoBase with required fields for user creation. First name is required, all other fields are optional.

  • First Name - User's given name or first name (required)

  • Area of Responsibility ID - The functional area this user is responsible for. References the area_of_responsibility lookup table

  • Avatar URL - URL to the user's profile picture or avatar image

  • Department ID - The department this user belongs to. References the departments lookup table

  • Display Name - Friendly name shown in the UI. If not provided, defaults to 'First Last'

  • Email Address - User's primary email address. Must be unique across the account. Used for authentication and notifications

  • Group IDs - List of group IDs this user belongs to. Can be provided as comma-separated string or array

  • Job Title - User's position or title within the organization

  • Last Name - User's family name or surname

  • Manager ID - User ID of this user's direct manager. Must start with 'u-'. Used for organizational hierarchy

  • Quota Plan ID - The quota/target plan assigned to this user. Determines performance metrics and goals

  • Role ID - User's role determining permissions and access levels. References the roles lookup table

Responses

  • application/json
  • application/json
Request Example for post/
curl https://crm.dreamhub.ai/api/v1/users/ \
  --request POST \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_SECRET_TOKEN' \
  --data '{
  "lastName": "Smith",
  "displayName": "John Smith",
  "department": 1,
  "areaOfResponsibility": 1,
  "email": "john.smith@company.com",
  "role": 1,
  "jobTitle": "Account Executive",
  "userLanguage": "en",
  "avatarUrl": "https://example.com/avatars/user123.jpg",
  "groupIds": [
    "g-sales",
    "g-enterprise"
  ],
  "quotaPlan": 1,
  "managerId": "u-manager123",
  "timezone": "America/New_York",
  "firstName": "John"
}'
{
  "id": "string",
  "matched": false
}