---
title: "Create a new user"
url: "https://developers.vzconnect.com/apis/user-api/versions/8058c80f-08ad-4baf-8fda-034794ba017a/operations/POST__users"
---

> Full API specification: https://developers.vzconnect.com/apis/user-api/versions/8058c80f-08ad-4baf-8fda-034794ba017a.md

# Create a new user

`POST` `/cmd/v1/users`

Operation ID: `POST__users`

Creates a user record within the REVEAL account.

## Request body

Content types: `application/json`

## Responses

- `201` - Successfully created the new user. Returns the submitted user details.
- `400` - Bad request. The request body is missing required fields or contains invalid data.
- `401` - Unauthorized. The request lacks valid authentication credentials.
- `500` - Internal server error. An unexpected error occurred on the server.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: User API
  version: "1.0"
servers:
  - url: https://api.us.vzconnect.com
paths:
  /cmd/v1/users:
    post:
      tags:
        - User API
      summary: Create a new user
      description: Creates a user record within the REVEAL account.
      operationId: POST__users
      requestBody:
        description: The user details for the new user to create. Includes fields such
          as name, email, role, and employee ID.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/UserInput"
            example:
              FirstName: Lonny
              LastName: Arking
              EmailAddress: user@example.com
              EmployeeId: 777099
              MobileNumber: null
              IsAdministrator: true
              IsRegionalAdministrator: false
              Role: Demo
              TimeZone: null
              Region: null
              Language: null
              IsDriver: false
              DriverNumber: null
      responses:
        "201":
          description: Successfully created the new user. Returns the submitted user
            details.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/User"
              example:
                FirstName: Lonny
                LastName: Arking
                EmailAddress: user@example.com
                EmployeeId: 777099
                MobileNumber: null
                IsAdministrator: true
                IsRegionalAdministrator: false
                Role: Demo
                TimeZone: null
                Region: null
                Language: null
                IsDriver: false
                DriverNumber: null
        "400":
          description: Bad request. The request body is missing required fields or
            contains invalid data.
          content:
            application/json: {}
        "401":
          description: Unauthorized. The request lacks valid authentication credentials.
          content:
            application/json: {}
        "500":
          description: Internal server error. An unexpected error occurred on the server.
          content:
            application/json: {}
      deprecated: false
      x-kong-route-defaults:
        strip_path: false
        paths:
          - ~/cmd/v1/users/?$
components:
  schemas:
    UserInput:
      type: object
      description: The request body fields provided when creating (POST) or editing
        (PUT) a user record.
      required:
        - FirstName
        - LastName
        - EmailAddress
        - EmployeeId
      properties:
        FirstName:
          type: string
          description: The first name of the user.
          example: Lonny
        LastName:
          type: string
          description: The last name of the user.
          example: Arking
        EmailAddress:
          type: string
          description: The email address for the user. The email address is also the
            REVEAL username login and is mandatory when creating a user record.
          example: user@example.com
        EmployeeId:
          type: integer
          description: Employee ID is the unique identifier for the user within REVEAL.
            Not a mandatory field within the REVEAL account, but required for
            the API.
          example: 777099
        MobileNumber:
          type: string
          nullable: true
          description: The phone number for the user.
          example: null
        IsAdministrator:
          type: boolean
          default: false
          description: Boolean field for true or false. Default is false. True indicates
            that the user is an Administrator for the referenced REVEAL account.
          example: true
        IsRegionalAdministrator:
          type: boolean
          default: false
          description: Boolean field for true or false. Default is false. Can only be set
            to true if the corresponding REVEAL account is enabled with Regional
            Administration permission.
          example: false
        Role:
          type: string
          nullable: true
          description: "The name of the role applied to the user. Required when creating a
            user: it must match the name of an existing role in the REVEAL
            account, including for Administrators and Regional Administrators."
          example: Demo
        TimeZone:
          type: string
          nullable: true
          description: The time zone selection for the user. Follows ISO time zone
            abbreviations. If NULL, defaults to the Account Preferences
            selection.
          example: null
        Region:
          type: string
          nullable: true
          description: The Region selection for the user. Follows ISO alpha 3 country codes.
          example: null
        Language:
          type: string
          nullable: true
          description: The Language selection for the user. Follows IETF language tags.
          example: null
        IsDriver:
          type: boolean
          default: false
          description: Boolean field for true or false. Default is false. If the user
            should also be a Driver, a unique Driver Number must also be
            provided.
          example: false
        DriverNumber:
          type: string
          nullable: true
          description: The Driver Number is the unique identifier used to reference the
            driver within the API. Required for the API when the user is a
            Driver.
          example: null
    User:
      type: object
      description: A REVEAL user record.
      properties:
        FirstName:
          type: string
          description: The first name of the user.
          example: Dan
        LastName:
          type: string
          description: The last name of the user.
          example: Bowyer
        EmailAddress:
          type: string
          description: The email address for the user. The email address is also the
            REVEAL username login and is mandatory when creating a user record.
          example: user@example.com
        EmployeeId:
          type: integer
          nullable: true
          description: Employee ID is the unique identifier for the user within REVEAL.
            The Employee ID is not a mandatory field within the REVEAL account,
            but it is required for the API.
          example: 982736342
        MobileNumber:
          type: string
          nullable: true
          description: The phone number for the user.
          example: null
        IsAdministrator:
          type: boolean
          default: false
          description: Boolean field for true or false. Default is false. True indicates
            that the user is an Administrator for the referenced REVEAL account.
            Administrator is the highest level role within a REVEAL account.
          example: false
        IsRegionalAdministrator:
          type: boolean
          default: false
          description: Boolean field for true or false. Default is false. This field can
            only be set to true if the corresponding REVEAL account is enabled
            with Regional Administration permission.
          example: true
        Role:
          type: string
          nullable: true
          description: Role can be NULL if the user is an Administrator or a Regional
            Admin. If the user is not an administrator, then the name of the
            role applied to the user is returned. Roles are created within the
            REVEAL account's Admin section.
          example: null
        TimeZone:
          type: string
          nullable: true
          description: The time zone selection that the user has configured for how time
            should be represented when logged into REVEAL. If NULL, the user's
            time zone is set to the Account Preferences selection. Time Zone
            requests and responses follow ISO time zone abbreviations.
          example: Eastern Standard Time
        Region:
          type: string
          nullable: true
          description: The Region selection for the user. Region requests and responses
            follow ISO alpha 3 country codes for the list of countries currently
            supported by REVEAL.
          example: USA
        Language:
          type: string
          nullable: true
          description: The Language selection for the user. Language requests and
            responses follow IETF language tags for the list of languages
            currently supported by REVEAL.
          example: en-US
        IsDriver:
          type: boolean
          default: false
          description: Boolean field for true or false. Default is false. When creating or
            editing a user, the user can be specified to also appear as a Driver
            within the REVEAL account. If the API user requests for a User to
            also be a Driver, a unique Driver Number must also be provided.
          example: false
        DriverNumber:
          type: string
          nullable: true
          description: The Driver Number is the unique identifier that will be used to
            reference the driver within the API. The Driver Number is not a
            mandatory field within the REVEAL account, but is required for the
            API.
          example: null
        UserId:
          type: integer
          description: An integer that serves as a primary key, uniquely identifying each
            record in the table.
          example: 1
```
