# 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

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

```python
from imerit_ango.models.enums import ProjectRoles
```

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 to the organization, use the [invite\_members\_to\_org](/sdk/sdk-documentation/organization-level-sdk-functions/invite_members_to_org.md) function.
{% endhint %}

<details open>

<summary><strong>How to verify in Ango Hub?</strong></summary>

After successfully executing the `add_members_to_project` function, you can validate 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 %}

</details>

### 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](/sdk/sdk-documentation/organization-level-sdk-functions/invite_members_to_org.md), [get\_organization\_members](/sdk/sdk-documentation/organization-level-sdk-functions/get_organization_members.md)
{% endhint %}


---

# 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.imerit.net/sdk/sdk-documentation/project-level-sdk-functions/add_members_to_project.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.
