# 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 [API Access Tokens](/api/access-tokens.md)

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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.microreact.org/api/sharing-projects-via-api.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
