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

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

# Create an external user

`POST` `/cmd/v1/users/external`

Operation ID: `POST__users_external`

Creates a new user within the authenticated REVEAL account using an external system identifier. This endpoint is used when the user identity is managed by an external system and needs to be synchronized into REVEAL.

## Request body (required)

Content types: `application/json`

## Responses

- `201` - Successfully created the external user. Returns the submitted external user details.
- `400` - Bad request. The request body is missing required fields or contains invalid data, for example an ExternalId that is not in the scope:value format.
- `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/external:
    post:
      tags:
        - User API
      summary: Create an external user
      description: Creates a new user within the authenticated REVEAL account using an
        external system identifier. This endpoint is used when the user identity
        is managed by an external system and needs to be synchronized into
        REVEAL.
      operationId: POST__users_external
      requestBody:
        description: The external user details including the required ExternalId and the
          user profile information to create.
        required: true
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/ExternalUserInput"
            example:
              FirstName: Lonny
              LastName: Arking
              EmailAddress: user@example.com
              EmployeeId: 777099
              MobileNumber: null
              IsAdministrator: false
              IsRegionalAdministrator: false
              Role: Demo
              TimeZone: null
              Region: null
              Language: null
              IsDriver: false
              DriverNumber: null
              ExternalId: hr_system:emp-1042
      responses:
        "201":
          description: Successfully created the external user. Returns the submitted
            external user details.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/ExternalUser"
              example:
                FirstName: Lonny
                LastName: Arking
                EmailAddress: user@example.com
                EmployeeId: 777099
                MobileNumber: null
                IsAdministrator: false
                IsRegionalAdministrator: false
                Role: Demo
                TimeZone: null
                Region: null
                Language: null
                IsDriver: false
                DriverNumber: null
                ExternalId: hr_system:emp-1042
        "400":
          description: Bad request. The request body is missing required fields or
            contains invalid data, for example an ExternalId that is not in the
            scope:value format.
          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/external/?$
components:
  schemas:
    ExternalUserInput:
      type: object
      description: The request body fields provided when creating (POST) or editing
        (PUT) an external user record. Same fields as a user, plus the required
        ExternalId.
      required:
        - FirstName
        - LastName
        - EmailAddress
        - EmployeeId
        - ExternalId
      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: string
          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. Can be NULL if the user
            is an Administrator or a Regional Admin.
          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
        ExternalId:
          type: string
          pattern: ^(?=.{3,96}$)[a-zA-Z0-9_-]+:[a-zA-Z0-9_-]+$
          minLength: 3
          maxLength: 96
          description: The unique identifier for the user in the external system, in the
            format scope:value. 3 to 96 characters; the scope and the value may
            contain letters, digits, underscore and hyphen.
          example: hr_system:emp-1042
    ExternalUser:
      type: object
      description: A REVEAL user record that is managed by an external system.
      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
        ExternalId:
          type: string
          pattern: ^(?=.{3,96}$)[a-zA-Z0-9_-]+:[a-zA-Z0-9_-]+$
          minLength: 3
          maxLength: 96
          description: The unique identifier for the user in the external system, in the
            format scope:value. 3 to 96 characters; the scope and the value may
            contain letters, digits, underscore and hyphen.
          example: hr_system:emp-1042
```
