---
title: "Create a new driver."
url: "https://developers.vzconnect.com/apis/driver-api/versions/dd59d93e-671c-494a-b1e2-63fbd7c9d7da/operations/createDriver"
---

> Full API specification: https://developers.vzconnect.com/apis/driver-api/versions/dd59d93e-671c-494a-b1e2-63fbd7c9d7da.md

# Create a new driver.

`POST` `/cmd/v1/drivers`

Operation ID: `createDriver`

Create a driver record within the REVEAL account. Successful calls return a 201 code with the object details that were posted to the account.

## Request body (required)

Content types: `application/json`

## Responses

- `201` - Driver successfully created.
- `400` - Bad request. The request body is invalid or missing required fields.
- `401` - Unauthorized. Authentication credentials are missing or invalid.
- `500` - Internal server error.

## OpenAPI definition

```yaml
openapi: 3.0.0
info:
  title: Driver API
  version: "1.0"
servers:
  - url: https://api.us.vzconnect.com
paths:
  /cmd/v1/drivers:
    post:
      summary: Create a new driver.
      description: Create a driver record within the REVEAL account. Successful calls
        return a 201 code with the object details that were posted to the
        account.
      operationId: createDriver
      tags:
        - Driver API
      requestBody:
        description: Driver object containing the details of the new driver to create.
        content:
          application/json:
            schema:
              $ref: "#/components/schemas/DriverWrite"
            example:
              DriverNumber: "100096"
              EmailAddress: user@example.com
              FirstName: Chris
              LastName: Abernathy
              EnableMobileAccess: false
              PhoneNumber: "5551234567"
        required: true
      responses:
        "201":
          description: Driver successfully created.
          headers:
            Location:
              description: URL of the newly created driver.
              schema:
                type: string
                example: https://vzc.local/drivers/100096
          content:
            application/json:
              schema:
                allOf:
                  - $ref: "#/components/schemas/DriverWrite"
                  - type: object
                    properties:
                      DriverId:
                        type: integer
                        description: Echoed from the request; always 0 on create.
                        example: 0
              example:
                DriverNumber: "100096"
                EmailAddress: user@example.com
                FirstName: Chris
                LastName: Abernathy
                EnableMobileAccess: false
                PhoneNumber: "5551234567"
                DriverId: 0
        "400":
          description: Bad request. The request body is invalid or missing required fields.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "401":
          description: Unauthorized. Authentication credentials are missing or invalid.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
        "500":
          description: Internal server error.
          content:
            application/json:
              schema:
                $ref: "#/components/schemas/Error"
components:
  schemas:
    DriverWrite:
      type: object
      description: Driver payload used to create (POST) a driver record.
      required:
        - DriverNumber
      properties:
        DriverNumber:
          type: string
          description: The Driver Number, the unique identifier used to reference the
            driver within the API.
          example: "100096"
        EmailAddress:
          type: string
          nullable: true
          description: The email address for the driver. Must be unique. If several
            addresses are supplied, only the first is used, limited to 64
            characters.
          example: user@example.com
        FirstName:
          type: string
          description: The first name of the driver.
          example: Chris
        LastName:
          type: string
          description: The last name of the driver.
          example: Abernathy
        EnableMobileAccess:
          type: boolean
          default: false
          description: True indicates the driver will have access to mobile applications.
            Default is false.
          example: false
        PhoneNumber:
          type: string
          nullable: true
          description: The phone number for the driver.
          example: "5551234567"
    Error:
      type: object
      description: Generic error response. The documentation does not define an
        explicit error body schema.
      properties:
        message:
          type: string
          description: A human-readable description of the error.
```
