| Time | Status | User Agent | |
|---|---|---|---|
Retrieving recent requests… | |||
Create a user with the driver, fleet_user, or admin role in the Motive system.
Validate time_tracking_mode and eld_mode
time_tracking_mode and eld_modeSet time_tracking_mode to a value that is compatible with eld_mode. The API rejects every other combination.
time_tracking_mode | Allowed eld_mode value |
|---|---|
logs | none or logs |
timecards | exempt |
not_required | exempt |
Use the following combinations for drivers:
time_tracking_mode | eld_mode | Result |
|---|---|---|
logs | logs | The Vehicle Gateway records the driver's logs. |
logs | none | The driver maintains an electronic logbook in the Motive Driver App. Logging is disabled on the Vehicle Gateway. |
timecards | exempt | The driver tracks their time with Motive Timecards in the Driver App. |
not_required | exempt | The 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
user- Type: Object
- Description: Details of the created user.
id
id- Type: Integer
- Description: Unique identifier for the user.
first_name
first_name- Type: String
- Description: User's first name.
last_name
last_name- Type: String
- Description: User's last name.
email
email- Type: String
- Description: User's primary email address.
role
role- Type: String
- Description: System role assigned to the user, such as
driver.
status
status- Type: String
- Description: Current account status, such as
active.
phone
phone- Type: String
- Description: User's primary phone number.
phone_country_code
phone_country_code- Type: String
- Description: ISO country code for the primary phone number.
phone_ext
phone_ext- Type: String or null
- Description: Primary phone-number extension, when provided.
phone2
phone2- Type: String
- Description: User's secondary phone number.
phone_country_code2
phone_country_code2- Type: String
- Description: ISO country code for the secondary phone number.
time_zone
time_zone- Type: String
- Description: User's preferred time zone.
metric_units
metric_units- Type: Boolean
- Description: Whether the user prefers metric units.
username
username- Type: String
- Description: Unique username used for authentication.
driver_company_id
driver_company_id- Type: String
- Description: Internal company identifier assigned to the driver.
drivers_license_number
drivers_license_number- Type: String
- Description: Driver's license number.
drivers_license_state
drivers_license_state- Type: String
- Description: State, region, or jurisdiction that issued the driver's license.
drivers_license_country
drivers_license_country- Type: String
- Description: Country code for the driver's license issuing authority.
time_tracking_mode
time_tracking_mode- Type: String
- Description: Method used to track the driver's work hours.
joined_at
joined_at- Type: String (date)
- Description: Date when the user joined the company or platform.
user_notes
user_notes- Type: String
- Description: Administrator notes about the user.
require_job_type_for_timecard_details
require_job_type_for_timecard_details- Type: Boolean
- Description: Whether a job type is required when the user submits timecards.
company_reference_id
company_reference_id- Type: String
- Description: External company reference identifier for the user.
group_ids
group_ids- Type: Array of integers
- Description: Group identifiers associated with the user.
tachograph_card_number
tachograph_card_number- Type: String
- Description: Driver's smart tachograph card number.
tachograph_card_expiry_date
tachograph_card_expiry_date- Type: String (date)
- Description: Expiration date of the driver's tachograph card.
external_ids
external_ids- Type: Array of objects
- Description: External integration mapping identifiers.
external_id
external_id- Type: String
- Description: Identifier in the external integration system.
integration_name
integration_name- Type: String
- Description: Name of the external integration platform.
company_connection
company_connection- Type: Object
- Description: Details about the user's connection to the company.
company_connection_user_roles
company_connection_user_roles- Type: Array
- Description: Sub-roles assigned to the user in the company connection.
mobile_last_active_at
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
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
mobile_last_sign_in_at- Type: String (timestamp)
- Description: Date and time when the user started their previous mobile session.
web_last_active_at
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
created_at- Type: String (timestamp)
- Description: Date and time when the user record was created.
updated_at
updated_at- Type: String (timestamp)
- Description: Date and time when the user record was last updated.
