# add\_members\_to\_project

`imerit_ango.sdk.SDK.`

## add\_members\_to\_project(project\_id, members, role)

Assign one or more existing organization members to your project with a specified project role.

### Parameters

```python
add_members_to_project(project_id: str, members: List[str], role: ProjectRoles)
```

* **project\_id:** string
  * The unique identifier for the project. You can find the project ID in [the user interface](https://docs.imerit.net/sdk/sdk-documentation/..#project-ids) or retrieve it using the [`list_projects`](https://docs.imerit.net/sdk/sdk-documentation/project-level-sdk-functions/list_projects) function.
* **members**: List\[str]
  * A list of email addresses for the users you want to add to the project.
  * Example: `["user1@test.com", "user2@test.com"]`
* **role**: ProjectRoles
  * The role in which you would like to add the user(s) to the project.&#x20;
  * Possible roles include:
    * <kbd>ProjectRoles.Manager</kbd>
    * <kbd>ProjectRoles.Labeler</kbd>
    * <kbd>ProjectRoles.Reviewer</kbd>
    * <kbd>ProjectRoles.Lead</kbd>&#x20;

Returns:

* **output:** dict
  * A dictionary containing the result of the operation.
  * Including a `status` field indicating whether the request was successful and a `data` field containing the response payload with updated resources produced by the operation.

{% hint style="warning" %}
All specified users must be existing members of the organization. To invite new users, use the [invite\_members\_to\_org](https://docs.imerit.net/sdk/sdk-documentation/organization-level-sdk-functions/invite_members_to_org) function.
{% endhint %}

### Verify in Ango Hub

After successfully executing the `add_members_to_project` function, you can confirm the changes directly in Ango Hub.

Navigate to: **Projects → \[Your Project] → Settings → Members**

* Confirm that the newly added users are listed under project members.
* Verify that each user has been assigned the correct role.

{% hint style="info" %}
Changes made via the SDK are reflected in Ango Hub in near real-time. If updates are not immediately visible, please refresh the page.
{% endhint %}

### Example

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

```python
import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK
from imerit_ango.models.enums import ProjectRoles

load_dotenv('variables.env')
api_key = os.getenv('API_KEY')
project_id = os.getenv('PROJECT_ID')

ango_sdk = SDK(api_key)

ango_sdk.add_members_to_project(
    project_id=project_id,
    members=["user1@example.com", "user2@example.com"],
    role=ProjectRoles.Labeler
)
```

{% endtab %}

{% tab title="curl" %}

```bash
curl -X POST "https://imeritapi.ango.ai/v2/project/$PROJECT_ID/assigned" \
  -H "Content-Type: application/json" \
  -H "apikey: $ANGO_API_KEY" \
  -d '{
    "assignees": ["user1@example.com", "user2@example.com"],
    "role": "Labeler"
  }'
```

{% endtab %}
{% endtabs %}

<details>

<summary>Sample Output</summary>

```json
{
  "status": "success",
  "data": {
    "project": {
      "memberUpdates": [
        {
          "assignee": "user1@example.com",
          "role": "Labeler"
        },
        {
          "assignee": "user2@example.com",
          "role": "Labeler"
        }
      ]
    }
  }
}
```

</details>

{% hint style="info" %}
**See also**

[invite\_members\_to\_org](https://docs.imerit.net/sdk/sdk-documentation/organization-level-sdk-functions/invite_members_to_org), [get\_organization\_members](https://docs.imerit.net/sdk/sdk-documentation/organization-level-sdk-functions/get_organization_members)
{% endhint %}
