Users
As a company administrator you can manage the users that can access your company.
Invite a user to your company
This grants a certain user access to your company. If the user already exists in XFleet they will receive the grant for accessing your company. If not, they will be sent an invitation and once they sign up they will be able to access your company.
curl \
-X POST \
-H 'Authorization: Token ...' \
-H 'Content-Type: application/json' \
-d '{
"alias": "somealias",
"email": "someemail@example.com",
"active": true,
"groups": ["<group id>", ...],
"teams": ["<team id>", ...],
"grants":
[
"read:clients",
"create:clients",
"delete:clients",
"update:clients"
]
}' \
https://api.xfleet.io/api/v1/companies/{id}/users
For the full list of grants, please contact us (or use the web UI).
{
"email": "someemail@example.com",
"active": true,
"groups": [
{
"id": "7Gc009J0UK6EotstIP6PJq"
}
],
"teams": [
{
"id": "6RbrxEwWdfFHa09dRQKee1"
}
],
"id": "5tYHcQX4jX8Vtsaas9h23g",
"createdAt": "2021-11-06T22:59:59+00:00",
"createdBy": {
"id": "5UDdBUlZfOJKPrF7puVNRI"
},
"grants": [
"read:clients",
"create:clients",
"delete:clients",
"update:clients"
],
"alias": "somealias"
}
List users
curl \
-H 'Authorization: Token ...' \
https://api.xfleet.io/api/v1/companies/{id}/users
[
{
"email": "someemail@example.com",
"active": true,
"groups": [
{
"id": "7Gc009J0UK6EotstIP6PJq"
}
],
"teams": [
{
"id": "6RbrxEwWdfFHa09dRQKee1"
}
],
"id": "5tYHcQX4jX8Vtsaas9h23g",
"createdAt": "2021-11-06T22:59:59+00:00",
"createdBy": {
"id": "5UDdBUlZfOJKPrF7puVNRI"
},
"grants": [
"read:clients",
"create:clients",
"delete:clients",
"update:clients"
],
"alias": "somealias"
}
]