# Team

You can invite people to join your workspace. Accepting the invitation gives them access to your workspace.

For each member of your Team, you can view

* Name
* Email address
* Role assigned
  * Owner
  * Admin
  * User
* Last Login: Time and date when the team member login into the work-space.

![](https://560124012-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M-xybEJGFHkN6Wyubt2%2F-M3Pa4BU6mdgpFVMZnQa%2F-M3PbDzvee1rewT3AOrX%2Fimage.png?alt=media\&token=61037572-43be-45d5-9acc-dcf7d7962c6f)

You can also classify members into multiple groups.

#### Team **Actions** <a href="#team-actions" id="team-actions"></a>

You can perform the following actions

* **Invite** to give people access to your work-space.
* **Remove** a member who has not accepted the invite yet. To remove access of existing team members, mark them as inactive.
* **Resend Invite** to a team member who hasn’t accepted invite yet.
* **Edit**: Role, status, and group of team members can be updated.

{% tabs %}
{% tab title="Attributes" %}

| Attributes      | Type                                      | Description                                                                                                                   |
| --------------- | ----------------------------------------- | ----------------------------------------------------------------------------------------------------------------------------- |
| `id`            | `integer`                                 | Id to identify team member uniquely                                                                                           |
| `userId`        | `integer`                                 | Id to identify a user in workspace                                                                                            |
| `accountId`     | `integer`                                 | Account id of that particular team member                                                                                     |
| `firstName`     | `string`                                  | First name of a particular team member                                                                                        |
| `lastName`      | `string`                                  | Last name of a particular team member                                                                                         |
| `status`        | `string`                                  | <p>Different status of a particular team member</p><p><a href="#enum-status"><code>Enum</code></a><code>: 0, 1, 2</code> </p> |
| `email`         | `string`                                  | Registered email of that particular team member                                                                               |
| `role`          | `string`                                  | Different roles of a particular user: [`Enum`](#enum-role)`: user, owner, admin`                                              |
| `invitationUrl` | `string`                                  | Invitation URL sent to the invited member of team                                                                             |
| `userGroups`    | [`array[object]`](#the-usergroups-object) | list of user group where a particular team member is added                                                                    |
| `createdAt`     | `string`                                  | The time at which a team is created in workspace                                                                              |
| `updatedAt`     | `string`                                  | The time at which a team is updated in workspace                                                                              |
| {% endtab %}    |                                           |                                                                                                                               |

{% tab title="Sample Object" %}

```
{
    "id": 1,
    "userId": 1,
    "accountId": 1,
    "email": "johndoe@gmail.com",
    "role": "user",
    "status": "0",
    "invitationUrl": "http://invitation",
     "userGroups": [
       {
           "groupName": "Operations",
           "groupId": "1"
       },
       {
           "groupName": "Operations",
           "groupId": "2"
       }
   ],
    "createdAt": "2020-03-17T12:27:16.000+05:30",
    "updatedAt": "2020-03-17T12:29:13.000+05:30"
}
```

{% endtab %}
{% endtabs %}

## The userGroups Object

| Attributes               | Type      | Description                                                   |
| ------------------------ | --------- | ------------------------------------------------------------- |
| `userGroups[].id`        | `integer` | Unique id of user                                             |
| `userGroups[].groupName` | `string`  | The name of the group where a particular team member is added |
| `userGroups[].groupId`   | `string`  | Group Id to uniquely identify group name                      |
| `userGroups[].accountId` | `integer` | Account id from where particular team belongs to              |
| `userGroups[].createdAt` | `string`  | The time at which particular team is created                  |
| `userGroups[].updatedAt` | `string`  | The time at which particular team is update                   |

## Enum: status

| Attributes | Description                                                  |
| ---------- | ------------------------------------------------------------ |
| `0`        | Team member has not accepted invitation to join group        |
| `1`        | Team member accepted invitation and is active in workspace   |
| `2`        | Team member accepted invitation and is inactive in workspace |

## Enum: role

| Attributes | Description                                                                             |
| ---------- | --------------------------------------------------------------------------------------- |
| `user`     | User can not give permission and only can use the resources provided by owner and admin |
| `admin`    | Admin can give permission to user to access the resources                               |
| `owner`    | Owner can give permission to user and admin to access resources                         |
