Overview
Inviting users via the API is straighforward and requires minimal setup. Read on to find out.
The Admin, Driver and Organization manager roles require an invitation to MotionTools in order to be allowed to sign up for an account. Once invited, a user receives an e-mail that informs him/ her about the invitation and points them to your MotionTools Dashboard to sign up.
Inviting users can also be performed via the MotionTools Web Dashboard, not just via the API.
See: Invite your team, Getting started with the MotionTools app as a driver
Regardless of the role of the invited user, this is achieved using the Invite Users endpoint.
A few things to note:
- Multiple users can be invited at the same time, as the payload accepts a list
- Admins can invite all other roles
- When inviting drivers the
organization_id
can be omitted. - Organization managers can only invite drivers. The invited drivers will belong to the same organization as the organization manager that invited them.
Sample payload
// Headers
//
// Authentication: Bearer <API Token>
// Accept-Language: en-US
// Payload
{
"invitations": [
{
"email": "foo@example.com",
"role": "admin"
},
{
"email": "bar@example.com",
"role": "driver",
"organization_id": "7c60d51f-b44e-4682-87d6-449835ea4de6"
}
]
}