Create a new user

Recent Requests
Log in to see full request history
TimeStatusUser Agent
Retrieving recent requests…
LoadingLoading…

Create a user with the driver, fleet_user, or admin role in the Motive system.

Validate time_tracking_mode and eld_mode

Set time_tracking_mode to a value that is compatible with eld_mode. The API rejects every other combination.

time_tracking_modeAllowed eld_mode value
logsnone or logs
timecardsexempt
not_requiredexempt

Use the following combinations for drivers:

time_tracking_modeeld_modeResult
logslogsThe Vehicle Gateway records the driver's logs.
logsnoneThe driver maintains an electronic logbook in the Motive Driver App. Logging is disabled on the Vehicle Gateway.
timecardsexemptThe driver tracks their time with Motive Timecards in the Driver App.
not_requiredexemptThe driver does not maintain logs or track time in Motive.

Optional: Add external IDs

Add external_ids_attributes to associate the user with an identifier from an external system. An external ID is unique for each external_id and integration_name combination.

Provide all required external ID attributes: external_id, integration_name, external_id_holder_id, and external_id_holder_type.

{
  "email": "[email protected]",
  "first_name": "John",
  "last_name": "Doe",
  "username": "john.doe",
  "password": "<USER_PASSWORD>",
  "role": "driver",
  "phone_country_code": "+1",
  "external_ids_attributes": [
    {
      "external_id": "987",
      "integration_name": "generic_tms",
      "external_id_holder_id": 9876,
      "external_id_holder_type": "User"
    }
  ]
}

Optional: Restrict a fleet user's group access

To restrict a fleet user's access, set group_visibility to limited and include the group IDs in custom_user_role.group_ids. Do not send these group IDs in the top-level group_ids attribute.

{
  "email": "[email protected]",
  "first_name": "John",
  "last_name": "Doe",
  "username": "john.doe",
  "password": "<USER_PASSWORD>",
  "role": "fleet_user",
  "phone_country_code": "+1",
  "group_visibility": "limited",
  "custom_user_role": {
    "user_role_id": 9,
    "group_ids": [101]
  }
}

Optional: Add a driver to groups

To add a driver to groups, send the group IDs in the user's top-level group_ids attribute.

{
  "email": "[email protected]",
  "first_name": "John",
  "last_name": "Doe",
  "username": "john.doe",
  "password": "<USER_PASSWORD>",
  "role": "driver",
  "phone_country_code": "+1",
  "group_ids": [1, 2]
}

Response parameters

user

  • Type: Object
  • Description: Details of the created user.

id

  • Type: Integer
  • Description: Unique identifier for the user.

first_name

  • Type: String
  • Description: User's first name.

last_name

  • Type: String
  • Description: User's last name.

email

  • Type: String
  • Description: User's primary email address.

role

  • Type: String
  • Description: System role assigned to the user, such as driver.

status

  • Type: String
  • Description: Current account status, such as active.

phone

  • Type: String
  • Description: User's primary phone number.

phone_country_code

  • Type: String
  • Description: ISO country code for the primary phone number.

phone_ext

  • Type: String or null
  • Description: Primary phone-number extension, when provided.

phone2

  • Type: String
  • Description: User's secondary phone number.

phone_country_code2

  • Type: String
  • Description: ISO country code for the secondary phone number.

time_zone

  • Type: String
  • Description: User's preferred time zone.

metric_units

  • Type: Boolean
  • Description: Whether the user prefers metric units.

username

  • Type: String
  • Description: Unique username used for authentication.

driver_company_id

  • Type: String
  • Description: Internal company identifier assigned to the driver.

drivers_license_number

  • Type: String
  • Description: Driver's license number.

drivers_license_state

  • Type: String
  • Description: State, region, or jurisdiction that issued the driver's license.

drivers_license_country

  • Type: String
  • Description: Country code for the driver's license issuing authority.

time_tracking_mode

  • Type: String
  • Description: Method used to track the driver's work hours.

joined_at

  • Type: String (date)
  • Description: Date when the user joined the company or platform.

user_notes

  • Type: String
  • Description: Administrator notes about the user.

require_job_type_for_timecard_details

  • Type: Boolean
  • Description: Whether a job type is required when the user submits timecards.

company_reference_id

  • Type: String
  • Description: External company reference identifier for the user.

group_ids

  • Type: Array of integers
  • Description: Group identifiers associated with the user.

tachograph_card_number

  • Type: String
  • Description: Driver's smart tachograph card number.

tachograph_card_expiry_date

  • Type: String (date)
  • Description: Expiration date of the driver's tachograph card.

external_ids

  • Type: Array of objects
  • Description: External integration mapping identifiers.

external_id

  • Type: String
  • Description: Identifier in the external integration system.

integration_name

  • Type: String
  • Description: Name of the external integration platform.

company_connection

  • Type: Object
  • Description: Details about the user's connection to the company.

company_connection_user_roles

  • Type: Array
  • Description: Sub-roles assigned to the user in the company connection.

mobile_last_active_at

  • Type: String (timestamp)
  • Description: Date and time when the user was last active in the mobile application.

mobile_current_sign_in_at

  • Type: String (timestamp)
  • Description: Date and time when the user started their current mobile session.

mobile_last_sign_in_at

  • Type: String (timestamp)
  • Description: Date and time when the user started their previous mobile session.

web_last_active_at

  • Type: String (timestamp) or null
  • Description: Date and time when the user was last active in the web application.

created_at

  • Type: String (timestamp)
  • Description: Date and time when the user record was created.

updated_at

  • Type: String (timestamp)
  • Description: Date and time when the user record was last updated.
Body Params
string
required

Enter the first name of the user.

string
required

Enter the last name of the user.

string
required

Specify the role of the user. Possible values are driver, fleet_user, or admin.

string
required

Specify a password for the user.

string
required

Specify the email address of the user.

string

Enter the phone number of the user.

string
required

Specify the user's phone country code. For example if you are creating a user in the USA, enter the country code as +1

string

Enter the phone number extension if available.

string

Specify the secondary phone number of the user.

string

Specify the country code of the secondary phone number.

string

Specify the time zone of the the user's home terminal.

boolean

Set true to use metric units.

string
required

Enter the user name of the user that you are creating.

string

Enter the driver's company ID.

string

Specify the license number of the driver. NOTE: This is mandatory only if the eld_mode is "logs".

string

Specify the issuing state of the driver's license. NOTE: This is mandatory only if the eld_mode is "logs".

string

Specify the country of the driver where there exists a valid driver's license.

string

Specify the time tracking mode of the driver. Allowed values are logs, timecards, & not_required.

string

Internal reference id of a user in the company

external_ids_attributes
array of objects

Specify the external ID of the user and the integration name associated with the ID.

external_ids_attributes
date

Specify the date of joining of the driver. Joining date (YYYY-MM-DD)

string

Specify the admin notes for the newly created user.

boolean

Specify if the job card is required for the driver to access the timecard.

Headers
string

X-Time-Zone

boolean

Specify if you want to use the Metric units or the Imperial units. TRUE: Metric units. FALSE: Imperial Units

int32

Specify the ID of the Fleet Admin or the Fleet Manager who is accessing this endpoint.

Responses

Language
Credentials
Header
LoadingLoading…
Response
Click Try It! to start a request and see the response here! Or choose an example:
application/json