> For the complete documentation index, see [llms.txt](https://docs.enclaive.cloud/enclaive-multi-cloud-platform/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.enclaive.cloud/enclaive-multi-cloud-platform/developers/api/client-api/settings/invite.md).

# Invite

The "Invite" section houses endpoints related to inviting team members, removing team members, accepting invitations to join a team, and canceling team invitations.

## Invite a member

<mark style="color:green;">`POST`</mark> `{{BASE_URL}}/api/teams/{id}/invite`

Invite a user to a specific team.

#### Path Parameters

| Name                                 | Type   | Description |
| ------------------------------------ | ------ | ----------- |
| id<mark style="color:red;">\*</mark> | String | Team ID     |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer Token |

#### Request Body

| Name                                     | Type      | Description              |
| ---------------------------------------- | --------- | ------------------------ |
| emails<mark style="color:red;">\*</mark> | \[String] | \["<email@exmaple.com>"] |

{% tabs %}
{% tab title="200: OK " %}

```json
{"status":"ok"}
```

{% endtab %}
{% endtabs %}

## Accept invitation

<mark style="color:green;">`POST`</mark> `{{BASE_URL}}/api/invite/{id}`

Accept an invitation to join the team.

#### Path Parameters

| Name                                 | Type   | Description |
| ------------------------------------ | ------ | ----------- |
| id<mark style="color:red;">\*</mark> | String | Invite ID   |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer Token |

#### Request Body

| Name                                       | Type   | Description |
| ------------------------------------------ | ------ | ----------- |
| email<mark style="color:red;">\*</mark>    | String |             |
| password<mark style="color:red;">\*</mark> | String |             |

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "userToken": "userToken",
    "vaultToken": "teamToken"
}
```

{% endtab %}
{% endtabs %}

## Invitation list

<mark style="color:blue;">`GET`</mark> `{{BASE_URL}}/api/teams/{id}/invite`

Get a list of invitations to the team.

#### Path Parameters

| Name                                 | Type   | Description |
| ------------------------------------ | ------ | ----------- |
| id<mark style="color:red;">\*</mark> | String | Team ID     |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer Token |

{% tabs %}
{% tab title="200: OK " %}

```json
[{"_id":"6548fd8dff600e06af2a95e2","email":"test@test.com"}]
```

{% endtab %}
{% endtabs %}

## Get invitation

<mark style="color:blue;">`GET`</mark> `{{BASE_URL}}/api/invite/{id}`

Get team invitation information by unique id.

#### Path Parameters

| Name                                 | Type   | Description |
| ------------------------------------ | ------ | ----------- |
| id<mark style="color:red;">\*</mark> | String | Invite ID   |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer Token |

{% tabs %}
{% tab title="200: OK " %}

```json
{"_id":"6548fd8dff600e06af2a95e2","email":"test@test.com"}
```

{% endtab %}
{% endtabs %}

## Cancel invitation

<mark style="color:red;">`DELETE`</mark> `{{BASE_URL}}/api/teams/{id}/invite/{inviteId}`

Cancel the invitation to the team.

#### Path Parameters

| Name                                 | Type   | Description |
| ------------------------------------ | ------ | ----------- |
| id<mark style="color:red;">\*</mark> | String | Team ID     |
| inviteId                             | String | Invite id   |

#### Headers

| Name                                            | Type   | Description  |
| ----------------------------------------------- | ------ | ------------ |
| Authorization<mark style="color:red;">\*</mark> | String | Bearer Token |

{% tabs %}
{% tab title="200: OK " %}

```json
true
```

{% endtab %}
{% endtabs %}
