# Sharing Projects via API

## Share Project

<mark style="color:green;">`POST`</mark> `https://microreact.org/api/invitations/send/`

#### Query Parameters

| Name                                      | Type   | Description                                                       |
| ----------------------------------------- | ------ | ----------------------------------------------------------------- |
| project<mark style="color:red;">\*</mark> | string | The ID of the project to be shared (e.g. `gb7RzDg87aJK2yGAqQiai`) |

#### Headers

| Name                                           | Type   | Description          |
| ---------------------------------------------- | ------ | -------------------- |
| Access-Token<mark style="color:red;">\*</mark> | string | An API access token. |

#### Request Body

| Name                                     | Type  | Description                                             |
| ---------------------------------------- | ----- | ------------------------------------------------------- |
| emails<mark style="color:red;">\*</mark> | array | An array of email addressess to share the project with. |

{% tabs %}
{% tab title="200 The value true is returned if the project is invitations are set successfully." %}

```javascript
true
```

{% endtab %}
{% endtabs %}

### See [access-tokens](https://docs.microreact.org/api/access-tokens "mention")

Note: Email addresses of users who should have access must be comma-separated ("<email@.com>","<email2@.com>")

### Example

{% tabs %}
{% tab title="cURL + Bash" %}

```bash
curl \
  --header "Access-Token: eyJhbGciOiJIUzUxMiJ9..." \
  --data '{ "emails": [ "email@example.com" ] }' \
  https://microreact.org/api/invitations/send?project=gb7RzDg87aJK2yGAqQiai
```

{% endtab %}
{% endtabs %}
