invite_members_to_org

imerit_ango.sdk.SDK.

invite_members_to_org(organization_id, invite_data)

Send invitations to new members to join the specified organization.

Parameters

  • organization_id: string

    • The unique identifier for the organization. You can find the organization ID in the user interface.

  • invite_data: Invitation

    • An Invitation object containing the invitation details, with the following attributes:

    • organizationRole: OrganizationRoles

      • The role assigned to the invited members within the organization. Options include:

        • OrganizationRoles.Admin

        • OrganizationRoles.Member

    • projectId: string

    • projectRole: ProjectRoles

      • The role assigned to the invited members within the project. Options include:

        • ProjectRoles.Manager

        • ProjectRoles.Labeler

        • ProjectRoles.Reviewer

        • ProjectRoles.Lead

Returns:

  • output: dict

Example

import os
from dotenv import load_dotenv
from imerit_ango.sdk import SDK
from imerit_ango.models.invite import Invitation
from imerit_ango.models.enums import OrganizationRoles, ProjectRoles

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

ango_sdk = SDK(api_key)

ango_sdk.invite_members_to_org(organization_id=organization_id, 
                               invite_data=Invitation(to=["user@example.com"],
                                                      organizationRole=OrganizationRoles.Member,
                                                      projectId=project_id,
                                                      projectRole=ProjectRoles.Labeler))

Last updated